1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +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

@@ -175,7 +175,7 @@ class messenger
*/
function template($template_file, $template_lang = '', $template_path = '')
{
global $config, $phpbb_root_path, $user;
global $config, $phpbb_root_path, $phpEx, $user;
if (!trim($template_file))
{
@@ -193,7 +193,7 @@ class messenger
// tpl_msg now holds a template object we can use to parse the template file
if (!isset($this->tpl_msg[$template_lang . $template_file]))
{
$this->tpl_msg[$template_lang . $template_file] = new phpbb_template();
$this->tpl_msg[$template_lang . $template_file] = new phpbb_template($phpbb_root_path, $phpEx, $config, $user);
$tpl = &$this->tpl_msg[$template_lang . $template_file];
$fallback_template_path = false;