The branch, master has been updated via 51684a83627eb9675c7185db938a468a94b8657f (commit) from 9f8c3c8e606d431cda86ad25190f68e077d197e1 (commit)
- Log ----------------------------------------------------------------- commit 51684a83627eb9675c7185db938a468a94b8657f Author: Piotr Przybylski piotrprz@gmail.com Date: Tue Jan 11 00:12:47 2011 +0100
Upper bounds for user prefs were read from already modified settings
-----------------------------------------------------------------------
Summary of changes: libraries/config/validate.lib.php | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/libraries/config/validate.lib.php b/libraries/config/validate.lib.php index 60aa33b..4b591f2 100644 --- a/libraries/config/validate.lib.php +++ b/libraries/config/validate.lib.php @@ -30,6 +30,10 @@ function PMA_config_get_validators() $cf = ConfigFile::getInstance(); $validators = $cf->getDbEntry('_validators', array()); if (!defined('PMA_SETUP')) { + // not in setup script: load additional validators for user preferences + // we need oryginal config values not overwritten by user preferences, creating a new PMA_Config + // instance is a better idea than hacking into its code + $org_cfg = new PMA_Config(CONFIG_FILE); $uvs = $cf->getDbEntry('_userValidators', array()); foreach ($uvs as $field => $uv_list) { $uv_list = (array)$uv_list; @@ -39,7 +43,7 @@ function PMA_config_get_validators() } for ($i = 1; $i < count($uv); $i++) { if (substr($uv[$i], 0, 6) == 'value:') { - $uv[$i] = PMA_array_read(substr($uv[$i], 6), $GLOBALS['cfg']); + $uv[$i] = PMA_array_read(substr($uv[$i], 6), $org_cfg->settings); } } }
hooks/post-receive