Aleksander Machniak
2013-06-11 545559307e2cf7d986af5993f7d3ea0fc30a8386
Make sure to use threads result cached in-memory for correct folder
1 files modified
12 ■■■■■ changed files
program/lib/Roundcube/rcube_imap.php 12 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_imap.php
@@ -812,7 +812,12 @@
            return $mcache->get_thread($folder);
        }
        if (empty($this->icache['threads'])) {
        if (!empty($this->icache['threads'])) {
            if ($this->icache['threads']->get_parameters('MAILBOX') == $folder) {
                return $this->icache['threads'];
            }
        }
            if (!$this->check_connection()) {
                return new rcube_result_thread();
            }
@@ -822,10 +827,7 @@
                $this->options['skip_deleted'] ? 'UNDELETED' : '', true);
            // add to internal (fast) cache
            $this->icache['threads'] = $result;
        }
        return $this->icache['threads'];
        return $this->icache['threads'] = $result;
    }