diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-09-22 09:38:21 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-09-22 09:38:21 +0200 |
commit | 000f6ee3041c0e587c4a54daa95dfc421f7bd2d4 (patch) | |
tree | 5a1e3178523841d720caeebf7401e7610906e09a /program/lib/Roundcube/rcube_imap_cache.php | |
parent | 6d1c76f8a1ee6725a7091cf907ac9668fd5b0a8f (diff) | |
parent | c2345747acec85bd158784a2819b5273e6af3cdd (diff) |
Merge branch 'oracle'
Diffstat (limited to 'program/lib/Roundcube/rcube_imap_cache.php')
-rw-r--r-- | program/lib/Roundcube/rcube_imap_cache.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube_imap_cache.php b/program/lib/Roundcube/rcube_imap_cache.php index 519132126..6ba6b8b4c 100644 --- a/program/lib/Roundcube/rcube_imap_cache.php +++ b/program/lib/Roundcube/rcube_imap_cache.php @@ -562,6 +562,8 @@ class rcube_imap_cache } } + $binary_check = $this->db->db_provider == 'oracle' ? "BITAND(`flags`, %d)" : "(`flags` & %d)"; + $this->db->query( "UPDATE {$this->messages_table}" ." SET `expires` = ". ($this->ttl ? $this->db->now($this->ttl) : 'NULL') @@ -570,6 +572,7 @@ class rcube_imap_cache ." AND `mailbox` = ?" .(!empty($uids) ? " AND `uid` IN (".$this->db->array2list($uids, 'integer').")" : "") ." AND (`flags` & $idx) ".($enabled ? "= 0" : "= $idx"), + ." AND " . sprintf($binary_check, $idx) . ($enabled ? " = 0" : " = $idx"), $this->userid, $mailbox); } |