From: Michael Tremer Date: Wed, 30 Oct 2019 10:49:39 +0000 (+0000) Subject: mail.cgi: Always check content of fields X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b9b9aba5bb7604530ed4b258c795d621c9e5f1e3;p=people%2Fms%2Fipfire-2.x.git mail.cgi: Always check content of fields These checks did not do anything but clear all fields when mailing was disabled. It makes a lot more sense to retain people's settings, even when they have been disabled. Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/mail.cgi b/html/cgi-bin/mail.cgi index 9cf14cac8b..07986a4d65 100755 --- a/html/cgi-bin/mail.cgi +++ b/html/cgi-bin/mail.cgi @@ -81,19 +81,10 @@ if ( -f $mailfile){ #ACTIONS if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}"){ #SaveButton on configsite - #Check fields - if ($cgiparams{'USEMAIL'} eq 'on'){ - $errormessage=&checkmailsettings; - }else{ - $cgiparams{'txt_mailserver'}=''; - $cgiparams{'txt_mailport'}=''; - $cgiparams{'txt_mailuser'}=''; - $cgiparams{'txt_mailpass'}=''; - $cgiparams{'mail_tls'}=''; - $cgiparams{'txt_mailsender'}=''; - $cgiparams{'txt_recipient'}=''; - } - if(!$errormessage){ + # Check fields + $errormessage = &checkmailsettings(); + + if (!$errormessage) { #clear hashes %auth=(); %dma=();