1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

- fixing some bugs

- removed file_exists calls for auth plugins since they need to be there once set up


git-svn-id: file:///svn/phpbb/trunk@6228 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-08-02 15:53:19 +00:00
parent 48a48aa86d
commit b15a3111be
11 changed files with 205 additions and 180 deletions

View File

@@ -172,17 +172,10 @@ class session
// Load limit check (if applicable)
if ($config['limit_load'])
{
if (@file_exists('/proc/loadavg') && @is_readable('/proc/loadavg'))
if ($load = @file_get_contents('/proc/loadavg'))
{
if ($load = @file_get_contents('/proc/loadavg'))
{
$this->load = array_slice(explode(' ', $load), 0, 1);
$this->load = floatval($this->load[0]);
}
else
{
set_config('limit_load', '0');
}
$this->load = array_slice(explode(' ', $load), 0, 1);
$this->load = floatval($this->load[0]);
}
else
{
@@ -220,18 +213,14 @@ class session
// Check whether the session is still valid if we have one
$method = basename(trim($config['auth_method']));
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
if (file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
$method = 'validate_session_' . $method;
if (function_exists($method))
{
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
$method = 'validate_session_' . $method;
if (function_exists($method))
if (!$method($this->data))
{
if (!$method($this->data))
{
$session_expired = true;
}
$session_expired = true;
}
}
@@ -357,21 +346,17 @@ class session
}
$method = basename(trim($config['auth_method']));
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
if (file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
$method = 'autologin_' . $method;
if (function_exists($method))
{
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
$this->data = $method();
$method = 'autologin_' . $method;
if (function_exists($method))
if (sizeof($this->data))
{
$this->data = $method();
if (sizeof($this->data))
{
$this->cookie_data['k'] = '';
$this->cookie_data['u'] = $this->data['user_id'];
}
$this->cookie_data['k'] = '';
$this->cookie_data['u'] = $this->data['user_id'];
}
}
@@ -547,16 +532,12 @@ class session
// Allow connecting logout with external auth method logout
$method = basename(trim($config['auth_method']));
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
if (file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
$method = 'logout_' . $method;
if (function_exists($method))
{
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
$method = 'logout_' . $method;
if (function_exists($method))
{
$method($this->data);
}
$method($this->data);
}
if ($this->data['user_id'] != ANONYMOUS)