Re: Another Bug

Michael Rubinsky <[email protected]> Thu, 24 Jul 2008 11:56:40 -0400
Newsgroups gmane.comp.horde.ansel
Message-ID <[email protected]>
Quoting David Cummings <[email protected]>:

> Thanx!!! Found another while calling getGalleries:
> Notice:  Undefined property:  Ansel_Gallery::$_data in  
> /srv/vhost/sites/www.metal.com/apps/ansel/lib/api.php on line 787
> The offending code is:
> $galleries[$gallery->id] = $gallery->_data;
> And sure enough Ansel_Gallery doesn't have that attribute; my guess  
> was that line was intended to just return the $gallery itself so I  
> patched it:
> $galleries[$gallery->id] = $gallery; //$gallery->_data;

Actually, that was already fixed in the same patch that I pointed you  
to in the last email. If you've updated from CVS, then you should have  
that fix.  Incidentally, it should be $gallery->data, not $gallery.   
(data is an inherited property from the hierarchical share object.


>
> I'm hoping this is what was intended as after I made the changes I  
> was able to keep coding with the  data I wanted being returned which  
> in this case was simply an object of Ansel_Gallery for my gallery.

Actually, we explicitly do *not* return an Ansel_Gallery object here,  
just the data that describes it's attributes since calling most of the  
Ansel_Gallery object's methods will fail outside of Ansel's scope.


>
> Also, I didn't follow the last post; it was stated that the bug in  
> Ansel was corrected but when I re installed the latest HEAD the  
> correction wasn't there so I had to patch based on what was on the  
> link you sent (Mike). Obviously I've msunderstood something.

Strange. According to cvs, the change is there:
http://cvs.horde.org/diff.php/ansel/lib/Ansel.php?r1=1.468&r2=1.469
http://cvs.horde.org/diff.php/ansel/lib/api.php?r1=1.97&r2=1.98

> Lastly; I'm unclear on how the 'page' attribute works for methods  
> like getGalleries;

What method, exactly, are you referring to?  
Ansel_Storage::getGalleries() does not take a page parameter, neither  
does the api method getGalleries().


Thanks,
mike

--
The Horde Project (www.horde.org)
[email protected]

"Time just hates me. That's why it made me an adult." - Josh Joplin

--
ansel mailing list - Join the hunt: http://horde.org/bounties/#ansel
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBIiKY4TW0K6bINYV4RAqJxAJ4taCCwESXgo7VakHFxopnM2w2+qgCeOhw+
mp8+gaVWaUeN7YYc5gwAElo=
=fB5z
-----END PGP SIGNATURE-----