mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-10 10:44:20 +02:00
- introduce new function build_url to easily build a valid url from the user->page object as well as optionally removing certain keys
- changed attachment config to utilize the config build methods - cleaned up posting.php - the submit/delete_post functions are now usable (functions_posting.php) - adjusted header icons (transparency) - a bunch of fixes for mssql - bug fixes git-svn-id: file:///svn/phpbb/trunk@5902 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -139,7 +139,8 @@ class session
|
||||
// Why no forwarded_for et al? Well, too easily spoofed. With the results of my recent requests
|
||||
// it's pretty clear that in the majority of cases you'll at least be left with a proxy/cache ip.
|
||||
$this->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : '';
|
||||
|
||||
$this->load = false;
|
||||
|
||||
// Load limit check (if applicable)
|
||||
if ($config['limit_load'])
|
||||
{
|
||||
@@ -149,11 +150,6 @@ class session
|
||||
{
|
||||
$this->load = array_slice(explode(' ', $load), 0, 1);
|
||||
$this->load = floatval($this->load[0]);
|
||||
|
||||
if ($config['limit_load'] && $this->load > floatval($config['limit_load']))
|
||||
{
|
||||
trigger_error('BOARD_UNAVAILABLE');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1043,13 +1039,21 @@ class user extends session
|
||||
$this->img_lang = (file_exists($phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . $this->lang_name)) ? $this->lang_name : $config['default_lang'];
|
||||
|
||||
// Is board disabled and user not an admin or moderator?
|
||||
// @todo new ACL enabling board access while offline?
|
||||
if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_'))
|
||||
{
|
||||
$message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
// Is load exceeded?
|
||||
if ($config['limit_load'] && $this->load !== false)
|
||||
{
|
||||
if ($this->load > floatval($config['limit_load']) && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_'))
|
||||
{
|
||||
trigger_error('BOARD_UNAVAILABLE');
|
||||
}
|
||||
}
|
||||
|
||||
// Does the user need to change their password? If so, redirect to the
|
||||
// ucp profile reg_details page ... of course do not redirect if we're
|
||||
// already in the ucp
|
||||
|
Reference in New Issue
Block a user