mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 03:04:09 +02:00
bah, group handling needs some further discussion ... I'm done with it for M-2
git-svn-id: file:///svn/phpbb/trunk@4440 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -71,9 +71,9 @@ class session
|
||||
}
|
||||
|
||||
// Load limit check (if applicable)
|
||||
if (doubleval($config['limit_load']) && @file_exists('/proc/loadavg'))
|
||||
if (@file_exists('/proc/loadavg'))
|
||||
{
|
||||
if ($load = @file('/proc/loadavg'))
|
||||
if ($config['limit_load'] && $load = @file('/proc/loadavg'))
|
||||
{
|
||||
list($this->load) = explode(' ', $load[0]);
|
||||
|
||||
@@ -398,6 +398,8 @@ class user extends session
|
||||
var $lang_path;
|
||||
var $img_lang;
|
||||
|
||||
var $keyoptions = array('viewimg', 'notify', 'notify_pm', 'popup_pm', 'viewflash', 'viewsmilies', 'viewsigs', 'viewavatars', 'viewcensors', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmile', 'allowavatar', 'allow_pm', 'allow_email', 'allow_viewonline', 'allow_viewemail', 'allow_massemail');
|
||||
|
||||
function setup($lang_set = false, $style = false)
|
||||
{
|
||||
global $db, $template, $config, $auth, $phpEx, $phpbb_root_path;
|
||||
@@ -539,6 +541,45 @@ class user extends session
|
||||
}
|
||||
return $imgs[$img];
|
||||
}
|
||||
|
||||
// Start code for checking/setting option bit field for user table (if we go that way)
|
||||
// TODO
|
||||
// array_search begone
|
||||
// set values, blah, everything else
|
||||
function option_set($key, $value = false)
|
||||
{
|
||||
if (is_array($key))
|
||||
{
|
||||
if (is_array($value))
|
||||
{
|
||||
$return = array();
|
||||
foreach ($key as $k)
|
||||
{
|
||||
$return[$key] = ($user->data['user_options'] & pow(2, array_search($key, $this->keyoptions))) ? true : false;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
else
|
||||
{
|
||||
$return = array();
|
||||
foreach ($key as $k)
|
||||
{
|
||||
$return[$key] = ($user->data['user_options'] & pow(2, array_search($key, $this->keyoptions))) ? true : false;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($value !== false)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
return ($user->data['user_options'] & pow(2, array_search($key, $this->keyoptions))) ? true : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Will be keeping my eye of 'other products' to ensure these things don't
|
||||
|
Reference in New Issue
Block a user