Clean code
This commit is contained in:
parent
6b355997da
commit
28ba5abb89
@ -335,15 +335,15 @@ class Mailing extends CommonObject
|
||||
|
||||
$target_array=array();
|
||||
|
||||
$sql = "SELECT fk_contact, ";
|
||||
$sql.=" lastname, ";
|
||||
$sql.=" firstname,";
|
||||
$sql.=" email,";
|
||||
$sql.=" other,";
|
||||
$sql.=" source_url,";
|
||||
$sql.=" source_id ,";
|
||||
$sql.=" source_type ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mailing_cibles ";
|
||||
$sql = "SELECT fk_contact,";
|
||||
$sql.= " lastname,";
|
||||
$sql.= " firstname,";
|
||||
$sql.= " email,";
|
||||
$sql.= " other,";
|
||||
$sql.= " source_url,";
|
||||
$sql.= " source_id ,";
|
||||
$sql.= " source_type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mailing_cibles";
|
||||
$sql.= " WHERE fk_mailing = ".$fromid;
|
||||
|
||||
$result=$this->db->query($sql);
|
||||
@ -353,14 +353,16 @@ class Mailing extends CommonObject
|
||||
{
|
||||
while ($obj = $this->db->fetch_object($result)) {
|
||||
|
||||
$target_array[]=array('fk_contact'=>$obj->fk_contact,
|
||||
'lastname'=>$obj->lastname,
|
||||
'firstname'=>$obj->firstname,
|
||||
'email'=>$obj->email,
|
||||
'other'=>$obj->other,
|
||||
'source_url'=>$obj->source_url,
|
||||
'source_id'=>$obj->source_id,
|
||||
'source_type'=>$obj->source_type);
|
||||
$target_array[]=array(
|
||||
'fk_contact'=>$obj->fk_contact,
|
||||
'lastname'=>$obj->lastname,
|
||||
'firstname'=>$obj->firstname,
|
||||
'email'=>$obj->email,
|
||||
'other'=>$obj->other,
|
||||
'source_url'=>$obj->source_url,
|
||||
'source_id'=>$obj->source_id,
|
||||
'source_type'=>$obj->source_type
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,7 +88,6 @@ class mailing_advthirdparties extends MailingTargets
|
||||
|
||||
dol_syslog(get_class($this)."::add_to_target mailing ".$num." targets found", LOG_DEBUG);
|
||||
|
||||
$old = '';
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($result);
|
||||
@ -144,7 +143,6 @@ class mailing_advthirdparties extends MailingTargets
|
||||
|
||||
dol_syslog(get_class($this)."::add_to_target mailing ".$num." targets found");
|
||||
|
||||
$old = '';
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($result);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user