diff --git a/htdocs/alumni/core/modules/mailings/mailing_alumni_selector1.modules.php b/htdocs/alumni/core/modules/mailings/mailing_alumni_selector1.modules.php index e6bc90d42..3b70b1443 100644 --- a/htdocs/alumni/core/modules/mailings/mailing_alumni_selector1.modules.php +++ b/htdocs/alumni/core/modules/mailings/mailing_alumni_selector1.modules.php @@ -131,7 +131,10 @@ public function add_to_target($mailing_id) $extrafields->fetch_name_optionals_label($tmp->table_element); foreach($extrafields->attributes[$tmp->table_element]['label'] as $key => $label) { - if (GETPOSTISSET($key) && GETPOST($key) != '') { + if (GETPOSTISSET($key) && GETPOST($key) == '0') { + $sql .= " AND IFNULL(ase.".$this->db->sanitize($key).",0) = 0"; + } + if (GETPOSTISSET($key) && GETPOST($key) == '-1' && GETPOST($key) == '1') { $sql .= " AND ase.".$this->db->sanitize($key)." LIKE '".$this->db->escape(GETPOST($key))."'"; } }