From 188cc0a14ebed9a178d363b451f422bac8e1b487 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 22 May 2005 17:36:48 +0000 Subject: [PATCH] r190: Only show the navigation bar if we have a valid admin session. We can now check if we have one by checking the value of $bugsys->userinfo['adminsession'] (only accessible in the admin/ directory, though) --- admin/global.php | 3 +++ includes/adminfunctions.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/admin/global.php b/admin/global.php index df8947f..2397764 100755 --- a/admin/global.php +++ b/admin/global.php @@ -70,6 +70,8 @@ function admin_login() // ################################################################### +$bugsys->userinfo['adminsession'] = false; + if ($_COOKIE[COOKIE_PREFIX . 'adminsession']) { if (can_perform('canadminpanel')) @@ -83,6 +85,7 @@ if ($_COOKIE[COOKIE_PREFIX . 'adminsession']) { // renew the cookie $funct->cookie(COOKIE_PREFIX . 'adminsession', md5(md5($bugsys->userinfo['authkey']) . md5($bugsys->userinfo['email']) . md5($bugsys->userinfo['userid'])), false); + $bugsys->userinfo['adminsession'] = true; } } else diff --git a/includes/adminfunctions.php b/includes/adminfunctions.php index 69ff049..f70cc25 100755 --- a/includes/adminfunctions.php +++ b/includes/adminfunctions.php @@ -76,7 +76,7 @@ EOD; echo "\n\t" . (($extra) ? "\n$extra" : ''); echo "\n\n\n"; - if (!defined('HIDE_SETUP') AND $bugsys->userinfo['userid']) + if (!defined('HIDE_SETUP') AND $bugsys->userinfo['adminsession']) { global $globalnav; -- 2.43.5