mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
fix admin_session "bug"
git-svn-id: file:///svn/phpbb/trunk@5083 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
7253ee19ca
commit
b57ccb8cb9
7 changed files with 18 additions and 16 deletions
|
@ -34,7 +34,7 @@ if ($user->data['user_id'] == ANONYMOUS)
|
|||
}
|
||||
|
||||
// Have they authenticated (again) as an admin for this session?
|
||||
if (!isset($user->data['session_admin']))
|
||||
if (!$user->data['session_admin'])
|
||||
{
|
||||
login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
|
||||
}
|
||||
|
|
|
@ -1442,7 +1442,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
|||
|
||||
if (!defined('HEADER_INC'))
|
||||
{
|
||||
if (defined('IN_ADMIN') && !empty($user->data['session_admin']))
|
||||
if (defined('IN_ADMIN') && $user->data['session_admin'])
|
||||
{
|
||||
adm_page_header('', '', false);
|
||||
}
|
||||
|
@ -1456,7 +1456,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
|||
$msg_title = (!isset($msg_title)) ? $user->lang['INFORMATION'] : ((!empty($user->lang[$msg_title])) ? $user->lang[$msg_title] : $msg_title);
|
||||
$display_header = (!isset($display_header)) ? false : (bool) $display_header;
|
||||
|
||||
if (defined('IN_ADMIN') && !empty($user->data['session_admin']))
|
||||
if (defined('IN_ADMIN') && $user->data['session_admin'])
|
||||
{
|
||||
adm_page_message($msg_title, $msg_text, $display_header);
|
||||
adm_page_footer();
|
||||
|
@ -1524,7 +1524,7 @@ function page_header($page_title = '')
|
|||
// Get users online list ... if required
|
||||
$l_online_users = $online_userlist = $l_online_record = '';
|
||||
|
||||
if (!empty($config['load_online']) && !empty($config['load_online_time']))
|
||||
if ($config['load_online'] && $config['load_online_time'])
|
||||
{
|
||||
$userlist_ary = $userlist_visible = array();
|
||||
$logged_visible_online = $logged_hidden_online = $guests_online = $prev_user_id = 0;
|
||||
|
@ -1650,6 +1650,10 @@ function page_header($page_title = '')
|
|||
$l_online_time = ($config['load_online_time'] == 1) ? 'VIEW_ONLINE_TIME' : 'VIEW_ONLINE_TIMES';
|
||||
$l_online_time = sprintf($user->lang[$l_online_time], $config['load_online_time']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_online_time = '';
|
||||
}
|
||||
|
||||
$l_privmsgs_text = $l_privmsgs_text_unread = '';
|
||||
$s_privmsg_new = false;
|
||||
|
|
|
@ -316,7 +316,6 @@ class custom_profile
|
|||
break;
|
||||
|
||||
case FIELD_DROPDOWN:
|
||||
print_r($field_data['field_novalue']);
|
||||
if ($field_value == $field_data['field_novalue'] && $field_data['field_required'])
|
||||
{
|
||||
return 'FIELD_REQUIRED';
|
||||
|
|
|
@ -357,7 +357,7 @@ class session
|
|||
$db->sql_query($sql);
|
||||
|
||||
// Reset some basic data immediately
|
||||
$this->session_id = $this->data['username'] = '';
|
||||
$this->session_id = $this->data['username'] = $this->data['user_permissions'] = '';
|
||||
$this->data['user_id'] = ANONYMOUS;
|
||||
$this->data['session_admin'] = 0;
|
||||
|
||||
|
|
|
@ -163,7 +163,6 @@ class template
|
|||
$this->files[$handle] = $phpbb_root_path . 'styles/' . $user->theme['secondary']['template_path'] . '/template/' . $this->filename[$handle];
|
||||
}
|
||||
|
||||
$str = '';
|
||||
if ($user->theme[$this->tpl]['template_storedb'])
|
||||
{
|
||||
$sql = 'SELECT * FROM ' . STYLES_TPLDATA_TABLE . '
|
||||
|
|
Loading…
Add table
Reference in a new issue