From 87832d06cca520e27c5dbed1c36ab9c12240ae3d Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Sun, 1 May 2011 04:03:06 -0400 Subject: [feature/template-engine] Delete template class, use phpbb_template instead. PHPBB3-9726 --- phpBB/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/common.php') diff --git a/phpBB/common.php b/phpBB/common.php index ccd043ba70..a6ae7dff75 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -209,7 +209,7 @@ $class_loader->set_cache($cache->get_driver()); $request = new phpbb_request(); $user = new user(); $auth = new auth(); -$template = new template(); +$template = new phpbb_template(); $db = new $sql_db(); // make sure request_var uses this request instance -- cgit v1.2.1 From d2ac05aa74d3a1c9723be41a4c0ffe86542f223f Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Thu, 12 May 2011 18:08:36 -0400 Subject: [feature/template-engine] Replaced globals with dependency injection. PHPBB3-9726 --- phpBB/common.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/common.php') 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'))); -- cgit v1.2.1 From f7b06ca12db9da519d49ce334eaf96573d003c0f Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sat, 9 Jul 2011 23:33:44 +0200 Subject: [feature/template-engine] Move template.php to includes/template This allows making use of autoloading. PHPBB3-9726 --- phpBB/common.php | 1 - 1 file changed, 1 deletion(-) (limited to 'phpBB/common.php') diff --git a/phpBB/common.php b/phpBB/common.php index 46f78a7926..67fb5cf6ae 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -182,7 +182,6 @@ if (!empty($load_extensions) && function_exists('dl')) // Include files require($phpbb_root_path . 'includes/class_loader.' . $phpEx); -require($phpbb_root_path . 'includes/template.' . $phpEx); require($phpbb_root_path . 'includes/session.' . $phpEx); require($phpbb_root_path . 'includes/auth.' . $phpEx); -- cgit v1.2.1 From acb767f14d6300ebff793f87b1a62ebbb4bde82a Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Tue, 9 Aug 2011 23:28:40 -0400 Subject: [feature/template-engine] Dependency inject locator into template. PHPBB3-9726 --- phpBB/common.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/common.php') diff --git a/phpBB/common.php b/phpBB/common.php index 67fb5cf6ae..f206dc70fd 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -224,7 +224,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); +$template_locator = new phpbb_template_locator(); +$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $template_locator); // Add own hook handler require($phpbb_root_path . 'includes/hooks/index.' . $phpEx); -- cgit v1.2.1