aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
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 /phpBB/includes/functions.php
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
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php59
1 files changed, 13 insertions, 46 deletions
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();
}