mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
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 <michael.tremer@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
8f9c4081b4
commit
0a340fbe1e
@@ -81,19 +81,10 @@ if ( -f $mailfile){
|
|||||||
|
|
||||||
#ACTIONS
|
#ACTIONS
|
||||||
if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}"){ #SaveButton on configsite
|
if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}"){ #SaveButton on configsite
|
||||||
#Check fields
|
# Check fields
|
||||||
if ($cgiparams{'USEMAIL'} eq 'on'){
|
$errormessage = &checkmailsettings();
|
||||||
$errormessage=&checkmailsettings;
|
|
||||||
}else{
|
if (!$errormessage) {
|
||||||
$cgiparams{'txt_mailserver'}='';
|
|
||||||
$cgiparams{'txt_mailport'}='';
|
|
||||||
$cgiparams{'txt_mailuser'}='';
|
|
||||||
$cgiparams{'txt_mailpass'}='';
|
|
||||||
$cgiparams{'mail_tls'}='';
|
|
||||||
$cgiparams{'txt_mailsender'}='';
|
|
||||||
$cgiparams{'txt_recipient'}='';
|
|
||||||
}
|
|
||||||
if(!$errormessage){
|
|
||||||
#clear hashes
|
#clear hashes
|
||||||
%auth=();
|
%auth=();
|
||||||
%dma=();
|
%dma=();
|
||||||
|
|||||||
Reference in New Issue
Block a user