[dev] [cvs] commit: ansel/lib/Block gallery.php

Kevin M. Myer kevin_myer at iu13.org
Sat Sep 10 11:50:05 PDT 2005


Quoting "Marcus I. Ryan" <marcus at horde.org>:

> marcus      2005-09-08 21:48:38 PDT
>
>  Added files:
>    lib/Block            gallery.php
>  Log:
>  Add a new Ansel block that supports both selecting an individual gallery,
>  and selecting a random gallery.  This was derived from random_gallery
>  and deprecates it, but random_gallery is being left for sites already
>  using it.

This adds exactly what I was trying to figure out how to do, which is always
display the same gallery.  I only have one gallery of photos, of my soon-to-be
1-year old, but since switching from the random gallery block to this gallery
block  I've run into an issue:

If I choose the gallery, only the portal blocks to the left and above 
the ansel
block display on the portal page, and the ansel block errors out on PHP Fatal
error:  Call to a member function on a non-object in
/horde/ansel/lib/Block/gallery.php on line 53

This patch works but I'm not sure if its right:

Index: gallery.php
===================================================================
RCS file: /repository/ansel/lib/Block/gallery.php,v
retrieving revision 1.1
diff -u -r1.1 gallery.php
--- gallery.php 9 Sep 2005 04:48:37 -0000       1.1
+++ gallery.php 10 Sep 2005 18:40:54 -0000
@@ -50,7 +50,7 @@
         if (isset($this->_params['gallery']) && $this->_params['gallery'] ==
'__random') {
             $name = _("Random Gallery") . ": " . $gal->get('name');
         } else {
-            $name = $_gallery->get('name');
+            $name = $gal->get('name');
         }

         $viewurl = Horde::applicationUrl(Util::addParameter('view.php',
'gallery', $gal->getId()));

Kevin
-- 
Kevin M. Myer
Senior Systems Administrator
Lancaster-Lebanon Intermediate Unit 13  http://www.iu13.org




More information about the dev mailing list