From ee7fb506f332952004a8b94ab474321c8528f430 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 12 Jan 2017 12:27:46 +0100 Subject: [PATCH] Add no_sel_options to preferences settings in order to be able to use taglist with no sel_options --- preferences/inc/class.preferences_settings.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/preferences/inc/class.preferences_settings.inc.php b/preferences/inc/class.preferences_settings.inc.php index f02be67cf7..de5c43973e 100644 --- a/preferences/inc/class.preferences_settings.inc.php +++ b/preferences/inc/class.preferences_settings.inc.php @@ -184,6 +184,10 @@ 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); + } //_debug_array($repository); $prefs = &$repository[$appname]; @@ -243,7 +247,7 @@ class preferences_settings if (isset($value) && $value !== '' && $value !== '**NULL**' && $value !== array()) { - if (is_array($value)) $value = implode(',',$value); // multiselect + if (is_array($value) && !$this->settings[$var]['no_sel_options']) $value = implode(',',$value); // multiselect $prefs[$var] = $value; @@ -392,7 +396,7 @@ class preferences_settings break; } // move values/options to sel_options array - if (isset($setting['values']) && is_array($setting['values'])) + if (isset($setting['values']) && is_array($setting['values']) && !$setting['no_sel_options']) { if ($old_type != 'multiselect' && $old_type != 'notify') {