forked from extern/egroupware
* Mergeprint in all apps: fixed missing validation message for non-existing pathes and allow to unset default of "/templates/appname"
This commit is contained in:
parent
6a7b991fb7
commit
dc184e2622
@ -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) */
|
||||
|
@ -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 "<p>create_input_box('$label_name', '$preference_name][$type', '$help', '$default', '', '', '', $run_lang, '$def_text')</p>\n";
|
||||
//echo "<p>create_input_box('$label_name', '$preference_name][$type', '$help', '$default', '$size', '', '', $run_lang, '$def_text')</p>\n";
|
||||
$this->create_input_box($label_name,$preference_name.']['.$type,
|
||||
$help,$default,$size,'','',$run_lang,$def_text);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user