mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/10933] Initialize template context when template is constructed.
There is no apparent reason for either initializing or clearing
the context in set_style/set_custom_style.
Initially the initialization there was added in
0501640d5d
, for reasons that
presently I do not see.
This permits making context property back private.
PHPBB3-10933
This commit is contained in:
parent
000bbfd5b3
commit
8528d8ff34
2 changed files with 2 additions and 3 deletions
|
@ -124,8 +124,6 @@ class phpbb_style
|
||||||
|
|
||||||
$this->template->cachepath = $this->phpbb_root_path . 'cache/tpl_' . str_replace('_', '-', $name) . '_';
|
$this->template->cachepath = $this->phpbb_root_path . 'cache/tpl_' . str_replace('_', '-', $name) . '_';
|
||||||
|
|
||||||
$this->template->context = new phpbb_template_context();
|
|
||||||
|
|
||||||
if ($template_path !== false)
|
if ($template_path !== false)
|
||||||
{
|
{
|
||||||
$this->template->template_path = $this->locator->template_path = $template_path;
|
$this->template->template_path = $this->locator->template_path = $template_path;
|
||||||
|
|
|
@ -36,7 +36,7 @@ class phpbb_template
|
||||||
* Stores template data used during template rendering.
|
* Stores template data used during template rendering.
|
||||||
* @var phpbb_template_context
|
* @var phpbb_template_context
|
||||||
*/
|
*/
|
||||||
public $context;
|
private $context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Path of the cache directory for the template
|
* Path of the cache directory for the template
|
||||||
|
@ -95,6 +95,7 @@ class phpbb_template
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
$this->locator = $locator;
|
$this->locator = $locator;
|
||||||
$this->template_path = $this->locator->template_path;
|
$this->template_path = $this->locator->template_path;
|
||||||
|
$this->context = new phpbb_template_context();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue