diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index f0ebc5cd2d1..e84ee7d2311 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -64,7 +64,7 @@ class mailing_fraise extends MailingTargets */ function getSqlArrayForStats() { - global $conf,$langs; + global $langs; $langs->load("members"); @@ -88,7 +88,6 @@ class mailing_fraise extends MailingTargets */ function getNbOfRecipients($sql='') { - global $conf; $sql = "SELECT count(distinct(a.email)) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent as a"; $sql .= " WHERE (a.email IS NOT NULL AND a.email != '') AND a.entity IN (".getEntity('member').")"; diff --git a/htdocs/don/index.php b/htdocs/don/index.php index e9a12861968..b72e63f7797 100644 --- a/htdocs/don/index.php +++ b/htdocs/don/index.php @@ -55,7 +55,7 @@ $somme=array(); $total = 0; $sql = "SELECT count(d.rowid) as nb, sum(d.amount) as somme , d.fk_statut"; -$sql.= " FROM ".MAIN_DB_PREFIX."don as d"; +$sql.= " FROM ".MAIN_DB_PREFIX."don as d WHERE d.entity IN (".getEntity('donation').")"; $sql.= " GROUP BY d.fk_statut"; $sql.= " ORDER BY d.fk_statut";