diff options
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/gallery_block.php | 4 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_event.php | 2 |
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") |