diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-11-18 13:09:10 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-11-18 13:09:10 -0800 |
commit | c1573d8ef2e34429a67a69c3ad947505a5772931 (patch) | |
tree | 695db973514fcf02e46e20e6f7368247a7ae3c6b | |
parent | 8d030cea64c0e5934e4dbf5fc56fab87c7e253bb (diff) |
Use sys_getloadavg() instead of reading /proc/loadavg. Fixes #1491.
-rw-r--r-- | modules/gallery/helpers/gallery_block.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php index cb28cbcd..3e2a7313 100644 --- a/modules/gallery/helpers/gallery_block.php +++ b/modules/gallery/helpers/gallery_block.php @@ -70,12 +70,7 @@ class gallery_block_Core { $block->css_id = "g-platform"; $block->title = t("Platform information"); $block->content = new View("admin_block_platform.html"); - if (@is_readable("/proc/loadavg") && $first_line = current(@file("/proc/loadavg"))) { - $block->content->load_average = - join(" ", array_slice(explode(" ", $first_line), 0, 3)); - } else { - $block->content->load_average = t("Unavailable"); - } + $block->content->load_average = join(" ", sys_getloadavg()); break; case "project_news": |