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