From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Kapfer To: development@lists.ipfire.org Subject: [PATCH] webaccess.cgi: Fixed language settings. Date: Mon, 18 Jan 2016 10:14:10 +0100 Message-ID: <1453108450-17427-1-git-send-email-erik.kapfer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5283223866313221732==" List-Id: --===============5283223866313221732== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Fix for #10879. Added also use strict. Signed-off-by: Erik Kapfer --- html/cgi-bin/webaccess.cgi | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/html/cgi-bin/webaccess.cgi b/html/cgi-bin/webaccess.cgi index afa3770..0d50f01 100644 --- a/html/cgi-bin/webaccess.cgi +++ b/html/cgi-bin/webaccess.cgi @@ -19,8 +19,18 @@ # = # ############################################################################= ### =20 +use strict; + +#usable only the following on debugging purpose +#use warnings; +#use CGI::Carp 'fatalsToBrowser'; use CGI; =20 +require '/var/ipfire/general-functions.pl'; +require "${General::swroot}/lang.pl"; +require "${General::swroot}/header.pl"; + + my $swroot =3D "/var/ipfire"; my $apdir =3D "$swroot/proxy/advanced"; my $group_def_file =3D "$apdir/cre/classrooms"; @@ -31,6 +41,7 @@ my $acl_src_noaccess_mac =3D "$apdir/acls/src_noaccess_mac.= acl"; my $banner =3D "A D V A N C E D   P R O X Y   -   W E B  = ; A C C E S S   M A N A G E R"; my %cgiparams; my %proxysettings; +my %temp; =20 my %acl=3D(); my @group_defs=3D(); @@ -49,8 +60,8 @@ require "${swroot}/lang.pl"; =20 foreach (@groups) { - if ($cgiparams{$_} eq $tr{'advproxy mode deny'}) { $acl{$_}=3D'on'; } - if ($cgiparams{$_} eq $tr{'advproxy mode allow'}) { $acl{$_}=3D'off'; } + if ($cgiparams{$_} eq $Lang::tr{'advproxy mode deny'}) { $acl{$_}=3D'= on'; } + if ($cgiparams{$_} eq $Lang::tr{'advproxy mode allow'}) { $acl{$_}=3D= 'off'; } } =20 &read_all_groups; @@ -144,7 +155,7 @@ if (($is_supervisor) && ((defined($proxysettings{'SUPERVI= SOR_PASSWORD'})) && (!( { print < - $tr{'advproxy supervisor password'}: + $Lang::tr{'advproxy supervisor password'}: END @@ -176,11 +187,11 @@ END if ((defined($acl{$_})) && ($acl{$_} eq 'on')) { print ""; - print ""; + print ""; print " \n"; } else { print ""; - print ""; + print ""; print " \n"; } } @@ -199,14 +210,14 @@ END } else { print " \n"; print " \n"; - print " $tr{'advproxy no cre groups'}\n"; + print " $Lang::tr{'advproxy no cre groups'}\n"; print " \n"; print " \n"; } } else { print " \n"; print " \n"; - print " $tr{'advproxy cre disabled'}\n"; + print " $Lang::tr{'advproxy cre disabled'}\n"; print " \n"; print " \n"; } --=20 2.4.4 --===============5283223866313221732==--