[feature/twig] Fix BBCode parser

PHPBB3-11598
This commit is contained in:
Nathaniel Guse 2013-07-02 11:29:32 -05:00
parent c6c064a136
commit 709b3e9803
3 changed files with 18 additions and 1 deletions

View file

@ -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();

View file

@ -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);
}

View file

@ -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));
}
}