From a0ec697e28f692323201469d646810d6ec8ad281 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sun, 25 Mar 2001 23:21:01 +0000 Subject: [PATCH] Fix sql error in add() --- addressbook/inc/class.contacts_sql.inc.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addressbook/inc/class.contacts_sql.inc.php b/addressbook/inc/class.contacts_sql.inc.php index 95d11e192f..3f9fa39387 100644 --- a/addressbook/inc/class.contacts_sql.inc.php +++ b/addressbook/inc/class.contacts_sql.inc.php @@ -39,7 +39,7 @@ var $ext_table="phpgw_addressbook_extra"; var $account_id; - var $stock_contact_fields; // This is an array of almost the fields in the phpgw_addressbook table, except id,owner,lid,tid + var $stock_contact_fields; // This is an array of almost the fields in the phpgw_addressbook table, except id,owner,lid,tid,access,cat_id var $email_types; // VCard email type array var $total_records; // This will contain numrows for data retrieved var $grants; // This holds all of the users that have granted access to there entrys @@ -110,7 +110,6 @@ domestic OR international(default) parcel(default) postal(default) - work(default) OR home */ $this->adr_types = array( "dom" => lang("Domestic"), @@ -212,7 +211,6 @@ return $return_fields; } - function read_last_entry($fields="") { if (!$fields || empty($fields)) { $fields = $this->stock_contact_fields; } @@ -476,7 +474,7 @@ list($stock_fields,$stock_fieldnames,$extra_fields) = $this->split_stock_and_extras($fields); //$this->db->lock(array("contacts")); - $this->db->query("insert into $this->std_table (owner,access,cat_id" + $this->db->query("insert into $this->std_table (owner,access,cat_id," . implode(",",$this->stock_contact_fields) . ") values ('$owner','$access','$cat_id','" . implode("','",$this->loop_addslashes($stock_fields)) . "')",__LINE__,__FILE__);