Changeset 4255 in subversion


Ignore:
Timestamp:
Nov 24, 2010 2:38:02 AM (3 years ago)
Author:
alec
Message:
  • Small code cleanup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_imap.php

    r4254 r4255  
    691691 
    692692        if (!empty($this->icache['threads'])) { 
     693            $dcount = count($this->icache['threads']['depth']); 
    693694            $result = array( 
    694695                'count'    => count($this->icache['threads']['tree']), 
    695                 'msgcount' => count($this->icache['threads']['depth']), 
    696                 'maxuid'   => !empty($this->icache['threads']['depth']) ? 
    697                     max(array_keys($this->icache['threads']['depth'])) : 0, 
     696                'msgcount' => $dcount, 
     697                'maxuid'   => $dcount ? max(array_keys($this->icache['threads']['depth'])) : 0, 
    698698            ); 
    699699        } 
    700700        else if (is_array($result = $this->_fetch_threads($mailbox))) { 
    701 //        list ($thread_tree, $msg_depth, $has_children) = $result; 
    702 //        $this->update_thread_cache($mailbox, $thread_tree, $msg_depth, $has_children); 
     701            $dcount = count($result[1]); 
    703702            $result = array( 
    704703                'count'    => count($result[0]), 
    705                 'msgcount' => count($result[1]), 
    706                 'maxuid'   => !empty($result[1]) ? max(array_keys($result[1])) : 0, 
     704                'msgcount' => $dcount, 
     705                'maxuid'   => $dcount ? max(array_keys($result[1])) : 0, 
    707706            ); 
    708707        } 
Note: See TracChangeset for help on using the changeset viewer.