From f0383e5f6a8025f6b50bdb32a287456375800e60 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 25 Aug 2023 16:36:20 +0000 Subject: [PATCH] Bug 34616: Fix showing default server info on edit SMTP server page Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- admin/smtp_servers.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/admin/smtp_servers.pl b/admin/smtp_servers.pl index cd76cc5ff5..54af62db73 100755 --- a/admin/smtp_servers.pl +++ b/admin/smtp_servers.pl @@ -42,6 +42,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my @messages; +my $smtp_servers = Koha::SMTP::Servers->search; + if ( $op eq 'add' ) { my $name = $input->param('smtp_name'); @@ -95,7 +97,8 @@ elsif ( $op eq 'edit_form' ) { if ( $smtp_server ) { $template->param( - smtp_server => $smtp_server + smtp_server => $smtp_server, + default_config => $smtp_servers->get_default, ); } else { @@ -174,7 +177,6 @@ elsif ( $op eq 'edit_save' ) { } if ( $op eq 'list' ) { - my $smtp_servers = Koha::SMTP::Servers->search; $template->param( servers_count => $smtp_servers->count, default_config => $smtp_servers->get_default, -- 2.39.5