aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/style/extension_path_provider.php
diff options
context:
space:
mode:
authorVjacheslav Trushkin <arty@phpbb.com>2012-03-31 21:20:18 +0300
committerVjacheslav Trushkin <arty@phpbb.com>2012-03-31 21:20:18 +0300
commitb3f46b9565117940b79c7530a1c21336cd072073 (patch)
tree90066a5ac6afdf000eb37eacba2cee0f615477ae /phpBB/includes/style/extension_path_provider.php
parent7e2f16aafa47f8db51a12a293b0616cb75b4d12f (diff)
downloadforums-b3f46b9565117940b79c7530a1c21336cd072073.tar
forums-b3f46b9565117940b79c7530a1c21336cd072073.tar.gz
forums-b3f46b9565117940b79c7530a1c21336cd072073.tar.bz2
forums-b3f46b9565117940b79c7530a1c21336cd072073.tar.xz
forums-b3f46b9565117940b79c7530a1c21336cd072073.zip
[ticket/10735] Changing locator paths structure
Changing locator paths to 2 dimensional array PHPBB3-10735
Diffstat (limited to 'phpBB/includes/style/extension_path_provider.php')
-rw-r--r--phpBB/includes/style/extension_path_provider.php36
1 files changed, 15 insertions, 21 deletions
diff --git a/phpBB/includes/style/extension_path_provider.php b/phpBB/includes/style/extension_path_provider.php
index 1fb6580ce1..4eac300424 100644
--- a/phpBB/includes/style/extension_path_provider.php
+++ b/phpBB/includes/style/extension_path_provider.php
@@ -82,22 +82,26 @@ class phpbb_style_extension_path_provider extends phpbb_extension_provider imple
$directories = array();
$finder = $this->extension_manager->get_finder();
- foreach ($this->base_path_provider as $path)
+ foreach ($this->base_path_provider as $key => $paths)
{
- if ($path && !phpbb_is_absolute($path))
+ if ($key == 'style')
{
- $directories = array_merge($directories, $finder
- ->directory('/' . $this->ext_dir_prefix . $path)
- ->get_directories()
- );
+ foreach ($paths as $path)
+ {
+ $directories['style'][] = $path;
+ if ($path && !phpbb_is_absolute($path))
+ {
+ $result = $finder->directory('/' . $this->ext_dir_prefix . $path)
+ ->get_directories(true, true);
+ foreach ($result as $ext => $ext_path)
+ {
+ $directories[$ext][] = $ext_path;
+ }
+ }
+ }
}
}
- foreach ($this->base_path_provider as $path)
- {
- $directories[] = $path;
- }
-
return $directories;
}
@@ -112,14 +116,4 @@ class phpbb_style_extension_path_provider extends phpbb_extension_provider imple
$this->base_path_provider->set_styles($styles);
$this->items = null;
}
-
- /**
- * Retrieves the path to the main style passed into set_styles()
- *
- * @return string Main style path
- */
- public function get_main_style_path()
- {
- return $this->base_path_provider->get_main_style_path();
- }
}