user class PMA_Config

This commit is contained in:
Sebastian Mendel
2005-11-30 15:32:47 +00:00
parent e16cc93094
commit 95fa17e47e

View File

@@ -5,18 +5,21 @@
// phpMyAdmin setup script by Michal Čihař <michal@cihar.com>
// Grab phpMyAdmin version and PMA_dl function
$cfg['GD2Available'] = 'auto';
require('../libraries/defines.lib.php');
unset($cfg);
define( 'PMA_MINIMUM_COMMON', TRUE );
chdir('..');
require_once('./libraries/common.lib.php');
// Script information
$script_info = 'phpMyAdmin ' . PMA_VERSION . ' setup script by Michal Čihař <michal@cihar.com>';
$script_version = '$Id$';
// Grab configuration defaults
require('../config.default.php');
$PMA_Config = new PMA_Config();
$PMA_Config->enableBc();
$default_cfg = $cfg;
unset($cfg);
unset( $cfg );
chdir('scripts');
/**
* Removes slashes from string if needed (eg. magic quotes are enabled)
@@ -1713,7 +1716,7 @@ switch ($action) {
break;
}
$version_local = version_to_int(PMA_VERSION);
$version_local = version_to_int( $GLOBALS['PMA_Config']->get('PMA_VERSION') );
if ($version_local === FALSE) {
message('error', 'Unparsable version string.');
break;
@@ -1738,7 +1741,7 @@ switch ($action) {
case '':
message('notice', 'You want to configure phpMyAdmin using web interface. Please note that this only allows basic setup, please read <a href="../Documentation.html#config">documentation</a> to see full description of all configuration directives.', 'Welcome');
if (PMA_PHP_INT_VERSION < 40100) {
if ( $GLOBALS['PMA_Config']->get( 'PMA_PHP_INT_VERSION' ) < 40100) {
message('warning', 'Please upgrade to PHP 4.1.0, it is required for phpMyAdmin.', 'Too old PHP');
}