[dev] [cvs] commit: turba/lib Turba.php api.php turba/lib/Driver share.php

Michael Rubinsky mike at theupstairsroom.com
Tue Oct 2 14:03:37 UTC 2007


Quoting Gunnar Wrobel <wrobel at pardus.de>:

> "Michael Rubinsky" <mike at theupstairsroom.com> writes:
>
>> mrubinsk    2007-08-16 14:40:14 EDT
>>
>>   Modified files:
>>     lib                  Turba.php api.php
>>     lib/Driver           share.php
>>   Log:
>>   When calling removeUserData() for a share enabled source -
>>
>>   - Remove the entries from the backend storage
>>   - Remove the share from the share system
>>
>>   I've tested this and it seems to be ok, but would appreciate  
>> someone else trying this out also, since we are nuking data!
>>
>>   Revision  Changes    Path
>>   1.7       +6 -3      turba/lib/Driver/share.php
>>   1.151     +18 -15    turba/lib/Turba.php
>>   1.217     +25 -7     turba/lib/api.php
>>
>>   Chora Links:
>>    
>> http://cvs.horde.org/diff.php/turba/lib/Driver/share.php?r1=1.6&r2=1.7&ty=u
>
> The change
>
> -            $sourceName = $this->getName();
> +            $sourceName = $this->getContactOwner();
>
> seems strange to me. This gave me a problem with the Kolab driver
> since I had warning in there that triggered once the function gets
> called with a $sourceName argument other than the current share.
>
> I assumed that deleteAll should only get called after the driver got
> instantiated with an existing addressbook. This is at least what
> happens when I delete a share at the moment. The code will create a
> driver object with and will call deleteAll() on it without arguments
> in wich case all the elements in the share the driver is currently
> working with are being deleted.
>
> Now the deleteAll call gets the owner of the share delivered as a
> default which seems incorrect. The Kolab driver currently just
> disregards the value.

No. Turba_Driver_share::getContactOwner() *does* return the owner of  
the share, but that value is only the username for default shares.   
Otherwise, it's the share name (the datatree_name field - it's been a  
while, can't remember the correct nomenclature).  So for example, for  
user-created shares, getContactOwner will return  
'bf2475f95f727cce3a64a65695d73dfc' - and the underlaying storage  
driver uses *this* value as the address book name to delete.

Hope this answers your question, I've been out of the "turba mode" for  
a little now, so I'm a bit rusty on the particulars....I'm thinking of  
getting a T-Shirt made that says "I survived the Turba share rewrite" :)


Thanks,
mike

--
The Horde Project (www.horde.org)
mrubinsk at horde.org

"Time just hates me. That's why it made me an adult." - Josh Joplin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: PGP Digital Signature
Url : http://lists.horde.org/archives/dev/attachments/20071002/4d9e7e4b/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 2013 bytes
Desc: PGP Public Key
Url : http://lists.horde.org/archives/dev/attachments/20071002/4d9e7e4b/attachment-0001.bin 


More information about the dev mailing list