summaryrefslogtreecommitdiff
path: root/program/lib
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-04-11 19:28:52 +0200
committerAleksander Machniak <alec@alec.pl>2014-04-11 19:28:52 +0200
commit0ca75d488059b685ae344dbb629aa935dce3ab79 (patch)
tree510c18bf83cfec2a35c685553bd0e04f62fcb9fe /program/lib
parent209a75c2b2820d093e00cf2b8c1e6221d39c90d1 (diff)
Fix messages index cache update under some conditions (e.g. proxy) (#1489756)
Diffstat (limited to 'program/lib')
-rw-r--r--program/lib/Roundcube/rcube_imap_cache.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_imap_cache.php b/program/lib/Roundcube/rcube_imap_cache.php
index 0c3edeaad..e49e77803 100644
--- a/program/lib/Roundcube/rcube_imap_cache.php
+++ b/program/lib/Roundcube/rcube_imap_cache.php
@@ -171,7 +171,7 @@ class rcube_imap_cache
// Seek in internal cache
if (array_key_exists('index', $this->icache[$mailbox])) {
// The index was fetched from database already, but not validated yet
- if (!array_key_exists('object', $this->icache[$mailbox]['index'])) {
+ if (empty($this->icache[$mailbox]['index']['validated'])) {
$index = $this->icache[$mailbox]['index'];
}
// We've got a valid index
@@ -248,6 +248,7 @@ class rcube_imap_cache
}
$this->icache[$mailbox]['index'] = array(
+ 'validated' => true,
'object' => $data,
'sort_field' => $sort_field,
'modseq' => !empty($index['modseq']) ? $index['modseq'] : $mbox_data['HIGHESTMODSEQ']
@@ -890,6 +891,8 @@ class rcube_imap_cache
return false;
}
+ $index['validated'] = true;
+
// Get mailbox data (UIDVALIDITY, counters, etc.) for status check
$mbox_data = $this->imap->folder_data($mailbox);