|
From: Jonathan H. <the...@us...> - 2001-11-06 16:54:18
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv26369
Modified Files:
install.php
Log Message:
Update to "merge" upgrade with Install... (Not fully tested since current upgrade not in CVS)
Index: install.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/install.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** install.php 2001/11/01 10:43:30 1.11
--- install.php 2001/11/06 16:54:15 1.12
***************
*** 160,163 ****
--- 160,164 ----
$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);
***************
*** 174,177 ****
--- 175,184 ----
$template = new Template($phpbb_root_path . "templates/" . $default_template);
+ if( $upgrade == 1 )
+ {
+ require('upgrade.'.$phpEx);
+ $install_step = 1;
+ }
+
//
// Load default template for install
***************
*** 360,363 ****
--- 367,383 ----
$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" />';
***************
*** 377,381 ****
"L_DB_PASSWORD" => $lang['Database'] . ' ' . $lang['Password'],
"L_DB_PREFIX" => $lang['Table_Prefix'],
!
"L_ADMIN_USERNAME" => $lang['Administrator'] . ' ' . $lang['Username'],
"L_ADMIN_PASSWORD" => $lang['Administrator'] . ' ' . $lang['Password'],
--- 397,401 ----
"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'],
***************
*** 392,396 ****
"S_LANG_SELECT" => $lang_options,
"S_DBMS_SELECT" => $dbms_options,
! "S_HIDDEN_FIELDS" => $s_hidden_fields,
"S_FORM_ACTION" => "install.$phpEx")
);
--- 412,417 ----
"S_LANG_SELECT" => $lang_options,
"S_DBMS_SELECT" => $dbms_options,
! "S_HIDDEN_FIELDS" => $s_hidden_fields,
! "S_UPGRADE_SELECT" => $upgrade_option,
"S_FORM_ACTION" => "install.$phpEx")
);
***************
*** 430,434 ****
if( $install_step == 1 )
{
! if($dbms != 'odbc')
{
//
--- 451,455 ----
if( $install_step == 1 )
{
! if($dbms != 'odbc' && $upgrade != 1)
{
//
|