summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_imap.php
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-09-18 09:02:35 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-09-18 09:02:35 +0000
commit8219df7241e3c96bb6b7f9abfa057b8a64b1839f (patch)
tree98c1a74c5e98c4d2d0fa76f3344acb5d3bf04ecb /roundcubemail/program/include/rcube_imap.php
parent68000ee62bccc327ce4b9d90da3d4e6c8bf178f4 (diff)
- Cache synchronization using QRESYNC/CONDSTORE
- Fixed message ID updates in cache - Changed message flags handling + some fixes (e.g. fixed messages listing after delete) git-svn-id: https://svn.roundcube.net/trunk@5233 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_imap.php')
-rw-r--r--roundcubemail/program/include/rcube_imap.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php
index d9549affd..e9dafbf9e 100644
--- a/roundcubemail/program/include/rcube_imap.php
+++ b/roundcubemail/program/include/rcube_imap.php
@@ -813,7 +813,7 @@ class rcube_imap
$mailbox = $this->mailbox;
}
- return $this->_list_headers($mailbox, $page, $sort_field, $sort_order, false, $slice);
+ return $this->_list_headers($mailbox, $page, $sort_field, $sort_order, $slice);
}
@@ -1086,7 +1086,7 @@ class rcube_imap
if (!empty($parents)) {
$headers[$idx]->parent_uid = end($parents);
- if (!$header->seen)
+ if (empty($header->flags['SEEN']))
$headers[$parents[0]]->unread_children++;
}
array_push($parents, $header->uid);
@@ -3421,6 +3421,8 @@ class rcube_imap
if ($this->conn->selected != $mailbox) {
if ($this->conn->select($mailbox))
$this->mailbox = $mailbox;
+ else
+ return null;
}
$data = $this->conn->data;
@@ -3517,6 +3519,19 @@ class rcube_imap
/**
+ * Synchronizes messages cache.
+ *
+ * @param string $mailbox Folder name
+ */
+ public function mailbox_sync($mailbox)
+ {
+ if ($mcache = $this->get_mcache_engine()) {
+ $mcache->synchronize($mailbox);
+ }
+ }
+
+
+ /**
* Get message header names for rcube_imap_generic::fetchHeader(s)
*
* @return string Space-separated list of header names