Aleksander Machniak
2013-03-11 5410eff830da535d63df9b3dee113f7521803a5c
Fix handling of empty $uids argument in change_flag()
1 files modified
2 ■■■ changed files
program/lib/Roundcube/rcube_imap_cache.php 2 ●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_imap_cache.php
@@ -485,7 +485,7 @@
            .", 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);
    }