[ansel] Problem with sub-galleries and XP-publishing???
Heath S. Hendrickson
heath at outerspaceconsultants.com
Fri Mar 19 19:02:52 PST 2004
Ben Chavet wrote:
>oops, that was my fault. i will look at it tomorrow... --ben
>
>Quoting "Heath S. Hendrickson" <heath at outerspaceconsultants.com>:
>
>
>
No problem. I noticed that a new version was checked it to try and fix
it, but it didn's work with groupby='owner'... attached is a fixed
version that takes into account the fact that listGalleries() sets the
keys different depending on the grouping... This should allow for the
extension of groupby to other types in the future as well...
h
-------------- next part --------------
Index: view.php
===================================================================
RCS file: /usr/local/horde/cvs/ansel/view.php,v
retrieving revision 1.43
diff -u -r1.43 view.php
--- view.php 20 Mar 2004 02:19:51 -0000 1.43
+++ view.php 20 Mar 2004 02:59:53 -0000
@@ -154,13 +154,20 @@
require ANSEL_TEMPLATES . '/view/subgallery_header.inc';
require ANSEL_TEMPLATES . '/list/gallery_headers.inc';
- foreach ($galleries['list']['galleries'] as $galleryId => $gallery) {
- $viewurl = Horde::applicationUrl(Util::addParameter('view.php', 'gallery', $galleryId));
- $slideurl = Horde::applicationUrl(Util::addParameter('slideshow.php', 'gallery', $galleryId));
- $galleryurl = Util::addParameter('gallery.php', 'gallery', $galleryId);
- $zipurl = Horde::applicationUrl(Util::addParameter($galleryurl, 'actionID', 'downloadzip'));
+ if ($prefs->getValue('groupby') == 'owner') {
+ $keys = array_keys($galleries);
+ } else {
+ $keys = array( 'list' );
+ }
+ foreach ($keys as $id => $key) {
+ foreach ($galleries[$key]['galleries'] as $galleryId => $gallery) {
+ $viewurl = Horde::applicationUrl(Util::addParameter('view.php', 'gallery', $galleryId));
+ $slideurl = Horde::applicationUrl(Util::addParameter('slideshow.php', 'gallery', $galleryId));
+ $galleryurl = Util::addParameter('gallery.php', 'gallery', $galleryId);
+ $zipurl = Horde::applicationUrl(Util::addParameter($galleryurl, 'actionID', 'downloadzip'));
- require ANSEL_TEMPLATES . '/list/gallery_summaries.inc';
+ require ANSEL_TEMPLATES . '/list/gallery_summaries.inc';
+ }
}
require ANSEL_TEMPLATES . '/list/gallery_footers.inc';
require ANSEL_TEMPLATES . '/view/subgallery_footer.inc';
More information about the ansel
mailing list