This should probably be a protected method
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 10 Nov 2009 21:04:51 +0000 (16:04 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 10 Nov 2009 21:04:51 +0000 (16:04 -0500)
ansel/lib/View/Base.php
ansel/lib/View/EmbeddedRenderer/GalleryLink.php
ansel/lib/View/EmbeddedRenderer/Mini.php
ansel/lib/View/Gallery.php
ansel/lib/View/Image.php

index df8ec70..86a9c5d 100644 (file)
@@ -58,7 +58,7 @@ abstract class Ansel_View_Base
      * @return Ansel_Gallery  The requested Ansel_Gallery object
      * @throws Horde_Exception
      */
-    public function &getGallery($galleryId = null, $slug = '')
+    protected function &_getGallery($galleryId = null, $slug = '')
     {
         if (is_null($galleryId) && empty($slug)) {
             $galleryId = !empty($this->_params['gallery_id']) ? $this->_params['gallery_id'] : null;
index 13b1198..20e027a 100644 (file)
@@ -54,9 +54,9 @@ class Ansel_View_EmbeddedRenderer_GalleryLink extends Ansel_View_Gallery
         foreach ($galleries as $identifier) {
             try {
                 if ($haveSlugs) {
-                    $gallery = $this->getGallery(null, $identifier);
+                    $gallery = $this->_getGallery(null, $identifier);
                 } else {
-                    $gallery = $this->getGallery($identifier);
+                    $gallery = $this->_getGallery($identifier);
                 }
             } catch (Horde_Exception $e) {
                 Horde::logMessage($e->getMessage(), __FILE__, __LINE__, PEAR_LOG_ERR);
index a243862..bc77bba 100644 (file)
@@ -49,7 +49,7 @@ class Ansel_View_EmbeddedRenderer_Mini extends Ansel_View_Gallery
             $images = explode(':', $images);
         } else {
             try {
-                $this->gallery = $this->getGallery($gallery_id, $gallery_slug);
+                $this->gallery = $this->_getGallery($gallery_id, $gallery_slug);
             } catch (Horde_Exception $e) {
                 Horde::logMessage($e->getMessage(), __FILE__, __LINE__, PEAR_LOG_ERR);
                 exit;
index 0b0ef84..b55dd22 100644 (file)
@@ -75,11 +75,11 @@ class Ansel_View_Gallery extends Ansel_View_Base
         parent::__construct($params);
 
         if (!empty($params['gallery_slug'])) {
-            $this->gallery = $this->getGallery(null, $params['gallery_slug']);
+            $this->gallery = $this->_getGallery(null, $params['gallery_slug']);
         } elseif (!empty($params['gallery_id'])) {
-            $this->gallery = $this->getGallery($params['gallery_id']);
+            $this->gallery = $this->_getGallery($params['gallery_id']);
         } else {
-            $this->gallery = $this->getGallery();
+            $this->gallery = $this->_getGallery();
         }
 
         // Check user age
index 1a8d35c..63e2612 100644 (file)
@@ -35,7 +35,7 @@ class Ansel_View_Image extends Ansel_View_Base
         $image = &$GLOBALS['ansel_storage']->getImage($params['image_id']);
 
         /* Get the Ansel_Gallery */
-        $this->gallery = $this->getGallery();
+        $this->gallery = $this->_getGallery();
 
         /* Save the image reference */
         $this->resource = $image;