From 629c66d00ecb2808789cec6d99148ab9903c84e9 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 27 Oct 2014 16:31:24 +0000 Subject: [PATCH] Use egw_customfields::update() instead of so->save(), since it handles the arrays and cache already. --- admin/inc/class.customfields.inc.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/admin/inc/class.customfields.inc.php b/admin/inc/class.customfields.inc.php index d604a9b62e..8a2d2fca74 100644 --- a/admin/inc/class.customfields.inc.php +++ b/admin/inc/class.customfields.inc.php @@ -271,8 +271,6 @@ class customfields break; case 'save': case 'apply': - $content['cf_type2'] = implode(',',(array)$content['cf_type2']); - $content['cf_private'] = implode(',',(array)$content['cf_private']); if (!empty($content['cf_values'])) { $values = array(); @@ -284,8 +282,15 @@ class customfields } $content['cf_values'] = $values; } - $content['cf_values'] = json_encode($content['cf_values']); - $this->so->save($content); + $update_content = array(); + 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'); if ($action != 'save') {