From 188304872066eef4b20c305f9cd6ea939dd419e0 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Tue, 8 Apr 2014 10:58:56 +0200 Subject: Optimize header fetching of multi-folder searches with natural (UID) sorting --- program/steps/mail/search.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'program/steps/mail/search.inc') diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc index 797c8fcd8..c97e3ac5a 100644 --- a/program/steps/mail/search.inc +++ b/program/steps/mail/search.inc @@ -108,7 +108,8 @@ if (!empty($subject)) { // search all, current or subfolders folders if ($scope == 'all') { - $mboxes = $RCMAIL->storage->list_folders_subscribed('', '*', 'mail'); + $mboxes = $RCMAIL->storage->list_folders_subscribed('', '*', 'mail', null, true); + natcasesort($mboxes); // we want natural alphabetic sorting of folders in the result set } else if ($scope == 'sub') { $mboxes = $RCMAIL->storage->list_folders_subscribed($mbox, '*', 'mail'); -- cgit v1.2.3