diff options
-rw-r--r-- | phpBB/includes/bbcode.php | 2 | ||||
-rw-r--r-- | phpBB/includes/template/template.php | 7 | ||||
-rw-r--r-- | phpBB/includes/template/twig/twig.php | 10 |
3 files changed, 18 insertions, 1 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index ecbb056045..fd00728510 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -138,7 +138,7 @@ class bbcode $style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $template); $style->set_style(); $template->set_filenames(array('bbcode.html' => 'bbcode.html')); - $this->template_filename = $style_resource_locator->get_source_file_for_handle('bbcode.html'); + $this->template_filename = $template->get_source_file_for_handle('bbcode.html'); } $bbcode_ids = $rowset = $sql = array(); diff --git a/phpBB/includes/template/template.php b/phpBB/includes/template/template.php index e506c2c278..2b7c36ea7d 100644 --- a/phpBB/includes/template/template.php +++ b/phpBB/includes/template/template.php @@ -147,4 +147,11 @@ interface phpbb_template * @return bool false on error, true on success */ public function alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert'); + + /** + * Get path to template for handle (required for BBCode parser) + * + * @return string + */ + public function get_source_file_for_handle($handle); } diff --git a/phpBB/includes/template/twig/twig.php b/phpBB/includes/template/twig/twig.php index dbc36ecddf..9d69136e0c 100644 --- a/phpBB/includes/template/twig/twig.php +++ b/phpBB/includes/template/twig/twig.php @@ -444,4 +444,14 @@ class phpbb_template_twig implements phpbb_template { return (isset($this->filenames[$handle])) ? $this->filenames[$handle] : $handle; } + + /** + * Get path to template for handle (required for BBCode parser) + * + * @return string + */ + public function get_source_file_for_handle($handle) + { + return $this->twig->getLoader()->getCacheKey($this->get_filename_from_handle($handle)); + } } |