summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-06-07 05:11:09 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-06-07 05:11:09 -0700
commit4a6775f5d34d1f26eac7e7c70e12c54cf2d330ec (patch)
treeda5285eb79ce80e2d134ec8f6a7f6cc9530656a5 /modules/gallery/helpers
parent097ef934c6fe188cc368905ee72b7cca6ad2f755 (diff)
parent1d91e1b2dc8456681f9e38baaca1d191cff1ac7a (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/gallery_block.php4
-rw-r--r--modules/gallery/helpers/gallery_event.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php
index 08ce21b7..cb28cbcd 100644
--- a/modules/gallery/helpers/gallery_block.php
+++ b/modules/gallery/helpers/gallery_block.php
@@ -70,9 +70,9 @@ 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")) {
+ if (@is_readable("/proc/loadavg") && $first_line = current(@file("/proc/loadavg"))) {
$block->content->load_average =
- join(" ", array_slice(explode(" ", current(file("/proc/loadavg"))), 0, 3));
+ join(" ", array_slice(explode(" ", $first_line), 0, 3));
} else {
$block->content->load_average = t("Unavailable");
}
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index 89ad6a4c..ae7131ae 100644
--- a/modules/gallery/helpers/gallery_event.php
+++ b/modules/gallery/helpers/gallery_event.php
@@ -242,7 +242,7 @@ class gallery_event_Core {
$csrf = access::csrf_token();
$theme_item = $theme->item();
$page_type = $theme->page_type();
- if ($item->is_photo() && graphics::can("rotate")) {
+ if ($can_edit && $item->is_photo() && graphics::can("rotate")) {
$options_menu
->append(
Menu::factory("ajax_link")