From 127663af77e5faeff41e255f16f2df3916129200 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 26 Nov 2013 16:50:59 +0000 Subject: [PATCH] Fix defaults showing "Array" instead of array values --- 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 0843ae86cd..21b50f125b 100644 --- a/preferences/inc/class.preferences_settings.inc.php +++ b/preferences/inc/class.preferences_settings.inc.php @@ -372,14 +372,18 @@ class preferences_settings $GLOBALS['egw']->preferences->group[$appname][$setting['name']] : $GLOBALS['egw']->preferences->default[$appname][$setting['name']]; - if (isset($setting['values']) && (string)$setting['values'][$default] !== '') + if (isset($setting['values']) && !is_array($setting['values'][$default]) && (string)$setting['values'][$default] !== '') { $default = $setting['values'][$default]; } elseif (strpos($default, ',') !== false) + { + $default = explode(',',$default); + } + if(is_array($default)) { $values = array(); - foreach(explode(',', $default) as $value) + foreach($default as $value) { if (isset($setting['values'][$value])) $values[] = $setting['values'][$value]; }