summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-04-23 09:22:15 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-04-23 09:22:15 +0000
commitad6a508e8027a4d88bd8938bc9e4445f6b4ebbf0 (patch)
treead3fec695f15fd7300e95c8a7771af17bb5081a3
parentdfb8635112973c1692aba58538ad6872e3dde599 (diff)
- Fix parsing ESEARCH (ALL) result and enabling ESEARCH for ordinary searches
git-svn-id: https://svn.roundcube.net/trunk@6118 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/include/rcube_imap_generic.php2
-rw-r--r--roundcubemail/program/include/rcube_result_index.php4
2 files changed, 4 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_imap_generic.php b/roundcubemail/program/include/rcube_imap_generic.php
index 9fce20a23..77b0cc464 100644
--- a/roundcubemail/program/include/rcube_imap_generic.php
+++ b/roundcubemail/program/include/rcube_imap_generic.php
@@ -1611,7 +1611,7 @@ class rcube_imap_generic
// If ESEARCH is supported always use ALL
// but not when items are specified or using simple id2uid search
- if (empty($items) && ((int) $criteria != $criteria)) {
+ if (empty($items) && preg_match('/[^0-9]/', $criteria)) {
$items = array('ALL');
}
diff --git a/roundcubemail/program/include/rcube_result_index.php b/roundcubemail/program/include/rcube_result_index.php
index 2572aea77..cd900677e 100644
--- a/roundcubemail/program/include/rcube_result_index.php
+++ b/roundcubemail/program/include/rcube_result_index.php
@@ -100,7 +100,7 @@ class rcube_result_index
// @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 @@ class rcube_result_index
unset($data[$i]);
}
+ $data = array_filter($data);
+
if (empty($data)) {
return;
}