fix display of gallery grouping 'mini' tiles.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 9 Sep 2010 14:37:57 +0000 (10:37 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 9 Sep 2010 14:37:57 +0000 (10:37 -0400)
Fixes issue that caused more then 4 mini tiles to be displayed.

ansel/templates/group/owner.inc

index 1f63a04..b9454d3 100644 (file)
@@ -26,12 +26,14 @@ $link = Ansel::getUrlFor('view', array('groupby' => $groupby,
                                        'owner' => $group,
                                        'view' => 'List'))->link();
 
-$num_galleries = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->countGalleries($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW,
-                                                                                                $group, null, false);
+$num_galleries = $GLOBALS['injector']->getInstance('Ansel_Storage')
+    ->getScope()
+    ->countGalleries($GLOBALS['registry']->getAuth(), Horde_Perms::SHOW, $group, null, false);
+
 if ($num_galleries < 5) {
     $mini_galleries = $GLOBALS['injector']->
         getInstance('Ansel_Storage')->
-        getScope()->listGalleries(array('filter' => $group));
+        getScope()->listGalleries(array('filter' => $group, 'allLevels' => false));
 } else {
     $mini_galleries = $GLOBALS['injector']
         ->getInstance('Ansel_Storage')
@@ -42,7 +44,6 @@ if ($num_galleries < 5) {
 }
 $mini_galleries = array_values($mini_galleries);
 ?>
-
 <td class="galleryGroupsTile" width="<?php echo round(100 / $prefs->getValue('tilesperrow')) ?>%" valign="top">
  <table>
   <tr>