aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2008-06-04 11:40:53 +0000
committerHenry Sudhof <kellanved@phpbb.com>2008-06-04 11:40:53 +0000
commit80f123acb32eaf4c7a0766ddca916f42f4b01bbe (patch)
tree98c48070cd4b00968da094564f17a5fc2bc18a41
parentd46b1392b7ff3676978125b415389f99a98c2370 (diff)
downloadforums-80f123acb32eaf4c7a0766ddca916f42f4b01bbe.tar
forums-80f123acb32eaf4c7a0766ddca916f42f4b01bbe.tar.gz
forums-80f123acb32eaf4c7a0766ddca916f42f4b01bbe.tar.bz2
forums-80f123acb32eaf4c7a0766ddca916f42f4b01bbe.tar.xz
forums-80f123acb32eaf4c7a0766ddca916f42f4b01bbe.zip
Too much for a minor; sorry
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8591 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/adm/index.php11
-rwxr-xr-xphpBB/adm/style/acp_login.html46
-rw-r--r--phpBB/adm/style/overall_header.html2
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/functions.php59
-rw-r--r--phpBB/language/en/acp/common.php1
6 files changed, 15 insertions, 105 deletions
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php
index 00acd1359a..c0fa2fdddb 100644
--- a/phpBB/adm/index.php
+++ b/phpBB/adm/index.php
@@ -28,14 +28,10 @@ $user->setup('acp/common');
// End session management
// Have they authenticated (again) as an admin for this session?
-if ($user->data['user_id'] != ANONYMOUS && (!isset($user->data['session_admin']) || !$user->data['session_admin']))
+if (!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
@@ -112,7 +108,7 @@ function adm_page_header($page_title)
$template->assign_vars(array(
'PAGE_TITLE' => $page_title,
- 'USERNAME' => ($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '',
+ 'USERNAME' => $user->data['username'],
'SID' => $SID,
'_SID' => $_SID,
@@ -124,9 +120,6 @@ 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']}/",
diff --git a/phpBB/adm/style/acp_login.html b/phpBB/adm/style/acp_login.html
deleted file mode 100755
index 015f3ec908..0000000000
--- a/phpBB/adm/style/acp_login.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!-- INCLUDE overall_header.html -->
-<h1>{PAGE_TITLE}</h1>
-<p><!-- IF LOGIN_EXPLAIN -->{LOGIN_EXPLAIN}<!-- ELSE -->{L_LOGIN}<!-- ENDIF --></p>
-
-<!-- IF LOGIN_ERROR -->
- <div class="errorbox">
- <h3>{L_WARNING}</h3>
- <p>{LOGIN_ERROR}</p>
- </div>
-<!-- ENDIF -->
-<form action="{S_LOGIN_ACTION}" method="post" id="login">
-
- <fieldset>
- <dl>
- <dt><label for="{USERNAME_CREDENTIAL}">{L_USERNAME}:</label></dt>
- <dd><input type="text" tabindex="1" name="{USERNAME_CREDENTIAL}" id="{USERNAME_CREDENTIAL}" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
- </dl>
- <dl>
- <dt><label for="{PASSWORD_CREDENTIAL}">{L_PASSWORD}:</label></dt>
- <dd><input type="password" tabindex="2" id="{PASSWORD_CREDENTIAL}" name="{PASSWORD_CREDENTIAL}" size="25" class="inputbox autowidth" /></dd>
- <!-- IF S_DISPLAY_FULL_LOGIN and (U_SEND_PASSWORD or U_RESEND_ACTIVATION) -->
- <!-- IF U_SEND_PASSWORD --><dd><a href="{U_SEND_PASSWORD}">{L_FORGOT_PASS}</a></dd><!-- ENDIF -->
- <!-- IF U_RESEND_ACTIVATION --><dd><a href="{U_RESEND_ACTIVATION}">{L_RESEND_ACTIVATION}</a></dd><!-- ENDIF -->
- <!-- ENDIF -->
- </dl>
-
- <!-- IF S_CONFIRM_CODE -->
- <dl>
- <dt><label for="confirm_code">{L_CONFIRM_CODE}:</label><br /><span>{L_CONFIRM_CODE_EXPLAIN}</span></dt>
- <dd><input type="hidden" name="confirm_id" value="{CONFIRM_ID}" />{CONFIRM_IMAGE}</dd>
- <dd><input type="text" name="confirm_code" id="confirm_code" size="8" maxlength="8" tabindex="3" class="inputbox narrow" title="{L_CONFIRM_CODE}" /></dd>
- </dl>
- <!-- ENDIF -->
-
- <p class="submit-buttons">
- <!-- IF S_DISPLAY_FULL_LOGIN -->
- <!-- IF S_AUTOLOGIN_ENABLED --><label for="autologin"><input type="checkbox" name="autologin" id="autologin" tabindex="4" /> {L_LOG_ME_IN}</label><!-- ENDIF -->
- <label for="viewonline"><input type="checkbox" name="viewonline" id="viewonline" tabindex="5" /> {L_HIDE_ME}</label>
- <!-- ENDIF -->
- &nbsp;
- {S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" />
- </p>
- </fieldset>
-</form>
-
-<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index adafc0aa6d..5294a101f9 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -186,7 +186,6 @@ function switch_menu()
<!-- ENDIF -->
<div id="menu">
<p><!-- IF S_USER_LOGGED_IN --> {L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [&nbsp;<a href="{U_LOGOUT}">{L_LOGOUT}</a>&nbsp;]<!-- ENDIF --><!-- IF S_USER_ADMIN -->[&nbsp;<a href="{U_ADM_LOGOUT}">{L_ADM_LOGOUT}</a>&nbsp;]<!-- ENDIF --></p>
- <!-- IF S_USER_ADMIN -->
<ul>
<!-- BEGIN l_block1 -->
<!-- IF l_block1.S_SELECTED -->
@@ -204,7 +203,6 @@ function switch_menu()
<!-- ENDIF -->
<!-- END l_block1 -->
</ul>
- <!-- ENDIF -->
</div>
<div id="main">
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 52e983c1e1..e0fb51610b 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -110,7 +110,6 @@
<li>[Change] Show email ban reason on registration. Additionally allow custom errors properly returned if using validate_data(). (Bug #26885)</li>
<li>[Feature] Streamlined banning via the MCP by adding a ban link to the user profile. Also pre-fills ban fields as far as possible.</li>
<li>[Feature] Added ACP logout to reset an admin session.</li>
- <li>[Feature] Handle ACP logins with admin style</li>
</ul>
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index f000236027..600506d08f 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2234,7 +2234,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
*/
function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
{
- global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $phpbb_admin_path, $config;
+ global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
$err = '';
@@ -2243,16 +2243,6 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
{
$user->setup();
}
-
- if (defined('ADMIN_START'))
- {
- // Set custom template for admin area
- $template->set_custom_template($phpbb_admin_path . 'style', 'admin');
- $template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
-
- // the acp template is never stored in the database
- $user->theme['template_storedb'] = false;
- }
// Print out error if user tries to authenticate as an administrator without having the privileges...
if ($admin && !$auth->acl_get('a_'))
@@ -2420,7 +2410,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
// If we are not within the admin directory we use the page dir...
$redirect = '';
- if (!$admin && !defined('ADMIN_START'))
+ if (!$admin)
{
$redirect .= ($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '';
}
@@ -2453,47 +2443,24 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),
'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false,
- 'S_LOGIN_ACTION' => (!$admin && !defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("index.$phpEx", false, true, $user->session_id), // Needs to stay index.$phpEx because we are within the admin directory
+ 'S_LOGIN_ACTION' => (!$admin) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("index.$phpEx", false, true, $user->session_id), // Needs to stay index.$phpEx because we are within the admin directory
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_ADMIN_AUTH' => $admin,
- 'S_ACP_LOGIN' => defined('ADMIN_START'),
'USERNAME' => ($admin) ? $user->data['username'] : '',
'USERNAME_CREDENTIAL' => 'username',
'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password',
));
-
- if (defined('ADMIN_START'))
- {
- $template->set_filenames(array(
- 'body' => 'acp_login.html')
- );
- $template->assign_block_vars('t_block1', array(
- 'L_TITLE' => $user->lang['LOGIN'],
- 'S_SELECTED' => true,
- 'U_TITLE' => '',
- ));
- adm_page_header($user->lang['LOGIN'], false);
- }
- else
- {
- $template->set_filenames(array(
- 'body' => 'login_body.html')
- );
- page_header($user->lang['LOGIN'], false);
- }
-
+
+ page_header($user->lang['LOGIN'], false);
+
+ $template->set_filenames(array(
+ 'body' => 'login_body.html')
+ );
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
- if (defined('ADMIN_START') && isset($user->data['session_admin']) && $user->data['session_admin'])
- {
- adm_page_footer();
- }
- else
- {
- page_footer();
- }
-
+
+ page_footer();
}
/**
@@ -3095,7 +3062,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
if (!defined('HEADER_INC'))
{
- if (defined('ADMIN_START') || (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin']))
+ if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])
{
adm_page_header($msg_title);
}
@@ -3119,7 +3086,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
// We do not want the cron script to be called on error messages
define('IN_CRON', true);
- if (defined('ADMIN_START') || (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin']))
+ if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])
{
adm_page_footer();
}
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 41ade70855..9ed92bfcfb 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -239,7 +239,6 @@ $lang = array_merge($lang, array(
'LOOK_UP_FORUM' => 'Select a forum',
'LOOK_UP_FORUMS_EXPLAIN'=> 'You are able to select more than one forum.',
- 'LOGIN_REDIRECT' => 'You have been successfully logged in.',
'MANAGE' => 'Manage',
'MENU_TOGGLE' => 'Hide or display the side menu',
'MOVE_DOWN' => 'Move down',