diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-08-28 13:48:54 -0600 |
---|---|---|
committer | Chad Kieffer <ckieffer@gmail.com> | 2009-08-28 13:48:54 -0600 |
commit | 5a2853bca1ea9a9231e01814df9aa373bf50d19c (patch) | |
tree | 431264bfb9de1d8bbdc6a9ba7775a363381f96e8 /modules/slideshow/helpers/slideshow_event.php | |
parent | f1e008a14f2dfb51d1204dad3deb19e2e3df16c8 (diff) | |
parent | 6dcfdb6432d556f43736d60de8f310f247868bfa (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/slideshow/helpers/slideshow_event.php')
-rw-r--r-- | modules/slideshow/helpers/slideshow_event.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/modules/slideshow/helpers/slideshow_event.php b/modules/slideshow/helpers/slideshow_event.php index cf79f71a..1b881de4 100644 --- a/modules/slideshow/helpers/slideshow_event.php +++ b/modules/slideshow/helpers/slideshow_event.php @@ -31,13 +31,17 @@ class slideshow_event_Core { } static function album_menu($menu, $theme) { - $menu - ->append(Menu::factory("link") - ->id("slideshow") - ->label(t("View slideshow")) - ->url("javascript:PicLensLite.start(" . - "{maxScale:0,feedUrl:PicLensLite.indexFeeds()[0].url})") - ->css_id("gSlideshowLink")); + $descendants_count = ORM::factory("item", $theme->item->id) + ->descendants_count(array("type" => "photo")); + if ($descendants_count > 1) { + $menu + ->append(Menu::factory("link") + ->id("slideshow") + ->label(t("View slideshow")) + ->url("javascript:PicLensLite.start(" . + "{maxScale:0,feedUrl:PicLensLite.indexFeeds()[0].url})") + ->css_id("gSlideshowLink")); + } } static function photo_menu($menu, $theme) { |