summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-05-28 06:54:29 +0000
committeralecpl <alec@alec.pl>2008-05-28 06:54:29 +0000
commit53873e32aa3ad64d2a81af764219299fce93bf61 (patch)
tree2533283778db598893d4fbe113bf813eea1a2df3
parent7ffc08ce87bdbc761eb9811f8be25a8c9c4e9976 (diff)
- Fixed sorting of folders with non-ascii characters
-rw-r--r--CHANGELOG4
-rw-r--r--program/include/rcube_imap.php10
2 files changed, 10 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 936e37be0..f0cbe5b83 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,10 @@
CHANGELOG RoundCube Webmail
---------------------------
+2008/05/28 (alec)
+----------
+- Fixed sorting of folders with non-ascii characters
+
2008/05/21 (alec)
----------
- Localized pagetitle in Settings and Address Book
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 96e1d64cb..f742290d3 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -2502,13 +2502,15 @@ class rcube_imap
if (($p = array_search(strtolower($folder), $this->default_folders_lc)) !== false && !$a_defaults[$p])
$a_defaults[$p] = $folder;
else
- $a_out[] = $folder;
+ {
+ $l_folders[$folder] = mb_strtolower(rcube_charset_convert($folder, 'UTF-7'));
+ }
}
- natcasesort($a_out);
+ asort($l_folders, SORT_LOCALE_STRING);
ksort($a_defaults);
-
- return array_merge($a_defaults, $a_out);
+
+ return array_merge($a_defaults, array_keys($l_folders));
}
/**