Changeset c26b398 in github for program/include/rcube_imap.php
- Timestamp:
- Nov 5, 2010 8:19:12 AM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- c0ed783
- Parents:
- 9be483c
- File:
-
- 1 edited
-
program/include/rcube_imap.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_imap.php
r30b3022 rc26b398 548 548 549 549 if ($mode == 'THREADS') { 550 $count = $this->_threadcount($mailbox, $msg_count); 550 $res = $this->_threadcount($mailbox, $msg_count); 551 $count = $res['count']; 552 551 553 if ($status) { 552 $this->set_folder_stats($mailbox, 'cnt', $ msg_count);553 $this->set_folder_stats($mailbox, 'maxuid', $ msg_count ? $this->_id2uid($msg_count, $mailbox) : 0);554 $this->set_folder_stats($mailbox, 'cnt', $res['msgcount']); 555 $this->set_folder_stats($mailbox, 'maxuid', $res['maxuid'] ? $this->_id2uid($res['maxuid'], $mailbox) : 0); 554 556 } 555 557 } … … 619 621 * 620 622 * @param string $mailbox Folder name 621 * @param int $msg_count Number of messages in the folder 623 * 624 * @returns array Array containing items: 'count' - threads count, 625 * 'msgcount' = messages count, 'maxuid' = max. UID in the set 622 626 * @access private 623 * @see rcube_imap::messagecount() 624 */ 625 private function _threadcount($mailbox, &$msg_count) 626 { 627 */ 628 private function _threadcount($mailbox) 629 { 630 $result = array(); 631 627 632 if (!empty($this->icache['threads'])) { 628 $msg_count = count($this->icache['threads']['depth']); 629 return count($this->icache['threads']['tree']); 630 } 631 632 if (is_array($result = $this->_fetch_threads($mailbox))) { 633 $thread_tree = array_shift($result); 634 $msg_count = count($result[0]); 635 } 636 633 $result = array( 634 'count' => count($this->icache['threads']['tree']), 635 'msgcount' => count($this->icache['threads']['depth']), 636 'maxuid' => max(array_keys($this->icache['threads']['depth'])), 637 ); 638 } 639 else if (is_array($result = $this->_fetch_threads($mailbox))) { 637 640 // list ($thread_tree, $msg_depth, $has_children) = $result; 638 641 // $this->update_thread_cache($mailbox, $thread_tree, $msg_depth, $has_children); 639 return count($thread_tree); 642 $result = array( 643 'count' => count($result[0]), 644 'msgcount' => count($result[1]), 645 'maxuid' => max(array_keys($result[1])), 646 ); 647 } 648 649 return $result; 640 650 } 641 651
Note: See TracChangeset
for help on using the changeset viewer.
