diff options
| author | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-01-25 22:56:53 +0000 |
|---|---|---|
| committer | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-01-25 22:56:53 +0000 |
| commit | e8c3613e4596ab2933966921236372b8cef5dae2 (patch) | |
| tree | eea580033e075928641048b5cc858db1c2ff1734 /roundcubemail/program/include | |
| parent | b63300e546fe5e2dc9aab2785a365d116f11d56a (diff) | |
Added folder purge function and some checks
git-svn-id: https://svn.roundcube.net/trunk@127 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.inc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_imap.inc b/roundcubemail/program/include/rcube_imap.inc index 7f91d3a65..fa13e02cf 100644 --- a/roundcubemail/program/include/rcube_imap.inc +++ b/roundcubemail/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; |
