From dde2209ccc36b477750dbed1f3717f02fc50ff34 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 31 Jan 2011 09:21:21 -0500 Subject: [PATCH] Galleries are referred to by id in Ansel, not name --- ansel/lib/Block/recent_comments.php | 4 ++-- ansel/lib/Block/recently_added.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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'); } } } -- 2.11.0