[dev] Splitting the share driver
Michael Rubinsky
mike at theupstairsroom.com
Mon Aug 7 10:26:49 PDT 2006
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.
> 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?
> 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.
Thanks,
mike
--
The Horde Project (www.horde.org)
mrubinsk at horde.org
More information about the dev
mailing list