From 855c85377d44943ba307d083632c6c5a9f1c98ad Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 25 Jun 2013 02:57:03 -0400
Subject: [PATCH] Performance improvement for searching in threaded mode. We can use cached index now. Some other small improvements.

---
 program/lib/Roundcube/rcube_imap_generic.php |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php
index b2ac9ea..2bf199c 100644
--- a/program/lib/Roundcube/rcube_imap_generic.php
+++ b/program/lib/Roundcube/rcube_imap_generic.php
@@ -1563,11 +1563,12 @@
         }
 
         // message IDs
-        if (!empty($add))
+        if (!empty($add)) {
             $add = $this->compressMessageSet($add);
+        }
 
         list($code, $response) = $this->execute($return_uid ? 'UID SORT' : 'SORT',
-            array("($field)", $encoding, 'ALL' . (!empty($add) ? ' '.$add : '')));
+            array("($field)", $encoding, !empty($add) ? $add : 'ALL'));
 
         if ($code != self::ERROR_OK) {
             $response = null;

--
Gitblit v1.9.1