1
0

Make sure the album contains photos before displaying the slideshow link.

This commit is contained in:
rWatcher 2011-12-14 23:45:14 -05:00
parent 7aae256e95
commit 92fef908f4
2 changed files with 18 additions and 14 deletions

View File

@ -49,6 +49,7 @@ class minislideshow_event_Core {
static function album_menu($menu, $theme) {
// Add an option to access the slideshow from the album view.
if ($theme->item()->children_count(array(array("type", "=", "photo")))) {
$menu
->append(Menu::factory("link")
->id("minislideshow")
@ -57,6 +58,7 @@ class minislideshow_event_Core {
->css_class("g-dialog-link")
->css_id("g-mini-slideshow-link"));
}
}
static function photo_menu($menu, $theme) {
// Add an option to access the slideshow from the photo view.

View File

@ -49,6 +49,7 @@ class minislideshow_event_Core {
static function album_menu($menu, $theme) {
// Add an option to access the slideshow from the album view.
if ($theme->item()->children_count(array(array("type", "=", "photo")))) {
$menu
->append(Menu::factory("link")
->id("minislideshow")
@ -57,6 +58,7 @@ class minislideshow_event_Core {
->css_class("g-dialog-link")
->css_id("g-mini-slideshow-link"));
}
}
static function photo_menu($menu, $theme) {
// Add an option to access the slideshow from the photo view.