user class PMA_Config
This commit is contained in:
@@ -5,18 +5,21 @@
|
|||||||
// phpMyAdmin setup script by Michal Čihař <michal@cihar.com>
|
// phpMyAdmin setup script by Michal Čihař <michal@cihar.com>
|
||||||
|
|
||||||
// Grab phpMyAdmin version and PMA_dl function
|
// Grab phpMyAdmin version and PMA_dl function
|
||||||
$cfg['GD2Available'] = 'auto';
|
define( 'PMA_MINIMUM_COMMON', TRUE );
|
||||||
require('../libraries/defines.lib.php');
|
chdir('..');
|
||||||
unset($cfg);
|
require_once('./libraries/common.lib.php');
|
||||||
|
|
||||||
// Script information
|
// Script information
|
||||||
$script_info = 'phpMyAdmin ' . PMA_VERSION . ' setup script by Michal Čihař <michal@cihar.com>';
|
$script_info = 'phpMyAdmin ' . PMA_VERSION . ' setup script by Michal Čihař <michal@cihar.com>';
|
||||||
$script_version = '$Id$';
|
$script_version = '$Id$';
|
||||||
|
|
||||||
|
|
||||||
// Grab configuration defaults
|
// Grab configuration defaults
|
||||||
require('../config.default.php');
|
$PMA_Config = new PMA_Config();
|
||||||
|
$PMA_Config->enableBc();
|
||||||
$default_cfg = $cfg;
|
$default_cfg = $cfg;
|
||||||
unset($cfg);
|
unset( $cfg );
|
||||||
|
chdir('scripts');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes slashes from string if needed (eg. magic quotes are enabled)
|
* Removes slashes from string if needed (eg. magic quotes are enabled)
|
||||||
@@ -1713,7 +1716,7 @@ switch ($action) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$version_local = version_to_int(PMA_VERSION);
|
$version_local = version_to_int( $GLOBALS['PMA_Config']->get('PMA_VERSION') );
|
||||||
if ($version_local === FALSE) {
|
if ($version_local === FALSE) {
|
||||||
message('error', 'Unparsable version string.');
|
message('error', 'Unparsable version string.');
|
||||||
break;
|
break;
|
||||||
@@ -1738,7 +1741,7 @@ switch ($action) {
|
|||||||
case '':
|
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');
|
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');
|
message('warning', 'Please upgrade to PHP 4.1.0, it is required for phpMyAdmin.', 'Too old PHP');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user