From 2eebc66208180e5e3ad7c6226949b88379aabd02 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 10 Dec 2009 13:52:42 -0500 Subject: [PATCH] This code only matters if $thumbsize is prettythumb, don't bother if it's thumb --- ansel/lib/View/EmbeddedRenderer/GalleryLink.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ansel/lib/View/EmbeddedRenderer/GalleryLink.php b/ansel/lib/View/EmbeddedRenderer/GalleryLink.php index abb117675..ced12c246 100644 --- a/ansel/lib/View/EmbeddedRenderer/GalleryLink.php +++ b/ansel/lib/View/EmbeddedRenderer/GalleryLink.php @@ -66,14 +66,6 @@ class Ansel_View_EmbeddedRenderer_GalleryLink extends Ansel_View_Gallery return ''; } - /*If a gallery_style is not specified, default to the gallery's - * defined style. Note that this only matters if the $thumbsize - * parameter is set to 'prettythumb' anyway. - */ - $gallery_style = empty($this->_params['style']) ? - $gallery->get('style') : - $this->_params['style']; - /* Ideally, since gallery default images are unique in that each style * needs it's own unique image_id, the thumbsize and style parameters * are mutually exclusive - specifying a specific gallery style is only @@ -83,6 +75,10 @@ class Ansel_View_EmbeddedRenderer_GalleryLink extends Ansel_View_Gallery if ($thumbsize == 'thumb') { $images[] = $gallery->getDefaultImage('ansel_default'); } else { + // Default to gallery's defined style if not provided. + $gallery_style = empty($this->_params['style']) ? + $gallery->get('style') : + $this->_params['style']; $images[] = $gallery->getDefaultImage($gallery_style); } } -- 2.11.0