summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_imap.php
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-01-16 15:50:48 +0100
committerThomas Bruederli <thomas@roundcube.net>2014-01-16 15:50:48 +0100
commitff3eb834920e2ec04e24423b5f87bdf4d3064eeb (patch)
tree15fb9a94db8fb80e2b490de451f3eaac81157948 /program/lib/Roundcube/rcube_imap.php
parent2c33c7e38bc767330b4eebdc9e4d234caca72966 (diff)
Handle combined UID-folder identifiers in rcube_imap class
Diffstat (limited to 'program/lib/Roundcube/rcube_imap.php')
-rw-r--r--program/lib/Roundcube/rcube_imap.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php
index 847bcfa70..698d0daf3 100644
--- a/program/lib/Roundcube/rcube_imap.php
+++ b/program/lib/Roundcube/rcube_imap.php
@@ -1656,6 +1656,7 @@ class rcube_imap extends rcube_storage
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);
}
@@ -1678,6 +1679,11 @@ class rcube_imap extends rcube_storage
$folder = $this->folder;
}
+ // decode combined UID-folder identifier
+ if (preg_match('/^\d+-[^,]+$/', $uid)) {
+ list($uid, $folder) = explode('-', $uid);
+ }
+
// get cached headers
if (!$force && $uid && ($mcache = $this->get_mcache_engine())) {
$headers = $mcache->get_message($folder, $uid);
@@ -1709,6 +1715,11 @@ class rcube_imap extends rcube_storage
$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) {