From d5167c4c5a3b7ad9eae9b7a7d0c7d07d51e15d5c Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sat, 21 Aug 2010 23:25:20 -0400 Subject: [PATCH] Simplify block title when showing all galleries --- ansel/lib/Block/recently_added.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ansel/lib/Block/recently_added.php b/ansel/lib/Block/recently_added.php index 00b2a6d13..8d49123ff 100644 --- a/ansel/lib/Block/recently_added.php +++ b/ansel/lib/Block/recently_added.php @@ -68,24 +68,18 @@ class Horde_Block_ansel_recently_added extends Horde_Block return Ansel::getUrlFor('view', array('view' => 'List'), true)->link() . _("Gallery") . ''; } - // Build the gallery name. - if (isset($this->_params['gallery'])) { - $name = @htmlspecialchars($gallery->get('name'), ENT_COMPAT, - $GLOBALS['registry']->getCharset()); - } - + $name = @htmlspecialchars($gallery->get('name'), ENT_COMPAT, $GLOBALS['registry']->getCharset()); $style = $gallery->getStyle(); $viewurl = Ansel::getUrlFor('view', array('slug' => $gallery->get('slug'), 'gallery' => $gallery->id, 'view' => 'Gallery'), true); + return sprintf(_("Recently Added Photos From %s"), $viewurl->link() . $name . ''); } else { $viewurl = Ansel::getUrlFor('view', array('view' => 'List'), true); - $name = _("All Galleries"); + return _("Recently Added Photos"); } - - return sprintf(_("Recently Added Photos From %s"), $viewurl->link() . $name . ''); } /** -- 2.11.0