From 9c9876c210cb5f538f6ffc56958f96b0f5f588cb Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sat, 21 Aug 2010 22:47:23 -0400 Subject: [PATCH] Simplify --- ansel/lib/GalleryMode/Date.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ansel/lib/GalleryMode/Date.php b/ansel/lib/GalleryMode/Date.php index 1ab081ebe..576b432a6 100644 --- a/ansel/lib/GalleryMode/Date.php +++ b/ansel/lib/GalleryMode/Date.php @@ -49,11 +49,8 @@ class Ansel_GalleryMode_Date extends Ansel_GalleryMode_Base case 'image_captions': case 'faces': /* Only allowed when we are on a specific day */ - if (!empty($this->_date['day'])) { - return true; - } else { - return false; - } + return !empty($this->_date['day']); + default: return parent::hasFeature($feature); } @@ -72,7 +69,6 @@ class Ansel_GalleryMode_Date extends Ansel_GalleryMode_Base $day = !empty($this->_date['day']) ? $this->_date['day'] : 0; $trail = array(); - /* Do we have any date parts? */ if (!empty($year)) { if (!empty($day)) { @@ -108,9 +104,7 @@ class Ansel_GalleryMode_Date extends Ansel_GalleryMode_Base 'slug' => $this->_gallery->get('slug'), 'year' => $year); $trail[] = array('title' => $year, 'navdata' => $navdata); - } else { - // This is the first level of a date mode gallery. $navdata = array('view' => 'Gallery', 'gallery' => $this->_gallery->id, -- 2.11.0