From 02cb636c8b0abfeb8805d058e29d1a3f8d53ce9a Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Tue, 26 Nov 2013 13:34:08 +0100 Subject: [PATCH] Firewall: Fixes commit http://git.ipfire.org/?p=people/amarx/ipfire-2.x.git;a=commitdiff;h=e19a36c4a09ea417ce9d577c262f17242eec4a31 Now all "active" Strings from all languagefiles are checked against the old rule to find out if logging is enabled Conflicts: config/firewall/convert-outgoingfw --- config/firewall/convert-outgoingfw | 8 +++++++- langs/de/cgi-bin/de.pl | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config/firewall/convert-outgoingfw b/config/firewall/convert-outgoingfw index 0d7f7d3dd6..d7722f421b 100755 --- a/config/firewall/convert-outgoingfw +++ b/config/firewall/convert-outgoingfw @@ -62,6 +62,7 @@ my %fwconfigout=(); my %fwdsettings=(); my %ownnet=(); my %ovpnSettings = (); +my @active= ('Aktiv', 'aktiv', 'Active', 'Activo', 'Actif', 'Actief', 'Aktywne', 'Активен', 'Aktif'); &General::readhash("${General::swroot}/ovpn/settings", \%ovpnSettings); &General::readhash($outfwsettings,\%outsettings); &General::readhash("${General::swroot}/ethernet/settings", \%ownnet); @@ -382,7 +383,12 @@ sub process_rules $configline[4] =~ s/,/;/g; $remark = $configline[4]; }else{$remark = '';} - if($configline[9] eq 'Active'){ $log='ON';}else{$log='';} + #find all "active" tags in all language files and check them against the old config + my $logging='0'; + foreach (@active){ + $logging='1' if ($_ eq $configline[9]); + } + if($logging eq '1' ){ $log='ON';}else{$log='';} if($configline[10] eq 'on' && $configline[11] eq 'on' && $configline[12] eq 'on' && $configline[13] eq 'on' && $configline[14] eq 'on' && $configline[15] eq 'on' && $configline[16] eq 'on'){ if($configline[17] eq '00:00' && $configline[18] eq '00:00'){ $time=''; diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index 5bcf5c8378..dd7eb78152 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -71,7 +71,7 @@ 'action' => 'Aktion', 'activate' => 'aktivieren', 'activate user' => 'Benutzer aktivieren', -'active' => 'aktiv', +'active' => 'Aktiv', 'add' => 'Hinzufügen', 'add a host' => 'Host hinzufügen:', 'add a new rule' => 'Neue Regel hinzufügen:', -- 2.39.5