aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGraham Eames <grahamje@users.sourceforge.net>2006-06-26 20:13:07 +0000
committerGraham Eames <grahamje@users.sourceforge.net>2006-06-26 20:13:07 +0000
commitc47638293424af5ac79372fe84c3a01e9719d5aa (patch)
tree1dfc4870d423a651d1f25a5d63aa243f76ba7d5c
parent2cc905b28eb7213a28c4b64cce359be227222527 (diff)
downloadforums-c47638293424af5ac79372fe84c3a01e9719d5aa.tar
forums-c47638293424af5ac79372fe84c3a01e9719d5aa.tar.gz
forums-c47638293424af5ac79372fe84c3a01e9719d5aa.tar.bz2
forums-c47638293424af5ac79372fe84c3a01e9719d5aa.tar.xz
forums-c47638293424af5ac79372fe84c3a01e9719d5aa.zip
Split the final step of the install into 2 steps
This should help to avoid any timeouts on slow servers with the amount being done git-svn-id: file:///svn/phpbb/trunk@6127 89ea8834-ac86-4346-8a33-228a782c2dd0
-rwxr-xr-xphpBB/install/install_install.php38
-rwxr-xr-xphpBB/language/en/install.php2
2 files changed, 36 insertions, 4 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index ad762daf0f..adf38e4d86 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -25,7 +25,7 @@ if (!empty($setmodules))
'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1),
'module_order' => 10,
'module_subs' => '',
- 'module_stages' => array('INTRO', 'REQUIREMENTS', 'DATABASE', 'ADMINISTRATOR', 'CONFIG_FILE', 'ADVANCED', 'FINAL'),
+ 'module_stages' => array('INTRO', 'REQUIREMENTS', 'DATABASE', 'ADMINISTRATOR', 'CONFIG_FILE', 'ADVANCED', 'CREATE_TABLE', 'FINAL'),
'module_reqs' => ''
);
}
@@ -84,8 +84,12 @@ class install_install extends module
break;
- case 'final' :
+ case 'create_table':
$this->load_schema($mode, $sub);
+
+ break;
+
+ case 'final' :
$this->add_modules($mode, $sub);
$this->add_language($mode, $sub);
$this->add_bots($mode, $sub);
@@ -889,7 +893,7 @@ class install_install extends module
$submit = $lang['NEXT_STEP'];
- $url = $this->p_master->module_url . "?mode=$mode&amp;sub=final";
+ $url = $this->p_master->module_url . "?mode=$mode&amp;sub=create_table";
$template->assign_vars(array(
'BODY' => $lang['STAGE_ADVANCED_EXPLAIN'],
@@ -1156,7 +1160,22 @@ class install_install extends module
$this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__);
}
}
-
+
+ foreach ($this->request_vars as $var)
+ {
+ $s_hidden_fields .= '<input type="hidden" name="' . $var . '" value="' . $$var . '" />';
+ }
+
+ $submit = $lang['NEXT_STEP'];
+
+ $url = $this->p_master->module_url . "?mode=$mode&amp;sub=final";
+
+ $template->assign_vars(array(
+ 'BODY' => $lang['STAGE_CREATE_TABLE_EXPLAIN'],
+ 'L_SUBMIT' => $submit,
+ 'S_HIDDEN' => $s_hidden_fields,
+ 'U_ACTION' => $url,
+ ));
}
/**
@@ -1172,6 +1191,17 @@ class install_install extends module
$$var = request_var($var, '');
}
+ // Load the appropriate database class if not already loaded
+ include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+
+ // Instantiate the database
+ $sql_db = 'dbal_' . $dbms;
+ $db = new $sql_db();
+ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
+
+ // NOTE: trigger_error does not work here.
+ $db->return_on_error = true;
+
include_once($phpbb_root_path . 'includes/constants.' . $phpEx);
include_once($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx);
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index d9bf5d9148..2844e7be79 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -207,6 +207,8 @@ $lang = array_merge($lang, array(
'STAGE_ADVANCED' => 'Advanced Settings',
'STAGE_ADVANCED_EXPLAIN' => 'The settings on this page are only necessary to set if you know that you require something different from the default. If unsure, just proceed to the next page, this can be altered from the Administration Panel later.',
'STAGE_CONFIG_FILE' => 'Configuration File',
+ 'STAGE_CREATE_TABLE' => 'Create Database Tables',
+ 'STAGE_CREATE_TABLE_EXPLAIN' => 'The database tables used by phpBB 3.0 have been created and populated with some initial data. Proceed to the next screen to finish installing phpBB.',
'STAGE_DATABASE' => 'Database Settings',
'STAGE_FINAL' => 'Final Stage',
'STAGE_INTRO' => 'Introduction',