[dev] Re: Horde_Share patch
Ben Chavet
ben at chavet.net
Thu Oct 28 09:04:06 PDT 2004
Quoting Jan Schneider <jan at horde.org>:
> Zitat von Chuck Hagenbuch <chuck at horde.org>:
>
>> Quoting Ben Chavet <ben at chavet.net>:
>>
>>> My patch works remarkably well for what I need to do, even if it
>>> isn'tsupposed
>>> to :) Just send a string $owner to listGalleries which then
>>> trickles through
>>> all of the calls & then grabs all galleries belonging to $owner.
>>>
>>> getShareCriteria is the critical call for that functionallity,
>>> though. So, I'm
>>> thinking that we probably just need to do some extra checks there
>>> to make it
>>> reliable. Is there a way to check for ($owner == true) vs. (owner ==
>>> 'some-string')? If so, we could do some variant of:
>>>
>>> if ($owner == true)
>>> get all shares belonging to $userid
>>> else if ($owner == 'johndoe')
>>> get all shares belonging to 'johndoe'
>>
>> Like Jan, I dislike overriding the parameter. I think it would be
>> reasonable to
>> change what $owner is, though - to make it a string containing a userid
>> instead
>> of a boolean, and for the logic to be that if it's non-null, then we
>> only return
>> shares that $userid can access that $owner owns. That means that to get the
>> current behavior of setting $owner to true, we'd need to update
>> calls to just
>> pass the same value that's passed for $userid as $owner (instead of
>> true). That
>> seems consistent to me and gives Ben what he needs.
>>
>> Any objections?
>
> Not from me, as long as the patch contains fixes for all listShares() calls
> in all modules.
>
> Jan.
Now that the new GTA game is out, I suddenly find myself shorter on time :)
But, I'll work on this & send it in when I'm done.
--Ben
More information about the dev
mailing list