Revision: 12314
http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=12314&view=rev
Author: kink
Date: 2007-03-06 06:55:41 -0800 (Tue, 06 Mar 2007)
Log Message:
-----------
Fix sorting of folder list with non-. delimiter (#1593229).
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/ChangeLog
branches/SM-1_4-STABLE/squirrelmail/functions/imap_mailbox.php
Modified: branches/SM-1_4-STABLE/squirrelmail/ChangeLog
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/ChangeLog 2007-03-06 02:03:36 UTC
(rev 12313)
+++ branches/SM-1_4-STABLE/squirrelmail/ChangeLog 2007-03-06 14:55:41 UTC
(rev 12314)
@@ -27,6 +27,7 @@
- Fix "Unknown Sender" on message after reading a digest (#1673047).
- Fix Priority and Receipt compose options being reset after return from
HTML addressbook (#1673056).
+ - Fix sorting of folder list with non-. delimiter (#1593229).
Version 1.4.9a - 3 December 2006
--------------------------------
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/imap_mailbox.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/imap_mailbox.php
2007-03-06 02:03:36 UTC (rev 12313)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/imap_mailbox.php
2007-03-06 14:55:41 UTC (rev 12314)
@@ -547,14 +547,16 @@
*/
function mailtree_sort(&$lsub) {
if(!is_array($lsub)) return;
-
+
+ global $delimiter;
+
foreach($lsub as $index => $mailbox)
- $lsub[$index] = str_replace('.',' -#- ',$lsub[$index]);
+ $lsub[$index] = str_replace($delimiter,' -#- ',$lsub[$index]);
usort($lsub, 'user_strcasecmp');
foreach($lsub as $index => $mailbox)
- $lsub[$index] = str_replace(' -#- ','.',$lsub[$index]);
+ $lsub[$index] = str_replace(' -#- ',$delimiter,$lsub[$index]);
}
/**
@@ -607,7 +609,7 @@
}
/* remove duplicates */
$sorted_lsub_ary = array_unique($sorted_lsub_ary);
-
+
/* natural sort mailboxes */
if (isset($sorted_lsub_ary)) {
mailtree_sort($sorted_lsub_ary);
@@ -805,4 +807,3 @@
return $boxes;
}
-?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
|