mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[feature/twig] Fix BBCode parser
PHPBB3-11598
This commit is contained in:
parent
c6c064a136
commit
709b3e9803
3 changed files with 18 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue