git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8509 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M 2008-04-20 05:13:34 +00:00
parent 3cced0db7e
commit 3613ddf523
2 changed files with 3 additions and 2 deletions

View file

@ -90,6 +90,7 @@
<li>[Fix] Made the compress_tar class tolerate archives that do not properly have their archived contents listed (Bug #14429 / thanks to JRSweets for his patch)</li> <li>[Fix] Made the compress_tar class tolerate archives that do not properly have their archived contents listed (Bug #14429 / thanks to JRSweets for his patch)</li>
<li>[Fix] Moved topics should not count towards the number of topics in a forum (Bug #14648 / thanks to Schumi for his patch)</li> <li>[Fix] Moved topics should not count towards the number of topics in a forum (Bug #14648 / thanks to Schumi for his patch)</li>
<li>[Fix] Properly check for invalid characters in MySQL DB prefixes during install (Bug #18775)</li> <li>[Fix] Properly check for invalid characters in MySQL DB prefixes during install (Bug #18775)</li>
<li>[Change] Generalize load check (Bug #21255 / thanks to Xipher)</li>
</ul> </ul>
<a name="v300"></a><h3>1.ii. Changes since 3.0.0</h3> <a name="v300"></a><h3>1.ii. Changes since 3.0.0</h3>

View file

@ -217,9 +217,9 @@ class session
// Load limit check (if applicable) // Load limit check (if applicable)
if ($config['limit_load'] || $config['limit_search_load']) if ($config['limit_load'] || $config['limit_search_load'])
{ {
if ($load = @file_get_contents('/proc/loadavg')) if ((function_exists('sys_getloadavg') && $load = sys_getloadavg()) || ($load = explode(' ', @file_get_contents('/proc/loadavg'))))
{ {
$this->load = array_slice(explode(' ', $load), 0, 1); $this->load = array_slice($load, 0, 1);
$this->load = floatval($this->load[0]); $this->load = floatval($this->load[0]);
} }
else else