diff -r 645727469415 -r 9be6dba92adf install/upgrade.php --- a/install/upgrade.php Sun Apr 19 18:42:21 2009 -0400 +++ b/install/upgrade.php Sun Apr 19 19:01:08 2009 -0400 @@ -46,13 +46,6 @@ if ( in_array(enano_version(), array('1.0RC1', '1.0RC2', '1.0RC3', '1.0', '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.0.6', '1.1.1', '1.1.2', '1.1.3', '1.1.4', '1.1.5')) ) define('ENANO_UPGRADE_USE_AES_PASSWORDS', 1); -$ui = new Enano_Installer_UI('Enano upgrader', false); - -$stg_welcome = $ui->add_stage('Welcome', true); -$stg_confirm = $ui->add_stage('Confirmation', true); -$stg_upgrade = $ui->add_stage('Perform upgrade', true); -$stg_finish = $ui->add_stage('Finish', true); - // init languages $lang_id_list = array_keys($languages); $lang_id = $lang_id_list[0]; @@ -63,6 +56,14 @@ $lang->load_file(ENANO_ROOT . '/language/' . $language_dir . '/install.json'); $lang->load_file(ENANO_ROOT . '/language/' . $language_dir . '/user.json'); +$ui = new Enano_Installer_UI($lang->get('upgrade_system_title'), false); + +$stg_welcome = $ui->add_stage($lang->get('upgrade_stg_welcome'), true); +$stg_login = $ui->add_stage($lang->get('upgrade_stg_login'), true); +$stg_confirm = $ui->add_stage($lang->get('upgrade_stg_confirm'), true); +$stg_upgrade = $ui->add_stage($lang->get('upgrade_stg_upgrade'), true); +$stg_finish = $ui->add_stage($lang->get('upgrade_stg_finish'), true); + // Version check if ( enano_version() == installer_enano_version() ) { @@ -77,8 +78,37 @@ // Start session manager $session->start(); + +// Welcome page +if ( !isset($_GET['stage']) ) +{ + $ui->show_header(); + + if ( preg_match('/1\.0/', enano_version()) ) + { + // Migrating from 1.0.x + echo '

' . $lang->get('upgrade_welcome_banshee_heading', array('enano_version' => installer_enano_version())) . '

'; + echo '

' . $lang->get('upgrade_welcome_banshee_para1') . '

'; + echo '

' . $lang->get('upgrade_welcome_banshee_para2') . '

'; + } + else + { + // Upgrading from 1.1.x/1.2.x + echo '

' . $lang->get('upgrade_welcome_caoineag_heading', array('enano_version' => installer_enano_version())) . '

'; + echo '

' . $lang->get('upgrade_welcome_caoineag_para1') . '

'; + } + + echo '
'; + echo '' . $lang->get('upgrade_welcome_btn_continue') . ' »'; + echo '
'; + + $ui->show_footer(); + exit; +} + if ( !$session->user_logged_in || ( $session->user_logged_in && $session->auth_level < USER_LEVEL_ADMIN ) ) { + $ui->set_visible_stage($stg_login); if ( isset($_POST['do_login']) ) { if ( !$session->user_logged_in ) @@ -91,7 +121,7 @@ if ( $result['success'] ) { header('HTTP/1.1 302 Some kind of redirect with implied no content'); - header('Location: ' . scriptPath . '/install/' . $session->append_sid('upgrade.php')); + header('Location: ' . scriptPath . '/install/' . $session->append_sid('upgrade.php?stage=confirm')); exit(); } } @@ -103,7 +133,7 @@

get('upgrade_login_msg_auth_needed_title'); ?>

'; + echo '
'; if ( isset($result) ) { @@ -277,9 +307,9 @@
  • get('upgrade_confirm_objective_backup_db', array('dbname' => $dbname)); ?>
  • -
    +
    get('upgrade_confirm_warning_langimport'); ?>
    -