From: Michael J. Rubinsky Date: Fri, 21 Jan 2011 15:50:32 +0000 (-0500) Subject: Return an empty array, not an empty string X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0fea3f2b18bfad91aa99b2864c9e5e7909a85b1f;p=horde.git Return an empty array, not an empty string --- diff --git a/ansel/lib/Storage.php b/ansel/lib/Storage.php index f31136b31..dee5fdd57 100644 --- a/ansel/lib/Storage.php +++ b/ansel/lib/Storage.php @@ -875,11 +875,7 @@ class Ansel_Storage } - if (count($json)) { - return Horde_Serialize::serialize($json, Horde_Serialize::JSON); - } - - return ''; + return Horde_Serialize::serialize($json, Horde_Serialize::JSON); } /** diff --git a/ansel/lib/View/EmbeddedRenderer/Mini.php b/ansel/lib/View/EmbeddedRenderer/Mini.php index d315a6d3e..07d0662c4 100644 --- a/ansel/lib/View/EmbeddedRenderer/Mini.php +++ b/ansel/lib/View/EmbeddedRenderer/Mini.php @@ -19,28 +19,24 @@ class Ansel_View_EmbeddedRenderer_Mini extends Ansel_View_Gallery */ public function html() { - /* Required */ + // Required $node = $this->_params['container']; if (empty($node)) { return ''; } - /* Optional */ + // Optional $gallery_slug = !empty($this->_params['gallery_slug']) ? $this->_params['gallery_slug'] : ''; $gallery_id = !empty($this->_params['gallery_id']) ? $this->_params['gallery_id']: null; - $start = (isset($this->_params['start'])) ? $this->_params['start'] : 0; $count = (isset($this->_params['count'])) ? $this->_params['count'] : 0; $perpage = (isset($this->_params['perpage'])) ? $this->_params['perpage'] : 0; $thumbsize = (!empty($this->_params['thumbsize'])) ? $this->_params['thumbsize'] : 'mini'; - // Limit to these image views only. - if ($thumbsize != 'mini' && $thumbsize != 'thumb' && - $thumbsize != 'screen') { - + if ($thumbsize != 'mini' && $thumbsize != 'thumb' && $thumbsize != 'screen') { $thumbsize = 'mini'; } - /* An image list instead of a gallery? */ + // An image list instead of a gallery? $images = (!empty($this->_params['images'])) ? $this->_params['images'] : array(); if (!empty($images)) { // Images are filtered for age and password protected galleries