diff --git a/ChangeLog b/ChangeLog index a681347d9..fc59aeb60 100755 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ $Source$ * Documentation.html, config.default.php (deleted), libraries/Config.class.php, libraries/config.default.php: Move config.default.php to librarires (bug #1365759). + * scripts/setup.php: Adapted to new Config class, fix code generation. 2005-11-30 Sebastian Mendel * libraries/Config.class.php: diff --git a/scripts/setup.php b/scripts/setup.php index 308b981ca..4536846c3 100644 --- a/scripts/setup.php +++ b/scripts/setup.php @@ -9,17 +9,13 @@ define( 'PMA_MINIMUM_COMMON', TRUE ); chdir('..'); require_once('./libraries/common.lib.php'); -// Script information -$script_info = 'phpMyAdmin ' . PMA_VERSION . ' setup script by Michal Čihař '; -$script_version = '$Id$'; - - // Grab configuration defaults $PMA_Config = new PMA_Config(); -$PMA_Config->enableBc(); -$default_cfg = $cfg; -unset( $cfg ); -chdir('scripts'); + +// Script information +$script_info = 'phpMyAdmin ' . $PMA_Config->get('PMA_VERSION') . ' setup script by Michal Čihař '; +$script_version = '$Id$'; + /** * Removes slashes from string if needed (eg. magic quotes are enabled) @@ -43,17 +39,17 @@ if (isset($_POST['action'])) { $action = ''; } -if (isset($_POST['cfg']) && $action != 'clear' ) { +if (isset($_POST['configuration']) && $action != 'clear' ) { // Grab previous configuration, if it should not be cleared - $cfg = unserialize(remove_slashes($_POST['cfg'])); + $configuration = unserialize(remove_slashes($_POST['configuration'])); } else { // Start with empty configuration - $cfg = array(); + $configuration = array(); } // We rely on Servers array to exist, so create it here -if (!isset($cfg['Servers']) || !is_array($cfg['Servers'])) { - $cfg['Servers'] = array(); +if (!isset($configuration['Servers']) || !is_array($configuration['Servers'])) { + $configuration['Servers'] = array(); } // Used later @@ -80,7 +76,7 @@ echo '' . "\n"; - phpMyAdmin <?php echo PMA_VERSION; ?> setup + phpMyAdmin <?php echo $PMA_Config->get('PMA_VERSION'); ?> setup