summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_imap_search.php
diff options
context:
space:
mode:
Diffstat (limited to 'program/lib/Roundcube/rcube_imap_search.php')
-rw-r--r--program/lib/Roundcube/rcube_imap_search.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_imap_search.php b/program/lib/Roundcube/rcube_imap_search.php
index c88198140..926a75d76 100644
--- a/program/lib/Roundcube/rcube_imap_search.php
+++ b/program/lib/Roundcube/rcube_imap_search.php
@@ -65,6 +65,8 @@ class rcube_imap_search
{
$pthreads = defined('PTHREADS_INHERIT_ALL');
+ $results = new rcube_result_multifolder($folders);
+
// start a search job for every folder to search in
foreach ($folders as $folder) {
$job = new rcube_imap_search_job($folder, $str, $charset, $sort_field, $threading);
@@ -82,7 +84,6 @@ class rcube_imap_search
$this->shutdown();
// gather results
- $results = new rcube_result_multifolder;
foreach ($this->jobs as $job) {
$results->add($job->get_result());
}