summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-11-18 14:24:47 +0000
committeralecpl <alec@alec.pl>2010-11-18 14:24:47 +0000
commite9a974990e6bceb2db0f814bc09671e36d441da6 (patch)
tree0eedbf42917c92455cb24d589f7aefcc273ebef1 /program/include
parent0f9d8ca40de826733f0507b9706d18dd1e8719f4 (diff)
- Add threads() result checking
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_imap.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 8a871ad85..7becb4fce 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -904,14 +904,14 @@ class rcube_imap
{
if (empty($this->icache['threads'])) {
// get all threads
- list ($thread_tree, $msg_depth, $has_children) = $this->conn->thread(
- $mailbox, $this->threading, $this->skip_deleted ? 'UNDELETED' : '');
+ $result = $this->conn->thread($mailbox, $this->threading,
+ $this->skip_deleted ? 'UNDELETED' : '');
// add to internal (fast) cache
$this->icache['threads'] = array();
- $this->icache['threads']['tree'] = $thread_tree;
- $this->icache['threads']['depth'] = $msg_depth;
- $this->icache['threads']['has_children'] = $has_children;
+ $this->icache['threads']['tree'] = is_array($result) ? $result[0] : array();
+ $this->icache['threads']['depth'] = is_array($result) ? $result[1] : array();
+ $this->icache['threads']['has_children'] = is_array($result) ? $result[2] : array();
}
return array(
@@ -1692,7 +1692,7 @@ class rcube_imap
return $a_messages;
}
-
+
if ($sort_field && $this->get_capability('SORT')) {
$charset = $charset ? $charset : $this->default_charset;
$a_messages = $this->conn->sort($mailbox, $sort_field, $criteria, false, $charset);