alecpl
2011-05-09 ac3ad69e941c0bcece827e148522a0b78aed25b3
- Fix possible ambiguity in folders caching (when list_mailboxes() was called the same result was returned, no matter what was the 1st and 2nd argument)


2 files modified
8 ■■■■■ changed files
program/include/rcube_imap.php 6 ●●●●● patch | view | raw | blame | history
program/steps/settings/folders.inc 2 ●●● patch | view | raw | blame | history
program/include/rcube_imap.php
@@ -3049,11 +3049,13 @@
     */
    private function _list_mailboxes($root='', $name='*', $filter=null)
    {
        $cache_key = 'mailboxes';
        $cache_key = $root.':'.$name;
        if (!empty($filter)) {
            $cache_key .= '.'.substr((is_string($filter) ? $filter : serialize($filter)), 0, 90);
            $cache_key .= ':'.(is_string($filter) ? $filter : serialize($filter));
        }
        $cache_key = 'mailboxes.'.md5($cache_key);
        // get cached folder list
        $a_mboxes = $this->get_cache($cache_key);
        if (is_array($a_mboxes)) {
program/steps/settings/folders.inc
@@ -231,7 +231,7 @@
    }
    // get folders from server
    $IMAP->clear_cache('mailboxes');
    $IMAP->clear_cache('/^mailboxes.*/', true);
    $a_unsubscribed = $IMAP->list_unsubscribed();
    $a_subscribed   = $IMAP->list_mailboxes();