Thomas Bruederli
2014-01-16 ff3eb834920e2ec04e24423b5f87bdf4d3064eeb
Handle combined UID-folder identifiers in rcube_imap class
1 files modified
11 ■■■■■ changed files
program/lib/Roundcube/rcube_imap.php 11 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_imap.php
@@ -1656,6 +1656,7 @@
    public function refresh_search()
    {
        if (!empty($this->search_string)) {
            // FIXME: make this work with saved multi-folder searches
            $this->search('', $this->search_string, $this->search_charset, $this->search_sort_field);
        }
@@ -1676,6 +1677,11 @@
    {
        if (!strlen($folder)) {
            $folder = $this->folder;
        }
        // decode combined UID-folder identifier
        if (preg_match('/^\d+-[^,]+$/', $uid)) {
            list($uid, $folder) = explode('-', $uid);
        }
        // get cached headers
@@ -1709,6 +1715,11 @@
            $folder = $this->folder;
        }
        // decode combined UID-folder identifier
        if (preg_match('/^\d+-[^,]+$/', $uid)) {
            list($uid, $folder) = explode('-', $uid);
        }
        // Check internal cache
        if (!empty($this->icache['message'])) {
            if (($headers = $this->icache['message']) && $headers->uid == $uid) {