summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-09-19 16:15:36 +0000
committeralecpl <alec@alec.pl>2011-09-19 16:15:36 +0000
commit1f803b6e3c54182cdbba2ced4aa1552fed2ba1d4 (patch)
tree53c077af1d8bfb1cc5cc9624752d4e9bd0058b34
parent681e9e6f1ae84974fb3e3fb11af7f783152c785d (diff)
- Fix PHP error when fetching messages index when threaded mode is enabled
-rw-r--r--program/include/rcube_imap.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index f95f7cef4..58bad75c8 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -1505,7 +1505,10 @@ class rcube_imap
// use message index sort as default sorting
if (!$sort_field) {
if ($this->skip_deleted) {
- $a_index = $this->_search_index($mailbox, 'ALL');
+ $a_index = $this->conn->search($mailbox, 'ALL UNDELETED');
+ // I didn't found that SEARCH should return sorted IDs
+ if (is_array($a_index))
+ sort($a_index);
} else if ($max = $this->_messagecount($mailbox)) {
$a_index = range(1, $max);
}