User prefs and Iconic settings - ID: 3216140

This commit is contained in:
Aris Feryanto
2011-03-21 03:28:50 +07:00
committed by Michal Čihař
parent 46e1a1ab42
commit 58ae4e7f1d

View File

@@ -468,7 +468,10 @@ class FormDisplay
// (allows to skip 0 == 'string' equalling to true) or identity (for string-string) // (allows to skip 0 == 'string' equalling to true) or identity (for string-string)
if (($vk == $value && !(is_numeric($value_cmp) xor is_numeric($vk))) if (($vk == $value && !(is_numeric($value_cmp) xor is_numeric($vk)))
|| $vk === $value) { || $vk === $value) {
settype($value, gettype($vk)); // keep boolean value as boolean
if (!is_bool($value)) {
settype($value, gettype($vk));
}
return true; return true;
} }
} }
@@ -561,6 +564,12 @@ class FormDisplay
} }
break; break;
case 'select': case 'select':
// special treatment for NavigationBarIconic and PropertiesIconic
if ($key === 'NavigationBarIconic' || $key === 'PropertiesIconic') {
if ($_POST[$key] !== 'both') {
settype($_POST[$key], 'boolean');
}
}
if (!$this->_validateSelect($_POST[$key], $form->getOptionValueList($system_path))) { if (!$this->_validateSelect($_POST[$key], $form->getOptionValueList($system_path))) {
$this->errors[$work_path][] = __('Incorrect value'); $this->errors[$work_path][] = __('Incorrect value');
$result = false; $result = false;