From: Michael J. Rubinsky Date: Thu, 10 Dec 2009 18:52:42 +0000 (-0500) Subject: This code only matters if $thumbsize is prettythumb, don't bother X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2eebc66208180e5e3ad7c6226949b88379aabd02;p=horde.git This code only matters if $thumbsize is prettythumb, don't bother if it's thumb --- 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); } }