diff options
author | alecpl <alec@alec.pl> | 2010-04-15 12:21:03 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-04-15 12:21:03 +0000 |
commit | a4468298c8506d9cd35b805885c0d2b684835f8a (patch) | |
tree | 4e99e69fb582ba90fff3e921d2bf0d49dd43d993 /program | |
parent | 633a106db924a36c15759db9f596e9a4a95f12f6 (diff) |
- fix sorting of folders with capital letters
Diffstat (limited to 'program')
-rw-r--r-- | program/include/rcube_imap.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index 22f497927..466c47a3a 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -2541,24 +2541,23 @@ class rcube_imap */ function list_unsubscribed($root='') { - static $sa_unsubscribed; + static $a_folders; - if (is_array($sa_unsubscribed)) - return $sa_unsubscribed; + if (is_array($a_folders)) + return $a_folders; // retrieve list of folders from IMAP server $a_mboxes = $this->conn->listMailboxes($this->mod_mailbox($root), '*'); // modify names with root dir foreach ($a_mboxes as $mbox_name) { - $name = $this->mod_mailbox($mbox_name, 'out'); - if (strlen($name)) + if ($name = $this->mod_mailbox($mbox_name, 'out')) $a_folders[] = $name; } // filter folders and sort them - $sa_unsubscribed = $this->_sort_mailbox_list($a_folders); - return $sa_unsubscribed; + $a_folders = $this->_sort_mailbox_list($a_folders); + return $a_folders; } @@ -3533,7 +3532,7 @@ class rcube_imap if (($p = array_search($folder, $this->default_folders)) !== false && !$a_defaults[$p]) $a_defaults[$p] = $folder; else - $folders[$folder] = mb_strtolower(rcube_charset_convert($folder, 'UTF7-IMAP')); + $folders[$folder] = rcube_charset_convert($folder, 'UTF7-IMAP'); } // sort folders and place defaults on the top |