From d32702db0bf5d51825c0465a980e4565749fd64c Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Wed, 11 Nov 2009 15:13:26 -0500 Subject: [PATCH] Don't show widgets when viewing via the api, remove deprecated function call --- ansel/lib/View/GalleryRenderer/Base.php | 2 +- ansel/lib/View/GalleryRenderer/GalleryLightbox.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ansel/lib/View/GalleryRenderer/Base.php b/ansel/lib/View/GalleryRenderer/Base.php index ee55e2c73..3a279935c 100644 --- a/ansel/lib/View/GalleryRenderer/Base.php +++ b/ansel/lib/View/GalleryRenderer/Base.php @@ -144,7 +144,7 @@ abstract class Ansel_View_GalleryRenderer_Base } /* Include any widgets */ - if (!empty($this->style['widgets'])) { + if (!empty($this->style['widgets']) && !$this->view->api) { /* Special case widgets - these are built in */ if (array_key_exists('Actions', $this->style['widgets'])) { /* Don't show action widget if no actions */ diff --git a/ansel/lib/View/GalleryRenderer/GalleryLightbox.php b/ansel/lib/View/GalleryRenderer/GalleryLightbox.php index 7b75d7bc1..0cd2dd8a1 100644 --- a/ansel/lib/View/GalleryRenderer/GalleryLightbox.php +++ b/ansel/lib/View/GalleryRenderer/GalleryLightbox.php @@ -135,7 +135,6 @@ class Ansel_View_GalleryRenderer_GalleryLightbox extends Ansel_View_GalleryRende if (!empty($this->view->api)) { Ansel::attachStylesheet('lightbox.css', true); $includes = new Horde_Script_Files(); - $includes->disableAutoloadHordeJS(); $includes->_add('accesskeys.js', 'horde', true, true); $includes->_add('effects.js', 'horde', true, true); $includes->_add('lightbox.js', 'ansel', true, true); -- 2.11.0