Fix usage of filter into selection of email members into emailing.
This commit is contained in:
parent
6dbaba6973
commit
e169cd3364
@ -95,6 +95,7 @@ if ($action == 'add')
|
||||
|
||||
// Add targets into database
|
||||
$obj = new $classname($db);
|
||||
dol_syslog("Call add_to_target on class ".$classname);
|
||||
$result=$obj->add_to_target($id,$filtersarray);
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ class mailing_fraise extends MailingTargets
|
||||
$s.='<option value="0">'.$langs->trans("MemberStatusResiliatedShort").'</option>';
|
||||
$s.='</select> ';
|
||||
$s.=$langs->trans("Type").': ';
|
||||
$s.='<select name="filter" class="flat">';
|
||||
$s.='<select name="filtertype" class="flat">';
|
||||
$sql = "SELECT rowid, libelle, statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type";
|
||||
$sql.= " WHERE entity = ".$conf->entity;
|
||||
@ -212,7 +212,7 @@ class mailing_fraise extends MailingTargets
|
||||
if ($dateendsubscriptionafter > 0) $sql.=" AND datefin > '".$this->db->idate($dateendsubscriptionafter)."'";
|
||||
if ($dateendsubscriptionbefore > 0) $sql.=" AND datefin < '".$this->db->idate($dateendsubscriptionbefore)."'";
|
||||
$sql.= " AND a.fk_adherent_type = ta.rowid";
|
||||
if ($_POST['filter']) $sql.= " AND ta.rowid='".$_POST['filter']."'";
|
||||
if ($_POST['filtertype']) $sql.= " AND ta.rowid='".$_POST['filtertype']."'";
|
||||
$sql.= " ORDER BY a.email";
|
||||
//print $sql;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user