summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2014-02-26 04:42:04 +0100
committerMichael Tänzer <neo@nhng.de>2014-02-26 04:42:04 +0100
commitf8ce545d2ccc6da0189cff5415466254b6a73385 (patch)
tree0e96ef3ee182e8a8b9d18aa62a12d04106eaa2d5
parent4c796ed294a75925d6b0116873672ab75611ca4b (diff)
downloadcacert-devel-f8ce545d2ccc6da0189cff5415466254b6a73385.tar.gz
cacert-devel-f8ce545d2ccc6da0189cff5415466254b6a73385.tar.xz
cacert-devel-f8ce545d2ccc6da0189cff5415466254b6a73385.zip
bug 1192: Store oldlocation for convenience of the user and improve coding
style Signed-off-by: Michael Tänzer <neo@nhng.de>
-rw-r--r--includes/loggedin.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/loggedin.php b/includes/loggedin.php
index cfd064f..4054f5f 100644
--- a/includes/loggedin.php
+++ b/includes/loggedin.php
@@ -166,10 +166,11 @@
exit;
}
- if (!isset($_SESSION['profile']['ccaagreement']) || !$_SESSION['profile']['ccaagreement'] == True) {
+ if (!isset($_SESSION['profile']['ccaagreement']) || !$_SESSION['profile']['ccaagreement']) {
$_SESSION['profile']['ccaagreement']=get_user_agreement_status($_SESSION['profile']['id'],'CCA');
- if ($_SESSION['profile']['ccaagreement'] == FALSE) {
- header("location: https://".$_SERVER['HTTP_HOST']."/index.php?id=52");
+ if (!$_SESSION['profile']['ccaagreement']) {
+ $_SESSION['_config']['oldlocation'] = $_SERVER['REQUEST_URI'];
+ header("Location: https://{$_SERVER['HTTP_HOST']}/index.php?id=52");
exit;
}
}