diff options
author | jhilden <jakobhilden@gmail.com> | 2009-08-28 11:27:38 -0400 |
---|---|---|
committer | jhilden <jakobhilden@gmail.com> | 2009-08-28 11:27:38 -0400 |
commit | c0c65c6fcc971b1ea9c0afb75854aec502591d56 (patch) | |
tree | 4b10c7011056002cdeb41fac215e5c608278333c /modules/slideshow/helpers/slideshow_event.php | |
parent | 3d2e36f5b601b5a274efd0c55bf161448409682a (diff) | |
parent | 826e104fa98eca33afd8cb59ebf8123021145609 (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) { |