aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install.php
diff options
context:
space:
mode:
authorthe_systech <the_systech@users.sourceforge.net>2001-11-06 16:54:15 +0000
committerthe_systech <the_systech@users.sourceforge.net>2001-11-06 16:54:15 +0000
commit837dcc45728693c108bf2bb2a6797942257b539c (patch)
tree161602ffe64572606d695566e2582e012421642d /phpBB/install.php
parent05fa8e8c221fc38fcb03e74da54edd3f2a28847c (diff)
downloadforums-837dcc45728693c108bf2bb2a6797942257b539c.tar
forums-837dcc45728693c108bf2bb2a6797942257b539c.tar.gz
forums-837dcc45728693c108bf2bb2a6797942257b539c.tar.bz2
forums-837dcc45728693c108bf2bb2a6797942257b539c.tar.xz
forums-837dcc45728693c108bf2bb2a6797942257b539c.zip
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
Diffstat (limited to 'phpBB/install.php')
-rw-r--r--phpBB/install.php27
1 files changed, 24 insertions, 3 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 .= '</select>';
+ $upgrade_option = '<select name="upgrade"';
+ $upgrade_option .= 'onchange="if(this.options[this.selectedIndex].value==1)
+ {
+ document.install_form.dbms.selectedIndex=0;
+ document.install_form.dbms.disabled=1;
+ }
+ else
+ {
+ document.install_form.dbms.disabled=0;
+ }">';
+ $upgrade_option .= '<option value="0">'.$lang['Install'].'</option>';
+ $upgrade_option .= '<option value="1">'.$lang['Upgrade'].'</option></select>';
+
$s_hidden_fields = '<input type="hidden" name="install_step" value="1" />';
$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