From 91cb9dfe789871f9f0e9080752e21b7d4aaef94d Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Mon, 23 Apr 2012 05:22:15 -0400
Subject: [PATCH] - Fix parsing ESEARCH (ALL) result and enabling ESEARCH for ordinary searches

---
 program/include/rcube_result_index.php |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/program/include/rcube_result_index.php b/program/include/rcube_result_index.php
index 2572aea..cd90067 100644
--- a/program/include/rcube_result_index.php
+++ b/program/include/rcube_result_index.php
@@ -100,7 +100,7 @@
 // @TODO: Implement compression using compressMessageSet() in __sleep() and __wakeup() ?
 // @TODO: work with compressed result?!
                     if (isset($this->params['ALL'])) {
-                        $data[$idx] = implode(self::SEPARATOR_ELEMENT,
+                        $data_item = implode(self::SEPARATOR_ELEMENT,
                             rcube_imap_generic::uncompressMessageSet($this->params['ALL']));
                     }
                 }
@@ -111,6 +111,8 @@
             unset($data[$i]);
         }
 
+        $data = array_filter($data);
+
         if (empty($data)) {
             return;
         }

--
Gitblit v1.9.1