Fix handling of empty $uids argument in change_flag()

pull/88/head
Aleksander Machniak 11 years ago
parent c4ff57c75f
commit 5410eff830

@ -485,7 +485,7 @@ class rcube_imap_cache
.", flags = flags ".($enabled ? "+ $idx" : "- $idx")
." WHERE user_id = ?"
." AND mailbox = ?"
.($uids !== null ? " AND uid IN (".$this->db->array2list($uids, 'integer').")" : "")
.(!empty($uids) ? " AND uid IN (".$this->db->array2list($uids, 'integer').")" : "")
." AND (flags & $idx) ".($enabled ? "= 0" : "= $idx"),
$this->userid, $mailbox);
}

Loading…
Cancel
Save