[dev] Horde_Imap_Client: listMailboxes() sort delimiter

Michael M Slusarz slusarz at horde.org
Thu Aug 8 05:32:52 UTC 2013


Quoting Thomas Jarosch <thomas.jarosch at intra2net.com>:

> Hi,
>
> I'm currently playing around with the Horde_Imap_Client library to get
> a list of mailboxes + kolab folder types. So far it's working.
>
>
> One thing that puzzles me is the 'sort' function of listMailboxes():
> If you don't set the 'sort_delimiter' explicitly, the delimiter
> will default to '.' as documented.
>
> For IMAP servers that use '/' as delimiter, this will go wrong.
>
> If I look f.e. at the code of IMP_Imap_Tree::_getList(),
> it uses the 'sort' option but does not set the 'sort_delimiter'.
> Same in IMP_Prefs_Special_SpecialMboxes::_getSpecialUse().
>
> Bug or feature?

Bug.  But nobody uses '/' anymore, so this doesn't affect many people.

> Can't we auto-determine the delimiter internally if the 'sort' option
> is enabled? What's the use case of specifying the delimiter manually?

No.  How would you auto-detect?  It's perfectly legal (if uncommon) to  
have different namespaces have different delimiters.  E.g. the private  
namespace could have '.' as a delimiter, while a shared namespace may  
use '/'.  You have to identify which one you want to control.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list