aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-11-08 12:22:39 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2012-11-17 16:42:43 -0500
commitaf47779f51e44d34a78087327a3958fb35c50936 (patch)
treea73da66bd8d2507df4222e5382707fcf6c83cf5a
parent729eeef2bf4aad74c8170a54098e6679a1e9fadb (diff)
downloadforums-af47779f51e44d34a78087327a3958fb35c50936.tar
forums-af47779f51e44d34a78087327a3958fb35c50936.tar.gz
forums-af47779f51e44d34a78087327a3958fb35c50936.tar.bz2
forums-af47779f51e44d34a78087327a3958fb35c50936.tar.xz
forums-af47779f51e44d34a78087327a3958fb35c50936.zip
[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
-rw-r--r--phpBB/includes/template/filter.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/phpBB/includes/template/filter.php b/phpBB/includes/template/filter.php
index a5a0865569..fd2ce9d859 100644
--- a/phpBB/includes/template/filter.php
+++ b/phpBB/includes/template/filter.php
@@ -929,11 +929,19 @@ class phpbb_template_filter extends php_user_filter
->extension_directory("/styles/all/template")
->get_files();
- $files = array_merge($files, $finder
- ->extension_prefix($location)
- ->extension_suffix('.html')
- ->extension_directory("/styles/" . $this->style_name . "/template")
- ->get_files());
+ foreach ($this->style_names as $style_name)
+ {
+ $more_files = $finder
+ ->extension_prefix($location)
+ ->extension_suffix('.html')
+ ->extension_directory("/styles/" . $style_name . "/template")
+ ->get_files();
+ if (!empty($more_files))
+ {
+ $files = array_merge($files, $more_files);
+ break;
+ }
+ }
$all_compiled = '';
foreach ($files as $file)