- Add threads() result checking

release-0.6
alecpl 14 years ago
parent 0f9d8ca40d
commit e9a974990e

@ -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(

Loading…
Cancel
Save