forked from extern/egroupware
Fix addition of hr profiles
This commit is contained in:
parent
4af9f4af7d
commit
b2da5d14f0
@ -61,7 +61,7 @@
|
||||
$addnew['owner'] = $phpgw_info["user"]["account_id"];
|
||||
$addnew['id'] = '';
|
||||
|
||||
if ($account=True) { addressbook_add_entry($addnew['owner'],$addnew,'','',True); }
|
||||
if ($addnew['tid']) { addressbook_add_entry($addnew['owner'],$addnew,'','',$addnew['tid']); }
|
||||
else { addressbook_add_entry($addnew['owner'],$addnew); }
|
||||
|
||||
$fields = addressbook_read_last_entry($qfields);
|
||||
|
@ -483,14 +483,18 @@
|
||||
return $return_fields;
|
||||
}
|
||||
|
||||
function add($owner,$fields,$access='',$cat_id='')
|
||||
function add($owner,$fields,$access='',$cat_id='',$tid='n')
|
||||
{
|
||||
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,"
|
||||
if ($fields['lid']) {
|
||||
$lid[0] = 'lid,';
|
||||
$lid[1] = $fields['lid']."','";
|
||||
}
|
||||
$this->db->query("insert into $this->std_table (owner,access,cat_id,tid,".$lid[0]
|
||||
. implode(",",$this->stock_contact_fields)
|
||||
. ") values ('$owner','$access','$cat_id','"
|
||||
. ") values ('$owner','$access','$cat_id','$tid','".$lid[1]
|
||||
. implode("','",$this->loop_addslashes($stock_fields)) . "')",__LINE__,__FILE__);
|
||||
|
||||
$this->db->query("select max(id) from $this->std_table ",__LINE__,__FILE__);
|
||||
|
Loading…
Reference in New Issue
Block a user