aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/install_install.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-11-19 16:44:30 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-11-19 16:44:30 +0000
commitc698a2571a9da98d3cb77852220f46149066ac90 (patch)
tree1a8732352035826a56452ac442c458328f83f0a8 /phpBB/install/install_install.php
parenta4d0eba7814d633ee3b4a7f0d9bc47854c5845a5 (diff)
downloadforums-c698a2571a9da98d3cb77852220f46149066ac90.tar
forums-c698a2571a9da98d3cb77852220f46149066ac90.tar.gz
forums-c698a2571a9da98d3cb77852220f46149066ac90.tar.bz2
forums-c698a2571a9da98d3cb77852220f46149066ac90.tar.xz
forums-c698a2571a9da98d3cb77852220f46149066ac90.zip
further updates
git-svn-id: file:///svn/phpbb/trunk@8248 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/install_install.php')
-rwxr-xr-xphpBB/install/install_install.php22
1 files changed, 18 insertions, 4 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 720eddebcd..3afdb66e1e 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1111,11 +1111,18 @@ class install_install extends module
// If we get here and the extension isn't loaded it should be safe to just go ahead and load it
$available_dbms = get_available_dbms($data['dbms']);
+ if (!isset($available_dbms[$data['dbms']]))
+ {
+ // Someone's been silly and tried providing a non-existant dbms
+ $this->p_master->redirect("index.$phpEx?mode=install");
+ }
+
+ $dbms = $available_dbms[$data['dbms']]['DRIVER'];
+
// Load the appropriate database class if not already loaded
- include($phpbb_root_path . 'includes/db/' . $available_dbms[$data['dbms']]['DRIVER'] . '.' . $phpEx);
+ include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
// Instantiate the database
- $sql_db = 'dbal_' . $available_dbms[$data['dbms']]['DRIVER'];
$db = new $sql_db();
$db->sql_connect($data['dbhost'], $data['dbuser'], $data['dbpasswd'], $data['dbname'], $data['dbport'], false, false);
@@ -1388,11 +1395,18 @@ class install_install extends module
// If we get here and the extension isn't loaded it should be safe to just go ahead and load it
$available_dbms = get_available_dbms($data['dbms']);
+ if (!isset($available_dbms[$data['dbms']]))
+ {
+ // Someone's been silly and tried providing a non-existant dbms
+ $this->p_master->redirect("index.$phpEx?mode=install");
+ }
+
+ $dbms = $available_dbms[$data['dbms']]['DRIVER'];
+
// Load the appropriate database class if not already loaded
- include($phpbb_root_path . 'includes/db/' . $available_dbms[$data['dbms']]['DRIVER'] . '.' . $phpEx);
+ include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
// Instantiate the database
- $sql_db = 'dbal_' . $available_dbms[$data['dbms']]['DRIVER'];
$db = new $sql_db();
$db->sql_connect($data['dbhost'], $data['dbuser'], $data['dbpasswd'], $data['dbname'], $data['dbport'], false, false);