diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index e84ee7d2311..a1674d6ab08 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -251,8 +251,8 @@ class mailing_fraise extends MailingTargets $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON c.rowid = cm.fk_categorie"; } $sql.= " , ".MAIN_DB_PREFIX."adherent_type as ta"; - $sql.= " WHERE a.email <> ''"; // Note that null != '' is false - $sql.= " AND a.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; + $sql.= " WHERE a.entity IN (".getEntity('member').") AND a.email <> ''"; // Note that null != '' is false + $sql.= " AND a.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$this->db->escape($mailing_id).")"; // Filter on status if (isset($_POST["filter"]) && $_POST["filter"] == '-1') $sql.= " AND a.statut=-1"; if (isset($_POST["filter"]) && $_POST["filter"] == '1a') $sql.= " AND a.statut=1 AND a.datefin >= '".$this->db->idate($now)."'"; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 5532bb8137b..6444faa3958 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -9,7 +9,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2013 Florian Henry * Copyright (C) 2013-2016 Alexandre Spangaro - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015-2017 Jean-François Ferry * Copyright (C) 2015 Ari Elbaz (elarifr) * Copyright (C) 2015 Charlie Benke * Copyright (C) 2016 Raphaël Doursenaud @@ -412,8 +412,8 @@ if (empty($reshook)) { } } - if (!$error && GETPOST('contactid', 'int')) { - $contactid = GETPOST('contactid', 'int'); + if (!$error && GETPOSTISSET('contactid')) { + $contactid = GETPOST('contactid', 'int'); if ($contactid > 0) { $contact = new Contact($db);