summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-11-21 10:50:42 +0100
committerAleksander Machniak <alec@alec.pl>2013-11-21 10:50:42 +0100
commit978ff8794fb012939a0bda5c8231f007ee40217f (patch)
treeaa9963362ad37a8755df4527505a0654bf14b66a /program/lib/Roundcube
parent3b8a7918fc315f71fe48608060588e026b55d85a (diff)
Make sort_folder_list() public
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r--program/lib/Roundcube/rcube_imap.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php
index 9faf1bbc6..fdda1d4b2 100644
--- a/program/lib/Roundcube/rcube_imap.php
+++ b/program/lib/Roundcube/rcube_imap.php
@@ -3848,9 +3848,12 @@ class rcube_imap extends rcube_storage
/**
* Sort folders first by default folders and then in alphabethical order
*
- * @param array $a_folders Folders list
+ * @param array $a_folders Folders list
+ * @param bool $skip_default Skip default folders handling
+ *
+ * @return array Sorted list
*/
- protected function sort_folder_list($a_folders)
+ public function sort_folder_list($a_folders, $skip_default = false)
{
$a_out = $a_defaults = $folders = array();
@@ -3862,7 +3865,7 @@ class rcube_imap extends rcube_storage
continue;
}
- if (($p = array_search($folder, $this->default_folders)) !== false && !$a_defaults[$p]) {
+ if (!$skip_default && ($p = array_search($folder, $this->default_folders)) !== false && !$a_defaults[$p]) {
$a_defaults[$p] = $folder;
}
else {