diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-24 07:38:02 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-11-24 07:38:02 +0000 |
| commit | 870a3e7d42455f8747663c6026301b3644d8c55d (patch) | |
| tree | 20ffc2c4e5bb7b44a3d52028500ac9b6661414a4 /roundcubemail/program/include | |
| parent | 03cb865265b09ac5854fc9fe19431fe2b6359296 (diff) | |
- Small code cleanup
git-svn-id: https://svn.roundcube.net/trunk@4255 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php index 468d98c40..4c021802c 100644 --- a/roundcubemail/program/include/rcube_imap.php +++ b/roundcubemail/program/include/rcube_imap.php @@ -690,20 +690,19 @@ class rcube_imap $result = array(); if (!empty($this->icache['threads'])) { + $dcount = count($this->icache['threads']['depth']); $result = array( 'count' => count($this->icache['threads']['tree']), - 'msgcount' => count($this->icache['threads']['depth']), - 'maxuid' => !empty($this->icache['threads']['depth']) ? - max(array_keys($this->icache['threads']['depth'])) : 0, + 'msgcount' => $dcount, + 'maxuid' => $dcount ? max(array_keys($this->icache['threads']['depth'])) : 0, ); } else if (is_array($result = $this->_fetch_threads($mailbox))) { -// list ($thread_tree, $msg_depth, $has_children) = $result; -// $this->update_thread_cache($mailbox, $thread_tree, $msg_depth, $has_children); + $dcount = count($result[1]); $result = array( 'count' => count($result[0]), - 'msgcount' => count($result[1]), - 'maxuid' => !empty($result[1]) ? max(array_keys($result[1])) : 0, + 'msgcount' => $dcount, + 'maxuid' => $dcount ? max(array_keys($result[1])) : 0, ); } |
