From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 91dd042b20210df0bb0461ebf09791e3c028ea86
Date: Wed, 05 Mar 2014 23:54:23 +0100 [thread overview]
Message-ID: <20140305225423.69CC120ACF@argus.ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2770 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 91dd042b20210df0bb0461ebf09791e3c028ea86 (commit)
from 63f2fb7fda9112d9e39414328e5d4fab28809c63 (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 91dd042b20210df0bb0461ebf09791e3c028ea86
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Mar 5 23:53:21 2014 +0100
gpl.cgi: Fix proper redirection so that the agreement has only to be accepted once.
-----------------------------------------------------------------------
Summary of changes:
html/cgi-bin/gpl.cgi | 33 ++++++++++++++++++++-------------
1 file changed, 20 insertions(+), 13 deletions(-)
Difference in files:
diff --git a/html/cgi-bin/gpl.cgi b/html/cgi-bin/gpl.cgi
index 5cfbebd..94187ce 100644
--- a/html/cgi-bin/gpl.cgi
+++ b/html/cgi-bin/gpl.cgi
@@ -29,28 +29,29 @@ require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
require "/opt/pakfire/lib/functions.pl";
-
-my %cgiparams;
-my $refresh;
-
+# If the license has already been accepted.
if ( -e "/var/ipfire/main/gpl_accepted" ) {
- print "Status: 302 Moved Temporarily\n";
- print "Location: index.cgi\n\n";
- exit (0);
+ &redirect();
}
-&Header::showhttpheaders();
+my %cgiparams;
$cgiparams{'ACTION'} = '';
+
&Header::getcgihash(\%cgiparams);
-&Header::openpage($Lang::tr{'main page'}, 1, $refresh);
-&Header::openbigbox('', 'center');
+# Check if the license agreement has been accepted.
+if ($cgiparams{'ACTION'} eq "$Lang::tr{'yes'}" && $cgiparams{'gpl_accepted'} eq '1') {
+ open(FILE, ">/var/ipfire/main/gpl_accepted");
+ close(FILE);
-# licence agreement
-if ($cgiparams{'ACTION'} eq $Lang::tr{'yes'} && $cgiparams{'gpl_accepted'} eq '1') {
- system('touch /var/ipfire/main/gpl_accepted');
+ &redirect();
}
+&Header::showhttpheaders();
+
+&Header::openpage($Lang::tr{'main page'}, 1);
+&Header::openbigbox('', 'center');
+
&Header::openbox('100%', 'left', $Lang::tr{'gpl license agreement'});
print <<END;
$Lang::tr{'gpl please read carefully the general public license and accept it below'}.
@@ -80,3 +81,9 @@ END
&Header::closebox();
&Header::closebigbox();
&Header::closepage();
+
+sub redirect {
+ print "Status: 302 Moved Temporarily\n";
+ print "Location: index.cgi\n\n";
+ exit (0);
+}
hooks/post-receive
--
IPFire 2.x development tree
reply other threads:[~2014-03-05 22:54 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=20140305225423.69CC120ACF@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