aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2008-04-20 05:13:34 +0000
committerDavid M <davidmj@users.sourceforge.net>2008-04-20 05:13:34 +0000
commit3613ddf523f6e555e8095f1d0f995fa44a99da6f (patch)
tree41332582045b02af750113cc771d12fba8950350 /phpBB
parent3cced0db7ee5364ab959bf2261bdbf8a2585928a (diff)
downloadforums-3613ddf523f6e555e8095f1d0f995fa44a99da6f.tar
forums-3613ddf523f6e555e8095f1d0f995fa44a99da6f.tar.gz
forums-3613ddf523f6e555e8095f1d0f995fa44a99da6f.tar.bz2
forums-3613ddf523f6e555e8095f1d0f995fa44a99da6f.tar.xz
forums-3613ddf523f6e555e8095f1d0f995fa44a99da6f.zip
#21255
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8509 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/session.php4
2 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index c6143196c2..35b6d45e8d 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -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] 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>[Change] Generalize load check (Bug #21255 / thanks to Xipher)</li>
</ul>
<a name="v300"></a><h3>1.ii. Changes since 3.0.0</h3>
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index da54a6c512..08f6512424 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -217,9 +217,9 @@ class session
// Load limit check (if applicable)
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]);
}
else