aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm/index.php
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2008-06-02 17:15:43 +0000
committerHenry Sudhof <kellanved@phpbb.com>2008-06-02 17:15:43 +0000
commitd0cd2152ff810e2cf724ea206b9a0934e08795e2 (patch)
tree8f5f0a73b8bbba8ab44062f2ab51e8a7ae96e1ee /phpBB/adm/index.php
parent8039c37b5126742c4170a8b17a645021f940f26a (diff)
downloadforums-d0cd2152ff810e2cf724ea206b9a0934e08795e2.tar
forums-d0cd2152ff810e2cf724ea206b9a0934e08795e2.tar.gz
forums-d0cd2152ff810e2cf724ea206b9a0934e08795e2.tar.bz2
forums-d0cd2152ff810e2cf724ea206b9a0934e08795e2.tar.xz
forums-d0cd2152ff810e2cf724ea206b9a0934e08795e2.zip
give the ACP a login screen
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8581 89ea8834-ac86-4346-8a33-228a782c2dd0
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']}/",