mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
replace constants with class constants.
ACL_YES, ACL_NO, ACL_NEVER, USER_NORMAL, USER_IGNORE, USER_INACTIVE, USER_FOUNDER git-svn-id: file:///svn/phpbb/trunk@9233 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -89,9 +89,9 @@ abstract class phpbb_session
|
||||
// Set auth to false (only valid for an user object)
|
||||
$this->auth = false;
|
||||
|
||||
// Some system/server variables, directly generated by phpbb_system methods. Used like an array.
|
||||
// Some system/server variables, directly generated by phpbb_system_info methods. Used like an array.
|
||||
// We use the phpbb:: one, because it could've been modified and being a completely different class
|
||||
$this->system = &phpbb::$instances['system'];
|
||||
$this->system =& phpbb::$instances['server-vars'];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -223,7 +223,7 @@ abstract class phpbb_session
|
||||
$sql = 'SELECT u.*
|
||||
FROM ' . USERS_TABLE . ' u, ' . SESSIONS_KEYS_TABLE . ' k
|
||||
WHERE u.user_id = ' . (int) $this->cookie_data['u'] . '
|
||||
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ")
|
||||
AND u.user_type IN (' . phpbb::USER_NORMAL . ', ' . phpbb::USER_FOUNDER . ")
|
||||
AND k.user_id = u.user_id
|
||||
AND k.key_id = '" . phpbb::$db->sql_escape(md5($this->cookie_data['k'])) . "'";
|
||||
$result = phpbb::$db->sql_query($sql);
|
||||
@@ -240,7 +240,7 @@ abstract class phpbb_session
|
||||
$sql = 'SELECT *
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_id = ' . (int) $this->cookie_data['u'] . '
|
||||
AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';
|
||||
AND user_type IN (' . phpbb::USER_NORMAL . ', ' . phpbb::USER_FOUNDER . ')';
|
||||
$result = phpbb::$db->sql_query($sql);
|
||||
$this->data = phpbb::$db->sql_fetchrow($result);
|
||||
phpbb::$db->sql_freeresult($result);
|
||||
@@ -351,7 +351,7 @@ abstract class phpbb_session
|
||||
// session exists in which case session_id will also be set
|
||||
|
||||
// Is user banned? Are they excluded? Won't return on ban, exists within method
|
||||
if ($this->data['user_type'] != USER_FOUNDER)
|
||||
if ($this->data['user_type'] != phpbb::USER_FOUNDER)
|
||||
{
|
||||
if (!phpbb::$config['forwarded_for_check'])
|
||||
{
|
||||
@@ -1092,7 +1092,7 @@ abstract class phpbb_session
|
||||
phpbb::$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$this->is_registered = ($this->data['user_id'] != ANONYMOUS && ($this->data['user_type'] == USER_NORMAL || $this->data['user_type'] == USER_FOUNDER)) ? true : false;
|
||||
$this->is_registered = ($this->data['user_id'] != ANONYMOUS && ($this->data['user_type'] == phpbb::USER_NORMAL || $this->data['user_type'] == phpbb::USER_FOUNDER)) ? true : false;
|
||||
$this->is_bot = (!$this->is_registered && $this->data['user_id'] != ANONYMOUS) ? true : false;
|
||||
$this->data['user_lang'] = basename($this->data['user_lang']);
|
||||
|
||||
|
Reference in New Issue
Block a user