Changeset e9a97499 in github


Ignore:
Timestamp:
Nov 18, 2010 9:24:47 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
d2b8840
Parents:
0f9d8ca
Message:
  • Add threads() result checking
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_imap.php

    r5d23891 re9a97499  
    905905        if (empty($this->icache['threads'])) { 
    906906            // get all threads 
    907             list ($thread_tree, $msg_depth, $has_children) = $this->conn->thread( 
    908                 $mailbox, $this->threading, $this->skip_deleted ? 'UNDELETED' : ''); 
     907            $result = $this->conn->thread($mailbox, $this->threading, 
     908                $this->skip_deleted ? 'UNDELETED' : ''); 
    909909 
    910910            // add to internal (fast) cache 
    911911            $this->icache['threads'] = array(); 
    912             $this->icache['threads']['tree'] = $thread_tree; 
    913             $this->icache['threads']['depth'] = $msg_depth; 
    914             $this->icache['threads']['has_children'] = $has_children; 
     912            $this->icache['threads']['tree'] = is_array($result) ? $result[0] : array(); 
     913            $this->icache['threads']['depth'] = is_array($result) ? $result[1] : array(); 
     914            $this->icache['threads']['has_children'] = is_array($result) ? $result[2] : array(); 
    915915        } 
    916916 
     
    16931693            return $a_messages; 
    16941694        } 
    1695          
     1695 
    16961696        if ($sort_field && $this->get_capability('SORT')) { 
    16971697            $charset = $charset ? $charset : $this->default_charset; 
Note: See TracChangeset for help on using the changeset viewer.