From 362eaddd9781cf5f8d2b3db39d777749c070d261 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Wed, 18 Dec 2002 00:29:43 +0000 Subject: [PATCH] Fixes git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3201 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/install.php | 93 ++++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 40 deletions(-) diff --git a/phpBB/install/install.php b/phpBB/install/install.php index 639e6fac67..8d7cc668b5 100644 --- a/phpBB/install/install.php +++ b/phpBB/install/install.php @@ -22,7 +22,7 @@ // --------- // FUNCTIONS // -function page_header($text) +function page_header($text, $form_action = false) { global $phpEx, $lang; @@ -73,7 +73,7 @@ td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom { background-image: u

- +
'; $s_hidden_fields .= ''; @@ -514,7 +507,7 @@ else if (!empty($HTTP_POST_VARS['send_file']) && $HTTP_POST_VARS['send_file'] == exit; } -else if (!empty($HTTP_POST_VARS['ftp_file']) && !defined("PHPBB_INSTALLED") ) +else if (!empty($HTTP_POST_VARS['ftp_file'])) { // Try to connect ... $conn_id = @ftp_connect('localhost'); @@ -600,7 +593,7 @@ else if (!empty($HTTP_POST_VARS['ftp_file']) && !defined("PHPBB_INSTALLED") ) exit(); } } -else if ((empty($install_step) || $admin_pass1 != $admin_pass2 || empty($admin_pass1) || $dbhost == '') && !defined("PHPBB_INSTALLED")) +else if ((empty($install_step) || $admin_pass1 != $admin_pass2 || empty($admin_pass1) || empty($dbhost))) { // Ok we haven't installed before so lets work our way through the various // steps of the install process. This could turn out to be quite a lengty @@ -610,9 +603,13 @@ else if ((empty($install_step) || $admin_pass1 != $admin_pass2 || empty($admin_p // Namely dbms, dbhost, dbname, dbuser, and dbpasswd. $instruction_text = $lang['Inst_Step_0']; - if ((($HTTP_POST_VARS['admin_pass1'] != $HTTP_POST_VARS['admin_pass2']) && $install_step != '0') || (empty($HTTP_POST_VARS['admin_pass1']) && !empty($dbhost))) + if (!empty($install_step)) { - $instruction_text = $lang['Password_mismatch'] . '
' . $instruction_text; + if ((($HTTP_POST_VARS['admin_pass1'] != $HTTP_POST_VARS['admin_pass2'])) || + (empty($HTTP_POST_VARS['admin_pass1']) || empty($dbhost)) && $HTTP_POST_VARS['cur_lang'] == $language) + { + $error = $lang['Password_mismatch']; + } } $dir = opendir($phpbb_root_path . 'language'); @@ -642,7 +639,7 @@ else if ((empty($install_step) || $admin_pass1 != $admin_pass2 || empty($admin_p } $lang_select .= ''; - $dbms_select = ''; while (list($dbms_name, $details) = @each($available_dbms)) { $selected = ($dbms_name == $dbms) ? 'selected="selected"' : ''; @@ -651,11 +648,11 @@ else if ((empty($install_step) || $admin_pass1 != $admin_pass2 || empty($admin_p $dbms_select .= ''; $upgrade_option = ''; - $s_hidden_fields = ''; + $s_hidden_fields = ''; page_header($instruction_text); @@ -701,6 +698,18 @@ else if ((empty($install_step) || $admin_pass1 != $admin_pass2 || empty($admin_p + + + + + @@ -793,6 +802,9 @@ else { if ($dbms != 'msaccess') { + // Load in the sql parser + include($phpbb_root_path.'includes/sql_parse.'.$phpEx); + // Ok we have the db info go ahead and read in the relevant schema // and work on building the table.. probably ought to provide some // kind of feedback to the user as we are working here in order @@ -928,7 +940,7 @@ else // Unable to open the file writeable do something here as an attempt // to get around that... - if (!($fp = @fopen('config.'.$phpEx, 'w'))) + if (!($fp = @fopen($phpbb_root_path . 'config.'.$phpEx, 'w'))) { $s_hidden_fields = ''; @@ -949,6 +961,7 @@ else '; $s_hidden_fields .= ''; - page_header($lang['Inst_Step_2']); + page_header($lang['Inst_Step_2'], '../login.'.$phpEx); page_common_form($s_hidden_fields, $lang['Finish_Install']); page_footer(); exit;
: