From 837dcc45728693c108bf2bb2a6797942257b539c Mon Sep 17 00:00:00 2001 From: the_systech Date: Tue, 6 Nov 2001 16:54:15 +0000 Subject: 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 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'phpBB/install.php') 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 -- cgit v1.2.1