summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-08-05 11:09:11 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-08-05 11:09:11 +0000
commit4edf696515d1f02462ca3d67de7b01f31b864040 (patch)
tree15a886f51ac45861e15de8ec47ffc8f0383ce67a
parent3ca739995eaa3a97fb04b6abe85d7832f6b284ba (diff)
#1485229: fixed mailboxlist sorting for folder names with upper case
git-svn-id: https://svn.roundcube.net/trunk@1629 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/include/rcube_imap.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php
index 3daea0c06..95f7d8b7a 100644
--- a/roundcubemail/program/include/rcube_imap.php
+++ b/roundcubemail/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;