Fix regression in update contact

This commit is contained in:
Laurent Destailleur 2018-04-11 14:38:56 +02:00
parent edb59c05dc
commit 560038fa18

View File

@ -311,7 +311,7 @@ class Contact extends CommonObject
$sql .= ", email='".$this->db->escape($this->email)."'";
$sql .= ", skype='".$this->db->escape($this->skype)."'";
$sql .= ", photo='".$this->db->escape($this->photo)."'";
$sql .= ", birthday='".$this->db->idate($this->birthday)."'";
$sql .= ", birthday=".($this->birthday ? "'".$this->db->idate($this->birthday)."'" : "");
$sql .= ", note_private = ".(isset($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null");
$sql .= ", note_public = ".(isset($this->note_public)?"'".$this->db->escape($this->note_public)."'":"null");
$sql .= ", phone = ".(isset($this->phone_pro)?"'".$this->db->escape($this->phone_pro)."'":"null");
@ -501,8 +501,8 @@ class Contact extends CommonObject
$resql = $this->db->query($sql);
if (! $resql)
{
$error++;
$this->error=$this->db->lasterror();
$error++;
$this->error=$this->db->lasterror();
}
// Mis a jour alerte birthday