public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 928eba27a5e15074d8e5b7d8b9f6892d122bf40f
Date: Tue, 19 Jan 2016 01:07:52 +0100	[thread overview]
Message-ID: <20160119000752.8993921A01@argus.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 5706 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  928eba27a5e15074d8e5b7d8b9f6892d122bf40f (commit)
       via  bcb30674e2f7f3fe4989bffe5fbc43d44be86633 (commit)
      from  857b2c795e2c982cb5967725ba01a1e3c29d43f5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 928eba27a5e15074d8e5b7d8b9f6892d122bf40f
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Tue Jan 19 00:07:07 2016 +0000

    core97: Ship updated webaccess.cgi
    
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>

commit bcb30674e2f7f3fe4989bffe5fbc43d44be86633
Author: Erik Kapfer <erik.kapfer(a)ipfire.org>
Date:   Mon Jan 18 10:14:10 2016 +0100

    webaccess.cgi: Fixed language settings.
    
    Fix for #10879. Added also use strict.
    
    Signed-off-by: Erik Kapfer <erik.kapfer(a)ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 config/rootfiles/core/97/filelists/files |  1 +
 html/cgi-bin/webaccess.cgi               | 25 ++++++++++++++++++-------
 2 files changed, 19 insertions(+), 7 deletions(-)

Difference in files:
diff --git a/config/rootfiles/core/97/filelists/files b/config/rootfiles/core/97/filelists/files
index af53bb3..40bbbcf 100644
--- a/config/rootfiles/core/97/filelists/files
+++ b/config/rootfiles/core/97/filelists/files
@@ -2,6 +2,7 @@ etc/system-release
 etc/issue
 srv/web/ipfire/cgi-bin/ovpnmain.cgi
 srv/web/ipfire/cgi-bin/qos.cgi
+srv/web/ipfire/cgi-bin/webaccess.cgi
 usr/bin/pgrep
 usr/local/bin/qosctrl
 usr/local/bin/timectrl
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 &nbsp; P R O X Y &nbsp; - &nbsp; W E B &nbsp; A C C E S S &nbsp; 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'>&nbsp;</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'>&nbsp;</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";
 }


hooks/post-receive
--
IPFire 2.x development tree

                 reply	other threads:[~2016-01-19  0:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20160119000752.8993921A01@argus.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@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