From 729eeef2bf4aad74c8170a54098e6679a1e9fadb Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Thu, 8 Nov 2012 12:22:15 -0500 Subject: [PATCH] [feature/template-events] Generate style names array in set_style. PHPBB3-9550 --- phpBB/includes/style/style.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/phpBB/includes/style/style.php b/phpBB/includes/style/style.php index 9ce96c5da5..6aec5c6ba4 100644 --- a/phpBB/includes/style/style.php +++ b/phpBB/includes/style/style.php @@ -91,16 +91,22 @@ class phpbb_style { $style_path = $this->user->style['style_path']; $style_dirs = ($this->user->style['style_parent_id']) ? array_reverse(explode('/', $this->user->style['style_parent_tree'])) : array(); - $paths = array($this->get_style_path($style_path)); + + $names = array($style_path); foreach ($style_dirs as $dir) { - $paths[] = $this->get_style_path($dir); + $names[] = $dir; + } + // Add 'all' path, used as last fallback path by hooks and extensions + //$names[] = 'all'; + + $paths = array(); + foreach ($names as $name) + { + $paths[] = $this->get_style_path($name); } - // Add 'all' path, used as last fallback path by hooks and extensions - $paths[] = $this->get_style_path('all'); - - return $this->set_custom_style($style_path, $paths); + return $this->set_custom_style($style_path, $names, $paths); } /**