[dev] More Ansel share stuff...
Michael Rubinsky
mike at theupstairsroom.com
Mon Aug 7 14:53:54 PDT 2006
Quoting Chuck Hagenbuch <chuck at horde.org>:
> Quoting Michael Rubinsky <mike at theupstairsroom.com>:
>
>> If accessing Ansel strictly through the api, it is impossible to
>> list shares of only a certain parent share by using the $parent
>> parameter of the Ansel::listGalleries() method - unless we already
>> have the unique share_name of the parent...which would be unlikely
>> since there is currently no way to retrieve it through the Ansel
>> api. I guess the only real solution (unless this functionality
>> isn't seen as that important) would be to add another new method to
>> the api to retrieve the share_name by datatree_id. I really
>> don't like the idea of having to access the same data by two
>> different keys though...
>
> Change the listGalleries API call to do the translation from
> datatree id to parent. Or change Ansel::listGalleries().
Seeing how eventually we need the share_name for the
$this->_datatree->getByAttributes() call in Share.php, I guess it
makes sense to leave Ansel::listGalleries() the way it is (expecting
the share_name) since it is already working everywhere but with the
api. I'll change the api call to treat $parent as a datatree_id and
lookup the share_name from the datatree_id UNLESS $parent ==
DATATREE_ROOT - in this case, we can just pass it through.
How does this sound? A quick look with grep only shows the
images/listGalleries method being called with the default values for
$parent so this shouldn't affect any existing code...
> -chuck
>
> --
> "we are plastered to the windshield of the bus that is time." - Chris
>
> --
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
Thanks,
mike
--
The Horde Project (www.horde.org)
mrubinsk at horde.org
More information about the dev
mailing list