aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template/template.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-03-16 00:22:42 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-11-17 16:39:57 -0500
commita6c7fbc59d02ed44ef90e340c4f957a8c5ac9ca5 (patch)
tree011ad48ebb64a7aa09749cfe1d26f3e2936efeac /phpBB/includes/template/template.php
parentdd7c5183fbc5401c85f530a304b70fbb0b5d7fbe (diff)
downloadforums-a6c7fbc59d02ed44ef90e340c4f957a8c5ac9ca5.tar
forums-a6c7fbc59d02ed44ef90e340c4f957a8c5ac9ca5.tar.gz
forums-a6c7fbc59d02ed44ef90e340c4f957a8c5ac9ca5.tar.bz2
forums-a6c7fbc59d02ed44ef90e340c4f957a8c5ac9ca5.tar.xz
forums-a6c7fbc59d02ed44ef90e340c4f957a8c5ac9ca5.zip
[feature/template-events] Pass top-level template name to template filter.
This will be used to invoke template-specific hooks. PHPBB3-9550
Diffstat (limited to 'phpBB/includes/template/template.php')
-rw-r--r--phpBB/includes/template/template.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/includes/template/template.php b/phpBB/includes/template/template.php
index 96a16fee77..c43c1ddf99 100644
--- a/phpBB/includes/template/template.php
+++ b/phpBB/includes/template/template.php
@@ -82,6 +82,16 @@ class phpbb_template
private $extension_manager;
/**
+ * Name of the top-level template being compiled and/or rendered.
+ *
+ * This is used by hooks implementation to invoke template-specific
+ * template hooks.
+ *
+ * @var string
+ */
+ private $template_name;
+
+ /**
* Constructor.
*
* @param string $phpbb_root_path phpBB root path
@@ -291,7 +301,7 @@ class phpbb_template
return new phpbb_template_renderer_include($output_file, $this);
}
- $compile = new phpbb_template_compile($this->config['tpl_allow_php'], $this->locator, $this->phpbb_root_path, $this->extension_manager);
+ $compile = new phpbb_template_compile($this->config['tpl_allow_php'], $this->template_name, $this->locator, $this->phpbb_root_path, $this->extension_manager);
if ($compile->compile_file_to_file($source_file, $output_file) !== false)
{