From 1315e9a2ba9bafb987da926830d8adbb76a24a06 Mon Sep 17 00:00:00 2001 From: fhenry Date: Fri, 30 Nov 2012 04:40:06 +0100 Subject: [PATCH 1/2] Add import_key attribute into contact class creation SQL request --- htdocs/contact/class/contact.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 4e2d80e7bd1..e95daae621b 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -127,6 +127,7 @@ class Contact extends CommonObject $sql.= ", priv"; $sql.= ", canvas"; $sql.= ", entity"; + $sql.= ", import_key"; $sql.= ") VALUES ("; $sql.= "'".$this->db->idate($now)."',"; if ($this->socid > 0) $sql.= " ".$this->socid.","; @@ -136,7 +137,8 @@ class Contact extends CommonObject $sql.= " ".($user->id > 0 ? "'".$user->id."'":"null").","; $sql.= " ".$this->priv.","; $sql.= " ".($this->canvas?"'".$this->canvas."'":"null").","; - $sql.= " ".$conf->entity; + $sql.= " ".$conf->entity.","; + $sql.= " ".$this->import_key.","; $sql.= ")"; dol_syslog(get_class($this)."::create sql=".$sql); From f7b6f447678c42e3e7e311fc84cb36b459a9b152 Mon Sep 17 00:00:00 2001 From: fhenry Date: Fri, 30 Nov 2012 04:51:11 +0100 Subject: [PATCH 2/2] oops, correct version --- htdocs/contact/class/contact.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index e95daae621b..fd8a2c82101 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -138,7 +138,7 @@ class Contact extends CommonObject $sql.= " ".$this->priv.","; $sql.= " ".($this->canvas?"'".$this->canvas."'":"null").","; $sql.= " ".$conf->entity.","; - $sql.= " ".$this->import_key.","; + $sql.= " ".$this->import_key; $sql.= ")"; dol_syslog(get_class($this)."::create sql=".$sql);