From e607e79bc20b8bf81c82b89e52ca88f02c8ae74f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 24 Mar 2011 00:17:57 +0000 Subject: [PATCH] Another way to be correct: changing label of filter for "contacts" to "contacts with position defined." --- htdocs/includes/modules/mailings/contacts2.modules.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/htdocs/includes/modules/mailings/contacts2.modules.php b/htdocs/includes/modules/mailings/contacts2.modules.php index 2d60eb7a1fa..95492a394c4 100755 --- a/htdocs/includes/modules/mailings/contacts2.modules.php +++ b/htdocs/includes/modules/mailings/contacts2.modules.php @@ -78,7 +78,7 @@ class mailing_contacts2 extends MailingTargets $sql.= " ".MAIN_DB_PREFIX."societe as s"; $sql.= " WHERE s.rowid = sp.fk_soc"; $sql.= " AND sp.email != ''"; // Note that null != '' is false - //$sql.= " AND sp.poste != ''"; + $sql.= " AND sp.poste != ''"; $sql.= " AND sp.entity = ".$conf->entity; if ($filtersarray[0]<>'all') $sql.= " AND sp.poste ='".$filtersarray[0]."'"; $sql.= " ORDER BY sp.name, sp.firstname"; @@ -148,9 +148,6 @@ class mailing_contacts2 extends MailingTargets { global $conf; - // We must report here number of contacts when absolutely no filter selected (so all contacts). - // Number with a filter are show in the combo list for each filter. - // If we want a filter "function is defined", we must add it into formFilter $sql = "SELECT count(distinct(sp.email)) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp,"; $sql.= " ".MAIN_DB_PREFIX."societe as s"; @@ -158,7 +155,7 @@ class mailing_contacts2 extends MailingTargets $sql.= " AND s.entity = ".$conf->entity; $sql.= " AND sp.entity = ".$conf->entity; $sql.= " AND sp.email != ''"; // Note that null != '' is false - //$sql.= " AND sp.poste != ''"; + $sql.= " AND sp.poste != ''"; // La requete doit retourner un champ "nb" pour etre comprise // par parent::getNbOfRecipients return parent::getNbOfRecipients($sql);