[dev] Re: Horde_Share patch

Ben Chavet ben at chavet.net
Tue Oct 26 22:35:48 PDT 2004


I see.

My patch works remarkably well for what I need to do, even if it isn't 
supposed
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'

Thoughts?

--Ben

Quoting Chuck Hagenbuch <chuck at horde.org>:

> Quoting Ben Chavet <ben at chavet.net>:
>
>> if $owner is boolean, then how are you supposed to supply an owner?
>
> You don't. In fact, I looked closer and reverted the 2nd part of the
> patch too.
> The way the function is written, $owner is a boolean saying to *only* return
> shares that $userid owns if true. If it's false, it returns all shares that
> $userid has access to. $userid is the only username passed in. As the 
> function
> parameters say:
>
>       * @param boolean $owner      Only return shares that $userid owns.
>
> I can see what you're trying to get at, and would be open to changing things
> around to make that possible, but this isn't how the function is written or
> documented.
>
> -chuck
>
> -- "But she goes not abroad in search of monsters to destroy." - John
> Quincy Adams
>
> -- 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
>




More information about the dev mailing list