diff --git a/libraries/config/FormDisplay.class.php b/libraries/config/FormDisplay.class.php index 5a08f5e87..fb0705227 100644 --- a/libraries/config/FormDisplay.class.php +++ b/libraries/config/FormDisplay.class.php @@ -498,7 +498,7 @@ class FormDisplay $values = array(); $to_save = array(); - $is_setup_script = defined('PMA_SETUP') && PMA_SETUP; + $is_setup_script = defined('PMA_SETUP'); if ($is_setup_script) { $this->_loadUserprefsInfo(); } @@ -706,7 +706,7 @@ class FormDisplay if ($this->userprefs_keys === null) { $this->userprefs_keys = array_flip(PMA_read_userprefs_fieldnames()); // read real config for user preferences display - $userprefs_disallow = defined('PMA_SETUP') && PMA_SETUP + $userprefs_disallow = defined('PMA_SETUP') ? ConfigFile::getInstance()->get('UserprefsDisallow', array()) : $GLOBALS['cfg']['UserprefsDisallow']; $this->userprefs_disallow = array_flip($userprefs_disallow); @@ -767,7 +767,7 @@ class FormDisplay } } } - if (!defined('PMA_SETUP') || !PMA_SETUP) { + if (!defined('PMA_SETUP')) { if (($system_path == 'MaxDbList' || $system_path == 'MaxTableList' || $system_path == 'QueryHistoryMax')) { $opts['comment'] = sprintf(__('maximum %s'), $GLOBALS['cfg'][$system_path]); diff --git a/libraries/config/FormDisplay.tpl.php b/libraries/config/FormDisplay.tpl.php index 40c59d1c4..866720815 100644 --- a/libraries/config/FormDisplay.tpl.php +++ b/libraries/config/FormDisplay.tpl.php @@ -132,7 +132,7 @@ function display_input($path, $name, $description = '', $type, $value, $value_is global $_FormDisplayGroup; static $base_dir, $img_path; - $is_setup_script = defined('PMA_SETUP') && PMA_SETUP; + $is_setup_script = defined('PMA_SETUP'); if ($base_dir === null) { $base_dir = $is_setup_script ? '../' : ''; $img_path = $is_setup_script @@ -298,7 +298,7 @@ function display_group_header($header_text) return; } $colspan = 2; - if (defined('PMA_SETUP') && PMA_SETUP) { + if (defined('PMA_SETUP')) { $colspan++; } ?> @@ -328,7 +328,7 @@ function display_group_footer() function display_fieldset_bottom() { $colspan = 2; - if (defined('PMA_SETUP') && PMA_SETUP) { + if (defined('PMA_SETUP')) { $colspan++; } ?> diff --git a/libraries/config/validate.lib.php b/libraries/config/validate.lib.php index 7c35fffa7..59df2b8f4 100644 --- a/libraries/config/validate.lib.php +++ b/libraries/config/validate.lib.php @@ -29,7 +29,7 @@ function PMA_config_get_validators() if ($validators === null) { $cf = ConfigFile::getInstance(); $validators = $cf->getDbEntry('_validators', array()); - if (!defined('PMA_SETUP') || !PMA_SETUP) { + if (!defined('PMA_SETUP')) { $uvs = $cf->getDbEntry('_userValidators', array()); foreach ($uvs as $field => $uv_list) { $uv_list = (array)$uv_list;