forked from extern/egroupware
Some fixes to ensure we don't put accting fields into the extra table
This commit is contained in:
parent
dd199143a4
commit
f3be3189e4
@ -104,7 +104,18 @@
|
||||
}
|
||||
if ($this->rights & PHPGW_ACL_ADD)
|
||||
{
|
||||
$id = $this->contacts->add($fields['owner'],$fields,$fields['access'],$fields['cat_id'],$fields['tid']);
|
||||
$ab_id = $fields['ab_id'];
|
||||
$owner = $fields['owner'];
|
||||
$access = $fields['access'];
|
||||
$cat_id = $fields['cat_id'];
|
||||
$tid = $fields['tid'];
|
||||
unset($fields['owner']);
|
||||
unset($fields['access']);
|
||||
unset($fields['cat_id']);
|
||||
unset($fields['ab_id']);
|
||||
unset($fields['tid']);
|
||||
|
||||
$id = $this->contacts->add($owner,$fields,$access,$cat_id,$tid);
|
||||
}
|
||||
return $id;
|
||||
}
|
||||
@ -120,9 +131,17 @@
|
||||
{
|
||||
if ($this->rights & PHPGW_ACL_EDIT)
|
||||
{
|
||||
$ab_id = $fields['ab_id'];
|
||||
$owner = $fields['owner'];
|
||||
$access = $fields['access'];
|
||||
$cat_id = $fields['cat_id'];
|
||||
unset($fields['owner']);
|
||||
$this->contacts->update($fields['ab_id'],$owner,$fields,$fields['access'],$fields['cat_id']);
|
||||
unset($fields['access']);
|
||||
unset($fields['cat_id']);
|
||||
unset($fields['ab_id']);
|
||||
unset($fields['tid']);
|
||||
|
||||
$this->contacts->update($ab_id,$owner,$fields,$access,$cat_id);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -538,19 +538,22 @@
|
||||
|
||||
function add($owner,$fields,$access='',$cat_id='',$tid='n')
|
||||
{
|
||||
list($stock_fields,$stock_fieldnames,$extra_fields) = $this->split_stock_and_extras($fields);
|
||||
|
||||
$fields['tid'] = trim($fields['tid']);
|
||||
if(empty($fields['tid']))
|
||||
$tid = $fields['tid'] ? trim($fields['tid']) : $tid;
|
||||
unset($fields['tid']);
|
||||
if(empty($tid))
|
||||
{
|
||||
$fields['tid'] = 'n';
|
||||
$tid = 'n';
|
||||
}
|
||||
|
||||
if ($fields['lid'])
|
||||
{
|
||||
$lid[0] = 'lid,';
|
||||
$lid[1] = $fields['lid']."','";
|
||||
unset($fields['lid']);
|
||||
}
|
||||
|
||||
list($stock_fields,$stock_fieldnames,$extra_fields) = $this->split_stock_and_extras($fields);
|
||||
|
||||
$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','$tid','".$lid[1]
|
||||
|
Loading…
Reference in New Issue
Block a user