summaryrefslogtreecommitdiff
path: root/roundcubemail
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-10-18 18:01:10 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-10-18 18:01:10 +0000
commitf2f215a1c08c61ba6dd171be2d6f2aea1eb4b283 (patch)
treed3d060032cff761599971f3833e4175bc07d945a /roundcubemail
parentf78aaa8e6ec7cc3dd04cf6c521b33af582c7ecf6 (diff)
- Fix regression in rcube_imap::_threadcount() which was the reason
why mailbox_status() returned always "1" for folders with enabled threading git-svn-id: https://svn.roundcube.net/trunk@4104 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
-rw-r--r--roundcubemail/program/include/rcube_imap.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php
index b78639229..cd0ac200d 100644
--- a/roundcubemail/program/include/rcube_imap.php
+++ b/roundcubemail/program/include/rcube_imap.php
@@ -585,18 +585,22 @@ class rcube_imap
*/
private function _threadcount($mailbox, &$msg_count)
{
- if (!empty($this->icache['threads']))
+ if (!empty($this->icache['threads'])) {
+ $msg_count = count($this->icache['threads']['depth']);
return count($this->icache['threads']['tree']);
+ }
- if (is_array($result = $this->_fetch_threads($mailbox)))
+ if (is_array($result = $this->_fetch_threads($mailbox))) {
$thread_tree = array_shift($result);
+ $msg_count = count($result[0]);
+ }
// list ($thread_tree, $msg_depth, $has_children) = $result;
// $this->update_thread_cache($mailbox, $thread_tree, $msg_depth, $has_children);
return count($thread_tree);
}
-
+
/**
* Public method for listing headers
* convert mailbox name with root dir first
@@ -615,7 +619,7 @@ class rcube_imap
return $this->_list_headers($mailbox, $page, $sort_field, $sort_order, false, $slice);
}
-
+
/**
* Private method for listing message headers
*
@@ -745,7 +749,7 @@ class rcube_imap
return array_values($a_msg_headers);
}
-
+
/**
* Private method for listing message headers using threads
*
@@ -1150,7 +1154,7 @@ class rcube_imap
$for_create[] = $headers->uid;
}
-
+
if ($for_remove)
$this->remove_message_cache($cache_key, $for_remove);