summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-12-26 13:21:16 -0800
committerBharat Mediratta <bharat@menalto.com>2009-12-26 13:21:16 -0800
commite885ca161f1cff1c8b57190915dd42146c33bf66 (patch)
tree3b332b61c666eb5ab6771b64716eb982bf0ad47d
parent32d25dafd5b033338b6a9bb8c7c53edab462543a (diff)
Reuse $theme->item() for our descendants_count() call.
-rw-r--r--modules/slideshow/helpers/slideshow_event.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/slideshow/helpers/slideshow_event.php b/modules/slideshow/helpers/slideshow_event.php
index 9b77dd42..39bd8fda 100644
--- a/modules/slideshow/helpers/slideshow_event.php
+++ b/modules/slideshow/helpers/slideshow_event.php
@@ -31,9 +31,7 @@ class slideshow_event_Core {
}
static function album_menu($menu, $theme) {
- $descendants_count = ORM::factory("item", $theme->item()->id)
- ->descendants_count(array(array("type", "=", "photo")));
- if ($descendants_count > 1) {
+ if ($theme->item()->descendants_count(array(array("type", "=", "photo")))) {
$menu->append(Menu::factory("link")
->id("slideshow")
->label(t("View slideshow"))