aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/adm/index.php')
-rw-r--r--phpBB/adm/index.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php
index c0fa2fdddb..83c4044687 100644
--- a/phpBB/adm/index.php
+++ b/phpBB/adm/index.php
@@ -28,10 +28,14 @@ $user->setup('acp/common');
// End session management
// Have they authenticated (again) as an admin for this session?
-if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
+if ($user->data['user_id'] != ANONYMOUS && (!isset($user->data['session_admin']) || !$user->data['session_admin']))
{
login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
}
+else if ($user->data['user_id'] == ANONYMOUS)
+{
+ login_box();
+}
// Is user any type of admin? No, then stop here, each script needs to
// check specific permissions but this is a catchall
@@ -108,7 +112,7 @@ function adm_page_header($page_title)
$template->assign_vars(array(
'PAGE_TITLE' => $page_title,
- 'USERNAME' => $user->data['username'],
+ 'USERNAME' => ($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '',
'SID' => $SID,
'_SID' => $_SID,
@@ -120,6 +124,9 @@ function adm_page_header($page_title)
'U_ADM_INDEX' => append_sid("{$phpbb_admin_path}index.$phpEx"),
'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"),
+ 'S_USER_ADMIN' => $user->data['session_admin'],
+ 'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS && !$user->data['is_bot']),
+
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
'T_SMILIES_PATH' => "{$phpbb_root_path}{$config['smilies_path']}/",
'T_AVATAR_PATH' => "{$phpbb_root_path}{$config['avatar_path']}/",