From 0a8e209a31b2de0bfbc0f7b0c9c514b53d361f8d Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 23 Jan 2017 16:01:23 +0100 Subject: [PATCH] Fix preferences tabs getting duplicated, introduced by commit 2707b1da0bd8363198b409c71422842bb6fe2fd9 --- preferences/inc/class.preferences_settings.inc.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/preferences/inc/class.preferences_settings.inc.php b/preferences/inc/class.preferences_settings.inc.php index 08c30b51f2..5839ce6c0c 100644 --- a/preferences/inc/class.preferences_settings.inc.php +++ b/preferences/inc/class.preferences_settings.inc.php @@ -184,10 +184,12 @@ class preferences_settings */ function process_array(array &$repository, array $values, array $types, $appname, $type, $only_verify=false) { - if (!$this->call_hook($appname, $type, $GLOBALS['egw']->preferences->get_account_id())) - { - throw new Api\Exception\WrongParameter("Could not find settings for application: ".$appname); - } + //fetch application specific settings from a hook + $settings = Api\Hooks::single(array( + 'account_id'=>$GLOBALS['egw']->preferences->get_account_id(), + 'location'=>'settings', + 'type' => $type), $appname); + //_debug_array($repository); $prefs = &$repository[$appname]; @@ -247,7 +249,7 @@ class preferences_settings if (isset($value) && $value !== '' && $value !== '**NULL**' && $value !== array()) { - if (is_array($value) && !$this->settings[$var]['no_sel_options']) $value = implode(',',$value); // multiselect + if (is_array($value) && !$settings[$var]['no_sel_options']) $value = implode(',',$value); // multiselect $prefs[$var] = $value;