Aleksander Machniak
2012-11-22 d0edbfb33dc78591bd0ad0263ca9923065546d5f
Fix cache (in)validation after setting \Deleted flag
2 files modified
13 ■■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_imap.php 12 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fix cache (in)validation after setting \Deleted flag
- Fix keybord events on messages list in opera browser (#1488823)
- Fix selection of collapsed thread rows (#1488772)
- Always save drafts with format=flowed in order to keep original line wraps (#1488799)
program/lib/Roundcube/rcube_imap.php
@@ -2188,10 +2188,10 @@
            $result = $this->conn->flag($folder, $uids, $flag);
        }
        if ($result) {
        if ($result && !$skip_cache) {
            // reload message headers if cached
            // @TODO: update flags instead removing from cache
            if (!$skip_cache && ($mcache = $this->get_mcache_engine())) {
            // update flags instead removing from cache
            if ($mcache = $this->get_mcache_engine()) {
                $status = strpos($flag, 'UN') !== 0;
                $mflag  = preg_replace('/^UN/', '', $flag);
                $mcache->change_flag($folder, $all_mode ? null : explode(',', $uids),
@@ -2203,8 +2203,12 @@
                $this->clear_messagecount($folder, 'SEEN');
                $this->clear_messagecount($folder, 'UNSEEN');
            }
            else if ($flag == 'DELETED') {
            else if ($flag == 'DELETED' || $flag == 'UNDELETED') {
                $this->clear_messagecount($folder, 'DELETED');
                // remove cached messages
                if ($this->options['skip_deleted']) {
                    $this->clear_message_cache($folder, $all_mode ? null : explode(',', $uids));
                }
            }
        }