Fix: missing entity
This commit is contained in:
parent
7976084534
commit
715587ef7e
@ -110,14 +110,23 @@ class Contact extends CommonObject
|
|||||||
if (! $this->socid) $this->socid = 0;
|
if (! $this->socid) $this->socid = 0;
|
||||||
if (! $this->priv) $this->priv = 0;
|
if (! $this->priv) $this->priv = 0;
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (datec, fk_soc, name, fk_user_creat, priv, canvas)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (";
|
||||||
$sql.= " VALUES ('".$this->db->idate($now)."',";
|
$sql.= " datec";
|
||||||
|
$sql.= ", fk_soc";
|
||||||
|
$sql.= ", name";
|
||||||
|
$sql.= ", fk_user_creat";
|
||||||
|
$sql.= ", priv";
|
||||||
|
$sql.= ", canvas";
|
||||||
|
$sql.= ", entity";
|
||||||
|
$sql.= ") VALUES (";
|
||||||
|
$sql.= "'".$this->db->idate($now)."',";
|
||||||
if ($this->socid > 0) $sql.= " ".$this->socid.",";
|
if ($this->socid > 0) $sql.= " ".$this->socid.",";
|
||||||
else $sql.= "null,";
|
else $sql.= "null,";
|
||||||
$sql.= "'".$this->db->escape($this->name)."',";
|
$sql.= "'".$this->db->escape($this->name)."',";
|
||||||
$sql.= " ".($user->id > 0 ? "'".$user->id."'":"null").",";
|
$sql.= " ".($user->id > 0 ? "'".$user->id."'":"null").",";
|
||||||
$sql.= " ".$this->priv.",";
|
$sql.= " ".$this->priv.",";
|
||||||
$sql.= " ".($this->canvas?"'".$this->canvas."'":"null");
|
$sql.= " ".($this->canvas?"'".$this->canvas."'":"null").",";
|
||||||
|
$sql.= " ".$conf->entity;
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
|
|
||||||
dol_syslog("Contact::create sql=".$sql);
|
dol_syslog("Contact::create sql=".$sql);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user