The branch, master has been updated via 58ae4e7f1d8edebc421edd6991591bf1ba3c4adc (commit) from 46e1a1ab42fd2221fb7b175154c185b8bdd53241 (commit)
- Log ----------------------------------------------------------------- commit 58ae4e7f1d8edebc421edd6991591bf1ba3c4adc Author: Aris Feryanto aris_feryanto@yahoo.com Date: Mon Mar 21 03:28:50 2011 +0700
User prefs and Iconic settings - ID: 3216140
-----------------------------------------------------------------------
Summary of changes: libraries/config/FormDisplay.class.php | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/libraries/config/FormDisplay.class.php b/libraries/config/FormDisplay.class.php index 9e84075..de49140 100644 --- a/libraries/config/FormDisplay.class.php +++ b/libraries/config/FormDisplay.class.php @@ -468,7 +468,10 @@ class FormDisplay // (allows to skip 0 == 'string' equalling to true) or identity (for string-string) if (($vk == $value && !(is_numeric($value_cmp) xor is_numeric($vk))) || $vk === $value) { - settype($value, gettype($vk)); + // keep boolean value as boolean + if (!is_bool($value)) { + settype($value, gettype($vk)); + } return true; } } @@ -561,6 +564,12 @@ class FormDisplay } break; 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))) { $this->errors[$work_path][] = __('Incorrect value'); $result = false;
hooks/post-receive