aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/session.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r--phpBB/includes/session.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 6571ff1433..73d9c83374 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -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