[dev] Fwd: Re: Splitting the share driver

Michael Rubinsky mike at theupstairsroom.com
Tue Aug 8 08:08:39 PDT 2006


Forwarding to list...

----- Forwarded message from wrobel at pardus.de -----
     Date: Tue, 08 Aug 2006 10:20:26 +0200
     From: Gunnar Wrobel <wrobel at pardus.de>
  Subject: Re: [dev] Splitting the share driver
       To: mrubinsk at horde.org

Michael Rubinsky <mike at theupstairsroom.com> writes:

> Quoting Gunnar Wrobel <wrobel at pardus.de>:
>
>>> I don't know of anywhere in Horde that uses the share's display name
>>> as a unique identifier.  I think you are thinking of the Datatree_Id
>>> and the unique share_name.
>>
>> There is actually a place where shares are referred by name. Nag does
>> this for example in task.php when moving tasks from one tasklist to
>> the other. This is one of the problems for the kolab driver at the
>> moment since I need to derive the unique id from the display
>> name. Could the $share->move() function be modified to accept only
>> ids?
>
> Unless I am mis-reading something, a quick glance at that code shows
> that it is using the unique share_name (as most of the other
> applications also do) to retrieve the share, not the display name.
> Yes, the user selects the share display name from the drop down, but
> the value that is passed in the form is the unique share_name, not the
> display name.  Again, share display names are not unique...at least
> not currently. And, quite honestly, I don't see how they can be made
> to be unique without usability problems.

Once again you are right :) Looks like I was not really using my head
yesterday. But your comment helped me to fix a bug in my splitted
share driver, so now moving object around also works. Thanks.

>
>> Yes and this is the actual problem for the kolab driver. I am forced
>> to link the unique share id to the folder name. And the user expects
>> the folder to be named according to the display name. So if the user
>> creates the "Family" address book there needs to be a "INBOX/Family"
>> folder in the IMAP tree rather than
>> "INBOX/dd9723e7ac00aae1829dea214a2f6621".
>
> Don't know much about the Kolab world, but is it not possible to check
> for a unique share display name in your driver before saving it and
> then maybe returning a PEAR_Error if it fails the test?  I'm also
> assuming this is a per-user uniqueness, not an installation wide test?

I am doing something like that but this currently means that the share
is invalid as long as there has not been a $share->set('name', 'xyz')
call and that is an ugly hack.

>> So let me rephrase my initial question. Would it be possible to
>> collapse the creation and naming of shares into a &newShare($id,
>> $name) function?
>
> I doubt it, as it would break BC.

Ok, understood.

Thanks for your comments.

Cheers,

Gunnar

--
____ http://www.pardus.de _________________ http://gunnarwrobel.de _

E-mail : wrobel at pardus.de                          Dr. Gunnar Wrobel
Tel.   : +49 40 432 72335                      Hartwig-Hesse Str. 12
Fax    : +49 40 432 70855                            D-20257 Hamburg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   >> Mail at ease - Kolab out of the box <<                 P at rdus
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


----- End forwarded message -----


Thanks,
mike

--
The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
An embedded message was scrubbed...
From: Gunnar Wrobel <wrobel at pardus.de>
Subject: Re: [dev] Splitting the share driver
Date: Tue, 08 Aug 2006 10:20:26 +0200
Size: 5293
Url: http://lists.horde.org/archives/dev/attachments/20060808/b1736ca4/attachment.mht


More information about the dev mailing list