mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 03:04:09 +02:00
[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
This commit is contained in:
@@ -79,7 +79,6 @@ require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_content.' . $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);
|
||||
|
||||
// Set PHP error handler to ours
|
||||
@@ -102,7 +101,7 @@ $phpbb_dispatcher = new phpbb_event_dispatcher();
|
||||
$request = new phpbb_request();
|
||||
$user = new phpbb_user();
|
||||
$auth = new phpbb_auth();
|
||||
$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
|
||||
|
Reference in New Issue
Block a user