diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 1186de5e4ad0d556665ce93f62672c0c5265767b..77591686983adf8fa8be8e3761413d3f9722fe51 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -83,6 +83,8 @@ class Project extends CommonObject $error = 0; $ret = 0; + $now=dol_now(); + // Check parameters if (!trim($this->ref)) { @@ -113,9 +115,9 @@ class Project extends CommonObject $sql.= ", " . $user->id; $sql.= ", 0"; $sql.= ", " . ($this->public ? 1 : 0); - $sql.= ", " . $this->db->idate(dol_now()); - $sql.= ", " . ($this->date_start != '' ? $this->db->idate($this->date_start) : 'null'); - $sql.= ", " . ($this->date_end != '' ? $this->db->idate($this->date_end) : 'null'); + $sql.= ", '".$this->db->idate($now)."'"; + $sql.= ", " . ($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null'); + $sql.= ", " . ($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null'); $sql.= ", ".$conf->entity; $sql.= ")";