summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/rcube_imap.inc')
-rw-r--r--program/include/rcube_imap.inc14
1 files changed, 12 insertions, 2 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index 7f91d3a65..fa13e02cf 100644
--- a/program/include/rcube_imap.inc
+++ b/program/include/rcube_imap.inc
@@ -986,8 +986,18 @@ class rcube_imap
if ($msg_count>0)
{
- $this->clear_message_cache($mailbox.'.msg');
- return iil_C_ClearFolder($this->conn, $mailbox);
+ $cleared = iil_C_ClearFolder($this->conn, $mailbox);
+
+ // make sure the message count cache is cleared as well
+ if ($cleared)
+ {
+ $this->clear_message_cache($mailbox.'.msg');
+ $a_mailbox_cache = $this->get_cache('messagecount');
+ unset($a_mailbox_cache[$mailbox]);
+ $this->update_cache('messagecount', $a_mailbox_cache);
+ }
+
+ return $cleared;
}
else
return 0;