From a5754e932be533c51065d1d31d86bef85ff4f47f Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Mon, 7 Dec 2009 20:18:14 +0100 Subject: [PATCH] Added a little fix to outgoing fw to ensure when no weekday is given all weekdays are preset, this prevents missing inputs. --- html/cgi-bin/outgoingfw.cgi | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/html/cgi-bin/outgoingfw.cgi b/html/cgi-bin/outgoingfw.cgi index f3cf581a6a..9e621221a7 100644 --- a/html/cgi-bin/outgoingfw.cgi +++ b/html/cgi-bin/outgoingfw.cgi @@ -21,8 +21,8 @@ use strict; # enable only the following on debugging purpose -use warnings; -use CGI::Carp 'fatalsToBrowser'; +#use warnings; +#use CGI::Carp 'fatalsToBrowser'; require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; @@ -111,6 +111,23 @@ if ($outfwsettings{'POLICY'} eq 'MODE0'){ $selected{'POLICY'}{'MODE0'} = 'select if ($outfwsettings{'POLICY'} eq 'MODE1'){ $selected{'POLICY'}{'MODE1'} = 'selected'; } else { $selected{'POLICY'}{'MODE1'} = ''; } if ($outfwsettings{'POLICY'} eq 'MODE2'){ $selected{'POLICY'}{'MODE2'} = 'selected'; } else { $selected{'POLICY'}{'MODE2'} = ''; } +if ( $outfwsettings{'TIME_MON'} eq "" && + $outfwsettings{'TIME_TUE'} eq "" && + $outfwsettings{'TIME_WED'} eq "" && + $outfwsettings{'TIME_THU'} eq "" && + $outfwsettings{'TIME_FRI'} eq "" && + $outfwsettings{'TIME_SAT'} eq "" && + $outfwsettings{'TIME_SUN'} eq "" ) + { + $outfwsettings{'TIME_MON'} = "on"; + $outfwsettings{'TIME_TUE'} = "on"; + $outfwsettings{'TIME_WED'} = "on"; + $outfwsettings{'TIME_THU'} = "on"; + $outfwsettings{'TIME_FRI'} = "on"; + $outfwsettings{'TIME_SAT'} = "on"; + $outfwsettings{'TIME_SUN'} = "on"; + } + &Header::openpage('Ausgehende Firewall', 1, ''); &Header::openbigbox('100%', 'left', '', $errormessage); -- 2.39.2