Commit ca0afe8a authored by Mac Newbold's avatar Mac Newbold

Make a global ADMINMODE var, for use when you don't have a uid handy

to call ISADMIN(uid) with.
parent 0ad152b3
...@@ -100,7 +100,7 @@ function GETUID() { ...@@ -100,7 +100,7 @@ function GETUID() {
# #
function CHECKLOGIN($uid) { function CHECKLOGIN($uid) {
global $TBAUTHCOOKIE, $HTTP_COOKIE_VARS, $TBAUTHTIMEOUT; global $TBAUTHCOOKIE, $HTTP_COOKIE_VARS, $TBAUTHTIMEOUT;
global $CHECKLOGIN_STATUS, $CHECKLOGIN_UID; global $CHECKLOGIN_STATUS, $CHECKLOGIN_UID, $ADMINMODE;
# #
# If we already figured this out, do not duplicate work! # If we already figured this out, do not duplicate work!
...@@ -238,6 +238,9 @@ function CHECKLOGIN($uid) { ...@@ -238,6 +238,9 @@ function CHECKLOGIN($uid) {
# #
if ($admin && !$adminoff) { if ($admin && !$adminoff) {
putenv("HTTP_WITH_TB_ADMIN_PRIVS=1"); putenv("HTTP_WITH_TB_ADMIN_PRIVS=1");
$ADMINMODE=1;
} else {
$ADMINMODE=0;
} }
return $CHECKLOGIN_STATUS; return $CHECKLOGIN_STATUS;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment