aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/common.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-05-12 18:08:36 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2011-05-12 20:13:31 -0400
commitd2ac05aa74d3a1c9723be41a4c0ffe86542f223f (patch)
treea918b665e08f13a6ed8313372eabe92a96ed2258 /phpBB/common.php
parent581374c9c3c3429f0a07c19e3c8de81fd3e6f320 (diff)
downloadforums-d2ac05aa74d3a1c9723be41a4c0ffe86542f223f.tar
forums-d2ac05aa74d3a1c9723be41a4c0ffe86542f223f.tar.gz
forums-d2ac05aa74d3a1c9723be41a4c0ffe86542f223f.tar.bz2
forums-d2ac05aa74d3a1c9723be41a4c0ffe86542f223f.tar.xz
forums-d2ac05aa74d3a1c9723be41a4c0ffe86542f223f.zip
[feature/template-engine] Replaced globals with dependency injection.
PHPBB3-9726
Diffstat (limited to 'phpBB/common.php')
-rw-r--r--phpBB/common.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/common.php b/phpBB/common.php
index a6ae7dff75..46f78a7926 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -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')));