From: Michael J. Rubinsky Date: Mon, 31 Jan 2011 14:21:21 +0000 (-0500) Subject: Galleries are referred to by id in Ansel, not name X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=dde2209ccc36b477750dbed1f3717f02fc50ff34;p=horde.git Galleries are referred to by id in Ansel, not name --- diff --git a/ansel/lib/Block/recent_comments.php b/ansel/lib/Block/recent_comments.php index eb5c60089..35f74a065 100644 --- a/ansel/lib/Block/recent_comments.php +++ b/ansel/lib/Block/recent_comments.php @@ -44,8 +44,8 @@ class Horde_Block_ansel_recent_comments extends Horde_Block if (empty($GLOBALS['conf']['gallery']['listlimit']) || ($storage->countGalleries($GLOBALS['registry']->getAuth(), Horde_Perms::READ) < $GLOBALS['conf']['gallery']['listlimit'])) { - foreach ($storage->listGalleries(array('perm' => Horde_Perms::READ)) as $id => $gal) { - $params['gallery']['values'][$id] = $gal->get('name'); + foreach ($storage->listGalleries(array('perm' => Horde_Perms::READ)) as $gal) { + $params['gallery']['values'][$gal->getId()] = $gal->get('name'); } } diff --git a/ansel/lib/Block/recently_added.php b/ansel/lib/Block/recently_added.php index 49d0e5473..359607786 100644 --- a/ansel/lib/Block/recently_added.php +++ b/ansel/lib/Block/recently_added.php @@ -47,9 +47,9 @@ class Horde_Block_ansel_recently_added extends Horde_Block if (empty($GLOBALS['conf']['gallery']['listlimit']) || ($GLOBALS['injector']->getInstance('Ansel_Storage')->countGalleries($GLOBALS['registry']->getAuth(), Horde_Perms::READ) < $GLOBALS['conf']['gallery']['listlimit'])) { - foreach ($GLOBALS['injector']->getInstance('Ansel_Storage')->listGalleries(array('perm' => Horde_Perms::READ)) as $id => $gal) { + foreach ($GLOBALS['injector']->getInstance('Ansel_Storage')->listGalleries(array('perm' => Horde_Perms::READ)) as $gal) { if (!$gal->hasPasswd() && $gal->isOldEnough()) { - $params['gallery']['values'][$id] = $gal->get('name'); + $params['gallery']['values'][$gal->getId()] = $gal->get('name'); } } }