fixed the storage of loginid for contacts

This commit is contained in:
Pim Snel 2003-12-17 01:14:43 +00:00
parent d65d0c662d
commit 1e7f7531b8

View File

@ -598,7 +598,10 @@
} }
if (isset($fields['lid'])) if (isset($fields['lid']))
{ {
$lid = array('lid,' => $fields['lid']."','"); //fix by pim
//$lid = array('lid,' => $fields['lid']."','");
$lid[0]='lid,';
$lid[1]=$fields['lid']."','";
} }
list($stock_fields,$stock_fieldnames,$extra_fields) = $this->split_stock_and_extras($fields); list($stock_fields,$stock_fieldnames,$extra_fields) = $this->split_stock_and_extras($fields);
@ -606,10 +609,10 @@
$this->stock_contact_fields['last_mod'] = 'last_mod'; $this->stock_contact_fields['last_mod'] = 'last_mod';
$stock_fields['last_mod'] = $GLOBALS['phpgw']->datetime->gmtnow; $stock_fields['last_mod'] = $GLOBALS['phpgw']->datetime->gmtnow;
$this->db->query("INSERT INTO $this->std_table (owner,access,cat_id,tid,$lid[0]" $SQL="INSERT INTO $this->std_table (owner,access,cat_id,tid,$lid[0]"
. implode(",",$this->stock_contact_fields) . implode(",",$this->stock_contact_fields)
. ") VALUES ($owner,'$fields[access]','$fields[cat_id]','$fields[tid]','$lid[1]" . ") VALUES ($owner,'$fields[access]','$fields[cat_id]','$fields[tid]','$lid[1]"
. implode("','",$this->loop_addslashes($stock_fields)) . "')",__LINE__,__FILE__); $this->db->query($SQL,__LINE__,__FILE__);
$id = $id = $this->db->get_last_insert_id($this->std_table, 'id'); $id = $id = $this->db->get_last_insert_id($this->std_table, 'id');