From f767742f6763d1b7e4672250223b38be6dfc39fe Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 10 Nov 2010 09:32:57 +0000 Subject: [PATCH] only explode default value by comma, if we allow multiple values (otherwise defaults containing commas are never displayed, eg. addressbook link_title or fileas_type --- preferences/inc/class.uisettings.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/preferences/inc/class.uisettings.inc.php b/preferences/inc/class.uisettings.inc.php index 49c0fd1edd..5f2a580d35 100755 --- a/preferences/inc/class.uisettings.inc.php +++ b/preferences/inc/class.uisettings.inc.php @@ -536,7 +536,6 @@ $extra = array('**NULL**' => lang('Users choice')); break; } - #if ($extra) $values = $extra + $values; if (is_array($extra)) $values = $extra + (is_array($values)?$values:array($values)); $select = html::select($GLOBALS['type'].'['.$name.']',$default,$values,true); @@ -558,8 +557,10 @@ $values += $val; } } + $default_value = $GLOBALS['egw']->preferences->default[$_appname][$name]; + if ($multiple) $default_value = explode(',',$default_value); $defs = array(); - foreach(explode(',',$GLOBALS['egw']->preferences->default[$_appname][$name]) as $def) + foreach((array)$default_value as $def) { if ($values[$def]) $defs[] = $values[$def]; }