aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/database_update.php
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2012-07-21 17:43:43 +0200
committerIgor Wiedler <igor@wiedler.ch>2012-07-21 18:11:14 +0200
commit90a957ad26f52e26c3979464c5ac15b1fd0fcc28 (patch)
tree8ddda79bc487e39172cd0e75573e5d0c775e74cb /phpBB/install/database_update.php
parentf7f78adeb910c84e86414dd6f6470631f5a47d8f (diff)
downloadforums-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/database_update.php')
-rw-r--r--phpBB/install/database_update.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 6e99fd56a0..63a949762b 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -91,7 +91,6 @@ phpbb_require_updated('includes/functions_content.' . $phpEx, true);
require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
-require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
phpbb_require_updated('includes/db/db_tools.' . $phpEx);
@@ -121,7 +120,7 @@ $phpbb_class_loader->set_cache($cache->get_driver());
$phpbb_dispatcher = new phpbb_event_dispatcher();
$request = new phpbb_request();
$user = new phpbb_user();
-$db = new $sql_db();
+$db = new $dbms();
// make sure request_var uses this request instance
request_var('', 0, false, false, $request); // "dependency injection" for a function
@@ -2601,10 +2600,10 @@ function change_database_data(&$no_updates, $version)
// Create config value for displaying last subject on forum list
if (!isset($config['display_last_subject']))
- {
+ {
$config->set('display_last_subject', '1');
}
-
+
$no_updates = false;
if (!isset($config['assets_version']))