Fix binary operator use for Oracle
| | |
| | | } |
| | | } |
| | | |
| | | $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') |
| | |
| | | ." 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); |
| | | } |
| | | |