Optim: Appel fonction erreur en cas d'erreur.

This commit is contained in:
Laurent Destailleur 2004-08-08 22:10:32 +00:00
parent f3763e7a3e
commit 20536b8348

View File

@ -91,7 +91,6 @@ class Contact
$soc->fetch($this->socid); $soc->fetch($this->socid);
$this->phone_pro = $soc->tel; $this->phone_pro = $soc->tel;
} }
$sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET "; $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET ";
$sql .= " civilite='$this->civilite_id'"; $sql .= " civilite='$this->civilite_id'";
$sql .= ", name='$this->name'"; $sql .= ", name='$this->name'";
@ -108,7 +107,7 @@ class Contact
$sql .= ", phone_mobile = '$this->phone_mobile'"; $sql .= ", phone_mobile = '$this->phone_mobile'";
$sql .= ", jabberid = '$this->jabberid'"; $sql .= ", jabberid = '$this->jabberid'";
if ($user) { if ($user) {
$sql .= ", fk_user_modif=".$user->id; $sql .= ", fk_user_modif='".$user->id."'";
} }
$sql .= " WHERE idp=$id"; $sql .= " WHERE idp=$id";
@ -116,7 +115,7 @@ class Contact
if (!$result) if (!$result)
{ {
print $this->db->error() . '<br>' . $sql; dolibarr_print_error($this->db);
} }
if (defined('MAIN_MODULE_LDAP') && MAIN_MODULE_LDAP) if (defined('MAIN_MODULE_LDAP') && MAIN_MODULE_LDAP)