mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/template-events] Use style names array in template filter.
This provides a straightforward way of iterating over all styles looking for templates in extensions. PHPBB3-9550
This commit is contained in:
parent
729eeef2bf
commit
af47779f51
1 changed files with 13 additions and 5 deletions
|
@ -929,11 +929,19 @@ class phpbb_template_filter extends php_user_filter
|
||||||
->extension_directory("/styles/all/template")
|
->extension_directory("/styles/all/template")
|
||||||
->get_files();
|
->get_files();
|
||||||
|
|
||||||
$files = array_merge($files, $finder
|
foreach ($this->style_names as $style_name)
|
||||||
->extension_prefix($location)
|
{
|
||||||
->extension_suffix('.html')
|
$more_files = $finder
|
||||||
->extension_directory("/styles/" . $this->style_name . "/template")
|
->extension_prefix($location)
|
||||||
->get_files());
|
->extension_suffix('.html')
|
||||||
|
->extension_directory("/styles/" . $style_name . "/template")
|
||||||
|
->get_files();
|
||||||
|
if (!empty($more_files))
|
||||||
|
{
|
||||||
|
$files = array_merge($files, $more_files);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$all_compiled = '';
|
$all_compiled = '';
|
||||||
foreach ($files as $file)
|
foreach ($files as $file)
|
||||||
|
|
Loading…
Add table
Reference in a new issue