From 837dcc45728693c108bf2bb2a6797942257b539c Mon Sep 17 00:00:00 2001 From: the_systech Date: Tue, 6 Nov 2001 16:54:15 +0000 Subject: [PATCH] Update to "merge" upgrade with Install... (Not fully tested since current upgrade not in CVS) git-svn-id: file:///svn/phpbb/trunk@1282 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install.php | 27 ++++++++++++++++++++--- phpBB/language/lang_english/lang_main.php | 3 +++ phpBB/templates/subSilver/install.tpl | 6 ++++- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/phpBB/install.php b/phpBB/install.php index 996837e822..8903c62f62 100644 --- a/phpBB/install.php +++ b/phpBB/install.php @@ -159,6 +159,7 @@ $table_prefix = ( !empty($HTTP_POST_VARS['prefix']) ) ? $HTTP_POST_VARS['prefix' $ftp_path = ( !empty($HTTP_POST_VARS['ftp_path']) ) ? $HTTP_POST_VARS['ftp_path'] : ""; $ftp_user = ( !empty($HTTP_POST_VARS['ftp_user']) ) ? $HTTP_POST_VARS['ftp_user'] : ""; $ftp_pass = ( !empty($HTTP_POST_VARS['ftp_pass']) ) ? $HTTP_POST_VARS['ftp_pass'] : ""; +$upgrade = ( !empty($HTTP_POST_VARS['upgrade']) ) ? $HTTP_POST_VARS['upgrade']: ''; include($phpbb_root_path.'includes/sql_parse.'.$phpEx); include($phpbb_root_path.'includes/constants.'.$phpEx); @@ -173,6 +174,12 @@ include($phpbb_root_path.'language/lang_' . $language . '/lang_main.'.$phpEx); $template = new Template($phpbb_root_path . "templates/" . $default_template); +if( $upgrade == 1 ) +{ + require('upgrade.'.$phpEx); + $install_step = 1; +} + // // Load default template for install // @@ -359,6 +366,19 @@ else if( empty($install_step) || $admin_pass1 != $admin_pass2 || $dbhost == "" ) } $dbms_options .= ''; + $upgrade_option = ''; + $s_hidden_fields = ''; $template->assign_block_vars("switch_stage_one_install", array()); @@ -376,7 +396,7 @@ else if( empty($install_step) || $admin_pass1 != $admin_pass2 || $dbhost == "" ) "L_DB_USER" => $lang['Database'] . ' ' . $lang['Username'], "L_DB_PASSWORD" => $lang['Database'] . ' ' . $lang['Password'], "L_DB_PREFIX" => $lang['Table_Prefix'], - + "L_UPGRADE" => $lang['Install_Method'], "L_ADMIN_USERNAME" => $lang['Administrator'] . ' ' . $lang['Username'], "L_ADMIN_PASSWORD" => $lang['Administrator'] . ' ' . $lang['Password'], "L_ADMIN_CONFIRM_PASSWORD" => $lang['Confirm'] . ' ' . $lang['Password'], @@ -391,7 +411,8 @@ else if( empty($install_step) || $admin_pass1 != $admin_pass2 || $dbhost == "" ) "S_LANG_SELECT" => $lang_options, "S_DBMS_SELECT" => $dbms_options, - "S_HIDDEN_FIELDS" => $s_hidden_fields, + "S_HIDDEN_FIELDS" => $s_hidden_fields, + "S_UPGRADE_SELECT" => $upgrade_option, "S_FORM_ACTION" => "install.$phpEx") ); @@ -429,7 +450,7 @@ else if( $install_step == 1 ) { - if($dbms != 'odbc') + if($dbms != 'odbc' && $upgrade != 1) { // // Ok we have the db info go ahead and read in the relevant schema diff --git a/phpBB/language/lang_english/lang_main.php b/phpBB/language/lang_english/lang_main.php index ba9e3c3319..4f8ae251b2 100644 --- a/phpBB/language/lang_english/lang_main.php +++ b/phpBB/language/lang_english/lang_main.php @@ -1091,6 +1091,9 @@ $lang['ftp_username'] = "Your FTP Username:"; $lang['ftp_password'] = "Your FTP Password:"; $lang['Transfer_config'] = "Start Transfer"; $lang['ftp_info'] = "Enter Your FTP Information"; +$lang['Install'] = "Install"; +$lang['Upgrade'] = "Upgrade"; +$lang['Install_Method'] = 'Choose your installation method'; // // Ranks admin diff --git a/phpBB/templates/subSilver/install.tpl b/phpBB/templates/subSilver/install.tpl index ace3c15355..8acc9b7092 100644 --- a/phpBB/templates/subSilver/install.tpl +++ b/phpBB/templates/subSilver/install.tpl @@ -116,7 +116,7 @@ a.copyright:hover { color: #000000; text-decoration: underline;}

-
+
@@ -129,6 +129,10 @@ a.copyright:hover { color: #000000; text-decoration: underline;} + + + +
{L_INITIAL_CONFIGURATION}{L_DBMS}: {S_DBMS_SELECT}
{L_UPGRADE}:{S_UPGRADE_SELECT}