summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-05-20 09:17:27 +0000
committeralecpl <alec@alec.pl>2011-05-20 09:17:27 +0000
commit3253b296c21c54df228de39ff3e4775974df81d5 (patch)
tree926274785fad616aa7f4f5a21967a14717f0439c /program
parent7786ba1adb415fc8fd4478380d7201702a799483 (diff)
- Clear properly mailboxes cache on folder subscription change
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.php15
1 files changed, 2 insertions, 13 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 882834ec8..7e97b3c39 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -4583,20 +4583,9 @@ class rcube_imap
$updated = $this->conn->unsubscribe($mailbox);
}
- // get cached mailbox list
+ // clear cached mailbox list(s)
if ($updated) {
- $a_mailbox_cache = $this->get_cache('mailboxes');
- if (!is_array($a_mailbox_cache))
- return $updated;
-
- // modify cached list
- if ($mode == 'subscribe')
- $a_mailbox_cache = array_merge($a_mailbox_cache, $a_mboxes);
- else if ($mode == 'unsubscribe')
- $a_mailbox_cache = array_diff($a_mailbox_cache, $a_mboxes);
-
- // write mailboxlist to cache
- $this->update_cache('mailboxes', $this->_sort_mailbox_list($a_mailbox_cache));
+ $this->clear_cache('/^mailboxes.*/', true);
}
return $updated;