forked from extern/egroupware
Use egw_customfields::update() instead of so->save(), since it handles the arrays and cache already.
This commit is contained in:
parent
ea5ec6b787
commit
629c66d00e
@ -271,8 +271,6 @@ class customfields
|
|||||||
break;
|
break;
|
||||||
case 'save':
|
case 'save':
|
||||||
case 'apply':
|
case 'apply':
|
||||||
$content['cf_type2'] = implode(',',(array)$content['cf_type2']);
|
|
||||||
$content['cf_private'] = implode(',',(array)$content['cf_private']);
|
|
||||||
if (!empty($content['cf_values']))
|
if (!empty($content['cf_values']))
|
||||||
{
|
{
|
||||||
$values = array();
|
$values = array();
|
||||||
@ -284,8 +282,15 @@ class customfields
|
|||||||
}
|
}
|
||||||
$content['cf_values'] = $values;
|
$content['cf_values'] = $values;
|
||||||
}
|
}
|
||||||
$content['cf_values'] = json_encode($content['cf_values']);
|
$update_content = array();
|
||||||
$this->so->save($content);
|
foreach($content as $key => $value)
|
||||||
|
{
|
||||||
|
if(substr($key,0,3) == 'cf_')
|
||||||
|
{
|
||||||
|
$update_content[substr($key,3)] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
egw_customfields::update($update_content);
|
||||||
egw_framework::refresh_opener('Saved', 'admin', $cf_id, 'edit');
|
egw_framework::refresh_opener('Saved', 'admin', $cf_id, 'edit');
|
||||||
if ($action != 'save')
|
if ($action != 'save')
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user