diff options
author | Igor Wiedler <igor@wiedler.ch> | 2012-07-21 17:43:43 +0200 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2012-07-21 18:11:14 +0200 |
commit | 90a957ad26f52e26c3979464c5ac15b1fd0fcc28 (patch) | |
tree | 8ddda79bc487e39172cd0e75573e5d0c775e74cb /phpBB/install/install_install.php | |
parent | f7f78adeb910c84e86414dd6f6470631f5a47d8f (diff) | |
download | forums-90a957ad26f52e26c3979464c5ac15b1fd0fcc28.tar forums-90a957ad26f52e26c3979464c5ac15b1fd0fcc28.tar.gz forums-90a957ad26f52e26c3979464c5ac15b1fd0fcc28.tar.bz2 forums-90a957ad26f52e26c3979464c5ac15b1fd0fcc28.tar.xz forums-90a957ad26f52e26c3979464c5ac15b1fd0fcc28.zip |
[ticket/11015] Make DBAL classes autoloadable
PHPBB3-11015
This allows us to just create the object without having to include the
driver first. However, it also means that users must specify the full
class name in config.php
Diffstat (limited to 'phpBB/install/install_install.php')
-rw-r--r-- | phpBB/install/install_install.php | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 40dee7b3d7..520163ef9d 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -250,7 +250,7 @@ class install_install extends module 'S_EXPLAIN' => true, 'S_LEGEND' => false, )); - + // Check for php json support if (@extension_loaded('json')) { @@ -1144,11 +1144,8 @@ class install_install extends module $dbms = $available_dbms[$data['dbms']]['DRIVER']; - // Load the appropriate database class if not already loaded - include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); - // Instantiate the database - $db = new $sql_db(); + $db = new $dbms(); $db->sql_connect($data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport'], false, false); // NOTE: trigger_error does not work here. @@ -1444,11 +1441,8 @@ class install_install extends module $dbms = $available_dbms[$data['dbms']]['DRIVER']; - // Load the appropriate database class if not already loaded - include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx); - // Instantiate the database - $db = new $sql_db(); + $db = new $dbms(); $db->sql_connect($data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport'], false, false); // NOTE: trigger_error does not work here. |