From b6e24c6946606cd504d522451c36b6dc574fe75d Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Tue, 15 Oct 2013 11:44:34 +0200 Subject: Minor improvements to threaded searching --- program/lib/Roundcube/rcube_imap.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'program/lib/Roundcube/rcube_imap.php') 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( -- cgit v1.2.3