summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_imap.php
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-10-15 11:44:34 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-01-16 11:33:57 +0100
commitb6e24c6946606cd504d522451c36b6dc574fe75d (patch)
tree47c14c635e1ed60ca73c5fabae0d85a3065bb032 /program/lib/Roundcube/rcube_imap.php
parent566747af00ae413c942a7c6702e24c044af36f17 (diff)
Minor improvements to threaded searching
Diffstat (limited to 'program/lib/Roundcube/rcube_imap.php')
-rw-r--r--program/lib/Roundcube/rcube_imap.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php
index db94e7678..0cf34b2ca 100644
--- a/program/lib/Roundcube/rcube_imap.php
+++ b/program/lib/Roundcube/rcube_imap.php
@@ -969,7 +969,7 @@ class rcube_imap extends rcube_storage
$to = $from + $page_size;
// sort headers
- if (!$this->threading) {
+ if (!$this->threading && !empty($a_msg_headers)) {
$a_msg_headers = $this->conn->sortHeaders($a_msg_headers, $this->sort_field, $this->sort_order);
}
@@ -1476,10 +1476,8 @@ class rcube_imap extends rcube_storage
new rcube_result_index; // trigger autoloader and make these classes available for threaded context
new rcube_result_thread;
- // connect IMAP
- if (!defined('PTHREADS_INHERIT_ALL')) {
- $this->check_connection();
- }
+ // connect IMAP to have all the required classes and settings loaded
+ $this->check_connection();
$searcher = new rcube_imap_search($this->options, $this->conn);
$results = $searcher->exec(