diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index c7dd83ee253..df3bd5eaf69 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -292,7 +292,8 @@ class Paiement extends CommonObject $note = ($this->note_public ? $this->note_public : $this->note); $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement (entity, ref, datec, datep, amount, multicurrency_amount, fk_paiement, num_paiement, note, ext_payment_id, ext_payment_site, fk_user_creat, pos_change)"; - $sql .= " VALUES (".$conf->entity.", '".$this->db->escape($this->ref)."', '".$this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', ".$total.", ".$mtotal.", ".$this->paiementid.", '".$this->db->escape($num_payment)."', '".$this->db->escape($note)."', ".($this->ext_payment_id ? "'".$this->db->escape($this->ext_payment_id)."'" : "null").", ".($this->ext_payment_site ? "'".$this->db->escape($this->ext_payment_site)."'" : "null").", ".$user->id.", ".((int) $this->pos_change).")"; + $sql .= " VALUES (".$conf->entity.", '".$this->db->escape($this->ref)."', '".$this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', ".$total.", ".$mtotal.", ".$this->paiementid.", "; + $sql .= "'".$this->db->escape($num_payment)."', '".$this->db->escape($note)."', ".($this->ext_payment_id ? "'".$this->db->escape($this->ext_payment_id)."'" : "null").", ".($this->ext_payment_site ? "'".$this->db->escape($this->ext_payment_site)."'" : "null").", ".$user->id.", ".((int) $this->pos_change).")"; $resql = $this->db->query($sql); if ($resql) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index c8af89ba97e..786241f4b34 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -251,7 +251,7 @@ class EmailCollector extends CommonObject if (is_array($this->filters) && count($this->filters)) { $emailcollectorfilter = new EmailCollectorFilter($this->db); - foreach($this->filters as $filter) { + foreach ($this->filters as $filter) { $emailcollectorfilter->type = $filter['type']; $emailcollectorfilter->rulevalue = $filter['rulevalue']; $emailcollectorfilter->fk_emailcollector = $this->id; @@ -264,7 +264,7 @@ class EmailCollector extends CommonObject if (is_array($this->filters) && count($this->filters)) { $emailcollectoroperation = new EmailCollectorAction($this->db); - foreach($this->actions as $operation) { + foreach ($this->actions as $operation) { $emailcollectoroperation->type = $operation['type']; $emailcollectoroperation->actionparam = $operation['actionparam']; $emailcollectoroperation->fk_emailcollector = $this->id;