From fe9e4aefffc176596639e1b5ffb23439a76c58de Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 17 Jun 2010 15:25:44 -0400 Subject: [PATCH] use Horde_Support_Array --- ansel/lib/Storage.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ansel/lib/Storage.php b/ansel/lib/Storage.php index 34f68cf9e..2833f0176 100644 --- a/ansel/lib/Storage.php +++ b/ansel/lib/Storage.php @@ -904,17 +904,18 @@ class Ansel_Storage */ public function listGalleries($params = array()) { + $params = new Horde_Support_Array($params); try { $shares = $this->_shares->listShares( $GLOBALS['registry']->getAuth(), - (empty($params['perm']) ? Horde_Perms::SHOW : $params['perm']), - (empty($params['filter']) ? null : $params['filter']), - (empty($params['from']) ? 0 : $params['from']), - (empty($params['count']) ? 0 : $params['count']), - (empty($params['sort_by']) ? null : $params['sort_by']), - (empty($params['direction']) ? Ansel::SORT_ASCENDING : $params['direction']), - (empty($params['parent']) ? null : $params['parent']), - (!array_key_exists('allLevels', $params) ? true : $params['allLevels'])); + $params->get('perm', Horde_Perms::SHOW), + $params->get('filter', null), + $params->get('from', 0), + $params->get('count', 0), + $params->get('sort_by', null), + $params->get('direction', Ansel::SORT_ASCENDING), + $params->get('parent', null), + $params->get('allLevels', true)); } catch (Horde_Share_Exception $e) { throw new Ansel_Exception($e); } -- 2.11.0