Update fraise.modules.php

This commit is contained in:
ptibogxiv 2017-11-29 10:45:16 +01:00 committed by GitHub
parent 883c9dbf99
commit c194538609
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -203,7 +203,7 @@ class mailing_fraise extends MailingTargets
$sql.= " a.lastname, a.firstname,";
$sql.= " a.datefin, a.civility as civility_id, a.login, a.societe"; // Other fields
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
$sql.= " WHERE a.email <> '' AND a.entity IN (".getEntity('member').")"; // Note that null != '' is false
$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=".$mailing_id.")";
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)."'";