diff --git a/preferences/inc/class.bosettings.inc.php b/preferences/inc/class.bosettings.inc.php index c3ad9384ed..8bcba89bdc 100644 --- a/preferences/inc/class.bosettings.inc.php +++ b/preferences/inc/class.bosettings.inc.php @@ -125,7 +125,9 @@ if ($appname == 'preferences') $appname = 'common'; foreach ($this->settings as $name => $data) { - if ((string)$GLOBALS['egw']->preferences->default[$appname][$name] === '' && + // only set not yet set default prefs, so user is able to unset it again with "" + // (only works with type vfs_*, other types delete empty values!) + if (!isset($GLOBALS['egw']->preferences->default[$appname][$name]) && ((string)$data['default'] !== '' || (string)$data['forced'] !== '')) { $default = (string)$data['forced'] !== '' ? $data['forced'] : $data['default']; @@ -169,7 +171,7 @@ } if($this->debug) { - echo 'Preferences array: ' . $app . "\n"; + echo 'Preferences array: ' . $app . "/$type\n"; _debug_array($this->prefs); } /* Ensure that a struct will be returned via xml-rpc (this might change) */ diff --git a/preferences/inc/class.uisettings.inc.php b/preferences/inc/class.uisettings.inc.php index 9109e60043..cc66ee3b4c 100755 --- a/preferences/inc/class.uisettings.inc.php +++ b/preferences/inc/class.uisettings.inc.php @@ -205,7 +205,7 @@ class uisettings } // display verifcation errors also on entering preferences, not only after saving - if (!isset($_POST['save']) || !isset($_POST['apply'])) + if (!isset($_POST['save']) && !isset($_POST['apply'])) { if (!$this->is_admin() || !in_array($GLOBALS['type'], array('user', 'default', 'forced'))) { @@ -275,6 +275,8 @@ class uisettings $valarray['label'], $valarray['name'], $valarray['help'], + $valarray['default'], + $valarray['size'], $valarray['run_lang'] ); break; @@ -436,7 +438,7 @@ class uisettings { return True; } - //echo "
create_input_box('$label_name', '$preference_name][$type', '$help', '$default', '', '', '', $run_lang, '$def_text')
\n"; + //echo "create_input_box('$label_name', '$preference_name][$type', '$help', '$default', '$size', '', '', $run_lang, '$def_text')
\n"; $this->create_input_box($label_name,$preference_name.']['.$type, $help,$default,$size,'','',$run_lang,$def_text); }