1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 00:37:42 +02:00

[feature/template-engine] Replaced globals with dependency injection.

PHPBB3-9726
This commit is contained in:
Oleg Pudeyev
2011-05-12 18:08:36 -04:00
parent 581374c9c3
commit d2ac05aa74
4 changed files with 65 additions and 39 deletions

View File

@@ -209,7 +209,6 @@ $class_loader->set_cache($cache->get_driver());
$request = new phpbb_request();
$user = new user();
$auth = new auth();
$template = new phpbb_template();
$db = new $sql_db();
// make sure request_var uses this request instance
@@ -226,6 +225,8 @@ $config = new phpbb_config_db($db, $cache->get_driver(), CONFIG_TABLE);
set_config(null, null, null, $config);
set_config_count(null, null, null, $config);
$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user);
// Add own hook handler
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));