* @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;
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);
$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;
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
$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;