1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-20 23:41:29 +02:00

- fixing some bugs, containing fixes for anonymous username displays, eaccelerator issue, permission trace and a few smaller bugs.

git-svn-id: file:///svn/phpbb/trunk@5858 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-04-29 01:18:57 +00:00
parent 656274cd57
commit 7bc05c5e24
22 changed files with 332 additions and 236 deletions

View File

@@ -139,16 +139,28 @@ class session
$this->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : '';
// Load limit check (if applicable)
if (@file_exists('/proc/loadavg') && @is_readable('/proc/loadavg'))
if ($config['limit_load'])
{
if ($load = @file_get_contents('/proc/loadavg'))
if (@file_exists('/proc/loadavg') && @is_readable('/proc/loadavg'))
{
$this->load = floatval(array_slice(explode(' ', $load), 0, 1));
if ($config['limit_load'] && $this->load > floatval($config['limit_load']))
if ($load = @file_get_contents('/proc/loadavg'))
{
trigger_error('BOARD_UNAVAILABLE');
$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
{
set_config('limit_load', '0');
}
}
else
{
set_config('limit_load', '0');
}
}
@@ -1075,7 +1087,7 @@ class user extends session
{
global $SID;
if (strpos($this->page['page_query'], 'mode=reg_details') !== false && $this->page['page_name'] == "ucp.$phpEx")
if (strpos($this->page['query_string'], 'mode=reg_details') !== false && $this->page['page_name'] == "ucp.$phpEx")
{
redirect("ucp.$phpEx$SID&i=profile&mode=reg_details");
}