summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-01-25 22:56:53 +0000
committerthomascube <thomas@roundcube.net>2006-01-25 22:56:53 +0000
commit5e35126796f14e0910a007972779d96fd49e1789 (patch)
tree9d04098a0470504edbf12692247ba58545f1695e /program/include/rcube_imap.inc
parentc9d09bbe43f268c11cadc9846652ff33521edf6c (diff)
Added folder purge function and some checks
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;