summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-08-05 11:09:11 +0000
committeralecpl <alec@alec.pl>2008-08-05 11:09:11 +0000
commitf219a20fff1fa876403afeb4acf130714264609f (patch)
tree8fc78608058cfc44ea4cf0b106f073f08e9d357a
parent8791df8bab361ed5a81cf0503c5cdd7fb362cf46 (diff)
#1485229: fixed mailboxlist sorting for folder names with upper case
-rw-r--r--program/include/rcube_imap.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 3daea0c06..95f7d8b7a 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -2539,19 +2539,19 @@ class rcube_imap
$folders = array_merge($a_defaults, array_keys($folders));
// finally we must rebuild the list to move
- // subfolders of default folders to their place
+ // subfolders of default folders to their place...
+ // ...also do this for the rest of folders because
+ // asort() is not properly sorting case sensitive names
while (list($key, $folder) = each($folders)) {
$a_out[] = $folder;
unset($folders[$key]);
- if (in_array(strtolower($folder), $this->default_folders_lc)) {
- foreach ($folders as $idx => $f) {
- if (strpos($f, $folder.$delimiter) === 0) {
- $a_out[] = $f;
- unset($folders[$idx]);
- }
+ foreach ($folders as $idx => $f) {
+ if (strpos($f, $folder.$delimiter) === 0) {
+ $a_out[] = $f;
+ unset($folders[$idx]);
}
- reset($folders);
- }
+ }
+ reset($folders);
}
return $a_out;