summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-04-23 09:03:54 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-04-23 09:03:54 +0000
commitdfb8635112973c1692aba58538ad6872e3dde599 (patch)
tree2ef5da1d50404bca8645e0e527e60f8624ff44af
parent39319b552181917e7663bd3c07c95ed0d260794d (diff)
- Fix listing messages when: skip_deleted=true, ESEARCH supported, threads disabled
git-svn-id: https://svn.roundcube.net/trunk@6117 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/include/rcube_imap.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php
index 8b45da1f2..24043c53b 100644
--- a/roundcubemail/program/include/rcube_imap.php
+++ b/roundcubemail/program/include/rcube_imap.php
@@ -1213,7 +1213,9 @@ class rcube_imap extends rcube_storage
}
// use message index sort as default sorting
else if (!$sort_field) {
+ // use search result from count() if possible
if ($this->options['skip_deleted'] && !empty($this->icache['undeleted_idx'])
+ && $this->icache['undeleted_idx']->get_parameters('ALL') !== null
&& $this->icache['undeleted_idx']->get_parameters('MAILBOX') == $folder
) {
$index = $this->icache['undeleted_idx'];