From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] webaccess.cgi: Fixed language settings.
Date: Tue, 19 Jan 2016 00:26:27 +0000 [thread overview]
Message-ID: <1453163187.5665.126.camel@ipfire.org> (raw)
In-Reply-To: <1453108450-17427-1-git-send-email-erik.kapfer@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 4062 bytes --]
Thanks. Merged.
On Mon, 2016-01-18 at 10:14 +0100, Erik Kapfer wrote:
> Fix for #10879. Added also use strict.
>
> Signed-off-by: Erik Kapfer <erik.kapfer(a)ipfire.org>
> ---
> 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 @@
> #
> #
> ####################################################################
> ###########
>
> +use strict;
> +
> +#usable only the following on debugging purpose
> +#use warnings;
> +#use CGI::Carp 'fatalsToBrowser';
> use CGI;
>
> +require '/var/ipfire/general-functions.pl';
> +require "${General::swroot}/lang.pl";
> +require "${General::swroot}/header.pl";
> +
> +
> my $swroot = "/var/ipfire";
> my $apdir = "$swroot/proxy/advanced";
> my $group_def_file = "$apdir/cre/classrooms";
> @@ -31,6 +41,7 @@ my $acl_src_noaccess_mac =
> "$apdir/acls/src_noaccess_mac.acl";
> my $banner = "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;
>
> my %acl=();
> my @group_defs=();
> @@ -49,8 +60,8 @@ require "${swroot}/lang.pl";
>
> foreach (@groups)
> {
> - if ($cgiparams{$_} eq $tr{'advproxy mode deny'}) {
> $acl{$_}='on'; }
> - if ($cgiparams{$_} eq $tr{'advproxy mode allow'}) {
> $acl{$_}='off'; }
> + if ($cgiparams{$_} eq $Lang::tr{'advproxy mode deny'}) {
> $acl{$_}='on'; }
> + if ($cgiparams{$_} eq $Lang::tr{'advproxy mode allow'}) {
> $acl{$_}='off'; }
> }
>
> &read_all_groups;
> @@ -144,7 +155,7 @@ if (($is_supervisor) &&
> ((defined($proxysettings{'SUPERVISOR_PASSWORD'})) && (!(
> {
> print <<END
> <td align='center'>
> - <font face='verdana,arial,helvetica'
> color='#000000' size='2'>$tr{'advproxy supervisor password'}:</font>
> + <font face='verdana,arial,helvetica'
> color='#000000' size='2'>$Lang::tr{'advproxy supervisor
> password'}:</font>
> </td>
> <td align='center'><input type='password'
> name='PASSWORD' size='15'></td>
> END
> @@ -176,11 +187,11 @@ END
> if ((defined($acl{$_})) && ($acl{$_} eq
> 'on'))
> {
> print "</td><td width='120'
> align='center'>";
> - print "<input type='submit'
> name='$_' value=' $tr{'advproxy mode allow'} '>";
> + print "<input type='submit'
> name='$_' value=' $Lang::tr{'advproxy mode allow'} '>";
> print "</td><td width='16'
> bgcolor='#D00000'> </td>\n";
> } else {
> print "</td><td width='120'
> align='center'>";
> - print "<input type='submit'
> name='$_' value=' $tr{'advproxy mode deny'} '>";
> + print "<input type='submit'
> name='$_' value=' $Lang::tr{'advproxy mode deny'} '>";
> print "</td><td width='16'
> bgcolor='#00A000'> </td>\n";
> }
> }
> @@ -199,14 +210,14 @@ END
> } else {
> print " <tr>\n";
> print " <td align='center'>\n";
> - print " <font face='verdana,arial,helvetica'
> color='#000000' size='2'>$tr{'advproxy no cre groups'}</font>\n";
> + print " <font face='verdana,arial,helvetica'
> color='#000000' size='2'>$Lang::tr{'advproxy no cre
> groups'}</font>\n";
> print " </td>\n";
> print " </tr>\n";
> }
> } else {
> print " <tr>\n";
> print " <td align='center'>\n";
> - print " <font face='verdana,arial,helvetica'
> color='#000000' size='2'>$tr{'advproxy cre disabled'}</font>\n";
> + print " <font face='verdana,arial,helvetica'
> color='#000000' size='2'>$Lang::tr{'advproxy cre
> disabled'}</font>\n";
> print " </td>\n";
> print " </tr>\n";
> }
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-01-19 0:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-18 9:14 Erik Kapfer
2016-01-19 0:26 ` Michael Tremer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1453163187.5665.126.camel@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox