From 56ff52b45b90ea5497abcd71878980bd42ac0985 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Thu, 2 Jan 2025 12:52:33 +0100 Subject: [PATCH] Fix filter --- .../modules/mailings/mailing_alumni_selector1.modules.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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))."'"; } }