aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/bbcode.php4
-rw-r--r--phpBB/includes/functions_messenger.php7
-rw-r--r--phpBB/includes/style/style.php7
3 files changed, 9 insertions, 9 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 2cae38022e..612ced8ad6 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -134,9 +134,9 @@ class bbcode
$style_resource_locator = new phpbb_style_resource_locator();
$style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider());
- $style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider);
+ $template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider);
+ $style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $template);
$style->set_style();
- $template = $style->template;
$template->set_filenames(array('bbcode.html' => 'bbcode.html'));
$this->template_filename = $style_resource_locator->get_source_file_for_handle('bbcode.html');
}
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 4d076a7957..aae200df55 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -210,9 +210,9 @@ class messenger
{
$style_resource_locator = new phpbb_style_resource_locator();
$style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider());
- $this->tpl_msg[$template_lang . $template_file] = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider);
- $stl = &$this->tpl_msg[$template_lang . $template_file];
- $tpl = $stl->template;
+ $tpl = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider);
+ $stl = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $tpl);
+ $this->tpl_msg[$template_lang . $template_file] = $tpl;
$fallback_template_path = false;
@@ -238,7 +238,6 @@ class messenger
}
$this->tpl_obj = &$this->tpl_msg[$template_lang . $template_file];
- $this->tpl_obj = $this->tpl_obj->template;
$this->vars = &$this->tpl_obj->_rootref;
$this->tpl_msg = '';
diff --git a/phpBB/includes/style/style.php b/phpBB/includes/style/style.php
index 265a45eca7..539a2642ee 100644
--- a/phpBB/includes/style/style.php
+++ b/phpBB/includes/style/style.php
@@ -25,7 +25,7 @@ class phpbb_style
* @var phpbb_style_template Template class.
* Handles everything related to templates.
*/
- public $template;
+ private $template;
/**
* @var string phpBB root path
@@ -66,8 +66,9 @@ class phpbb_style
* @param user $user current user
* @param phpbb_style_resource_locator $locator style resource locator
* @param phpbb_style_path_provider $provider style path provider
+ * @param phpbb_style_template $template template
*/
- public function __construct($phpbb_root_path, $phpEx, $config, $user, phpbb_style_resource_locator $locator, phpbb_style_path_provider_interface $provider)
+ public function __construct($phpbb_root_path, $phpEx, $config, $user, phpbb_style_resource_locator $locator, phpbb_style_path_provider_interface $provider, phpbb_style_template $template)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx;
@@ -75,7 +76,7 @@ class phpbb_style
$this->user = $user;
$this->locator = $locator;
$this->provider = $provider;
- $this->template = new phpbb_style_template($this->phpbb_root_path, $this->phpEx, $this->config, $this->user, $this->locator, $this->provider);
+ $this->template = $template;
}
/**