firewall.cgi: Make checked and selected hashes private for each single function.

Some functions uses those two hashes and are altering them - making them
private will erase and fill it with new data.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Stefan Schantl
2021-07-11 19:54:18 +02:00
committed by Arne Fitzenreiter
parent 04b6a4baa8
commit ec0ed11d71

View File

@@ -1005,6 +1005,10 @@ sub gen_dd_block
my $grp=shift;
my $helper='';
my $show='';
my %checked = ();
my %selected = ();
$checked{'grp1'}{$fwdfwsettings{'grp1'}} = 'CHECKED';
$checked{'grp2'}{$fwdfwsettings{'grp2'}} = 'CHECKED';
$checked{'grp3'}{$fwdfwsettings{'grp3'}} = 'CHECKED';
@@ -1482,7 +1486,10 @@ sub newrule
&General::readhasharray("$configlocationgrp", \%customlocationgrp);
&General::readhasharray("$configipsec", \%ipsecconf);
&General::get_aliases(\%aliases);
my %checked=();
my %checked = ();
my %selected = ();
my $helper;
my $sum=0;
if($fwdfwsettings{'config'} eq ''){$fwdfwsettings{'config'}=$configfwdfw;}