as I reported 07/02/04 12:00, there is a bug in squirrelmail that messes up order of folders (see http://home.4th-age.com/squirrelbug.jpg)
I have now made a patch that fixes the issue properly I hope this gets checked into the tree. Cheers, -- Morten
--- imap_mailbox.php 2004-08-17 20:44:10.670681024 +0200 +++ functions/imap_mailbox.php 2004-08-17 20:45:27.009075824 +0200 @@ -489,6 +489,21 @@ } /* + * Mailboxes with some chars (like -) can mess up the order, this fixes it + */ +function mailtree_sort(&$lsub) { + if(!is_array($lsub)) return; + + foreach($lsub as $index => $mailbox) + $lsub[$index] = str_replace('.',' -#- ',$lsub[$index]); + + usort($lsub, 'user_strcasecmp'); + + foreach($lsub as $index => $mailbox) + $lsub[$index] = str_replace(' -#- ','.',$lsub[$index]); +} + +/* * Returns sorted mailbox lists in several different ways. * See comment on sqimap_mailbox_parse() for info about the returned array. */ @@ -538,7 +553,7 @@ /* natural sort mailboxes */ if (isset($sorted_lsub_ary)) { - usort($sorted_lsub_ary, 'user_strcasecmp'); + mailtree_sort($sorted_lsub_ary); } /* * The LSUB response doesn't provide us information about \Noselect