summaryrefslogtreecommitdiff
path: root/modules/digibug/helpers
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-07-08 00:29:37 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-07-08 00:29:37 +0000
commitc83650d83ad8b1f4bda30cac2ae8efa6e1c97287 (patch)
tree482cf980e87cd7c80c28a89bb9395eba6b53026f /modules/digibug/helpers
parenta0b0b415515bff5f9edd43d373e8e78f3b3f8e4d (diff)
parent9d66783f47636153bf3661d1d89e694dd5188c36 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/digibug/helpers')
-rw-r--r--modules/digibug/helpers/digibug_event.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/digibug/helpers/digibug_event.php b/modules/digibug/helpers/digibug_event.php
index cf7cdf21..413bf586 100644
--- a/modules/digibug/helpers/digibug_event.php
+++ b/modules/digibug/helpers/digibug_event.php
@@ -26,14 +26,17 @@ class digibug_event_Core {
->url(url::site("admin/digibug")));
}
- static function photo_menu($menu, $theme) {
+ static function site_menu($menu, $theme) {
$item = $theme->item();
- $menu->append(Menu::factory("link")
- ->id("digibug")
- ->label(t("Print with Digibug"))
- ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf"))
- ->css_id("g-print-digibug-link")
- ->css_class("g-print-digibug-link ui-icon-print"));
+ if ($item && $item->type == "photo") {
+ $menu->get("options_menu")
+ ->append(Menu::factory("link")
+ ->id("digibug")
+ ->label(t("Print with Digibug"))
+ ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf"))
+ ->css_id("g-print-digibug-link")
+ ->css_class("g-print-digibug-link ui-icon-print"));
+ }
}
static function context_menu($menu, $theme, $item) {