mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-06 06:25:04 +02:00
doubleval for load config, session to user var name change
git-svn-id: file:///svn/phpbb/trunk@2994 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
29f583c626
commit
da3121c0fd
@ -36,7 +36,7 @@ if (defined('DEBUG'))
|
||||
exit;
|
||||
}
|
||||
|
||||
$debug_output = sprintf('<br /><br />[ Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . ( ( $config['gzip_compress'] ) ? 'On' : 'Off' ) . ' | Load : ' . (($session->load) ? $session->load : 'N/A'), $totaltime);
|
||||
$debug_output = sprintf('<br /><br />[ Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . ( ( $config['gzip_compress'] ) ? 'On' : 'Off' ) . ' | Load : ' . (($user->load) ? $user->load : 'N/A'), $totaltime);
|
||||
|
||||
if ($auth->acl_get('a_'))
|
||||
{
|
||||
@ -47,7 +47,7 @@ if (defined('DEBUG'))
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PHPBB_VERSION' => $config['version'],
|
||||
'ADMIN_LINK' => ( $auth->acl_get('a_') ) ? '<a href="' . "admin/index.$phpEx?sid=" . $user->data['session_id'] . '">' . $user->lang['Admin_panel'] . '</a><br /><br />' : '',
|
||||
'ADMIN_LINK' => ($auth->acl_get('a_')) ? '<a href="' . "admin/index.$phpEx?sid=" . $user->data['session_id'] . '">' . $user->lang['Admin_panel'] . '</a><br /><br />' : '',
|
||||
'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : ''
|
||||
));
|
||||
|
||||
|
@ -64,13 +64,13 @@ class session
|
||||
}
|
||||
|
||||
// Load limit check (if applicable)
|
||||
if ( intval($config['limit_load']) && file_exists('/proc/loadavg') )
|
||||
if ( doubleval($config['limit_load']) && file_exists('/proc/loadavg') )
|
||||
{
|
||||
if ( $load = @file('/proc/loadavg') )
|
||||
{
|
||||
list($this->load) = explode(' ', $load[0]);
|
||||
|
||||
if ( $this->load > intval($config['limit_load']) )
|
||||
if ( $this->load > doubleval($config['limit_load']) )
|
||||
{
|
||||
trigger_error('Board_unavailable');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user