aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-09-01 15:16:21 -0400
committerNils Adermann <naderman@naderman.de>2011-09-29 16:15:54 +0200
commite52022c572c6f1a7cbab7e665e4b738f9e084f7f (patch)
tree5a325145dbac748d841f08ac0dff7e3ceb860a9b /phpBB
parent4d08d769c2c146d0370d7e97b223b1c199412be1 (diff)
downloadforums-e52022c572c6f1a7cbab7e665e4b738f9e084f7f.tar
forums-e52022c572c6f1a7cbab7e665e4b738f9e084f7f.tar.gz
forums-e52022c572c6f1a7cbab7e665e4b738f9e084f7f.tar.bz2
forums-e52022c572c6f1a7cbab7e665e4b738f9e084f7f.tar.xz
forums-e52022c572c6f1a7cbab7e665e4b738f9e084f7f.zip
[feature/extension-manager] Make sure named styles are loaded from root dir
PHPBB3-10323
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/template/extension_path_provider.php6
-rw-r--r--phpBB/includes/template/path_provider.php6
-rw-r--r--phpBB/includes/template/path_provider_interface.php4
-rw-r--r--phpBB/includes/template/template.php2
4 files changed, 12 insertions, 6 deletions
diff --git a/phpBB/includes/template/extension_path_provider.php b/phpBB/includes/template/extension_path_provider.php
index 67f0dd48c1..9578702b65 100644
--- a/phpBB/includes/template/extension_path_provider.php
+++ b/phpBB/includes/template/extension_path_provider.php
@@ -91,11 +91,13 @@ class phpbb_template_extension_path_provider extends phpbb_extension_provider im
* The first element is the main template.
* If the path is false, it will be generated from
* the supplied name.
+ * @param string $style_root_path The root directory for styles identified
+ * by name only.
* @return null
*/
- public function set_templates(array $templates)
+ public function set_templates(array $templates, $style_root_path)
{
- $this->base_paths->set_templates($templates);
+ $this->base_paths->set_templates($templates, $style_root_path);
$this->items = null;
}
diff --git a/phpBB/includes/template/path_provider.php b/phpBB/includes/template/path_provider.php
index e6c8b34e15..80e3ef87d7 100644
--- a/phpBB/includes/template/path_provider.php
+++ b/phpBB/includes/template/path_provider.php
@@ -44,9 +44,11 @@ class phpbb_template_path_provider implements IteratorAggregate, phpbb_template_
* The first element is the main template.
* If the path is false, it will be generated from
* the supplied name.
+ * @param string $style_root_path The root directory for styles identified
+ * by name only.
* @return null
*/
- public function set_templates(array $templates)
+ public function set_templates(array $templates, $style_root_path)
{
$this->paths;
@@ -54,7 +56,7 @@ class phpbb_template_path_provider implements IteratorAggregate, phpbb_template_
{
if (!$path)
{
- $path = $this->template_root_for_style($name);
+ $path = $style_root_path . $this->template_root_for_style($name);
}
$this->paths[] = $path;
diff --git a/phpBB/includes/template/path_provider_interface.php b/phpBB/includes/template/path_provider_interface.php
index 800d7697d9..822393a91e 100644
--- a/phpBB/includes/template/path_provider_interface.php
+++ b/phpBB/includes/template/path_provider_interface.php
@@ -39,9 +39,11 @@ interface phpbb_template_path_provider_interface extends Traversable
* The first element is the main template.
* If the path is false, it will be generated from
* the supplied name.
+ * @param string $style_root_path The root directory for styles identified
+ * by name only.
* @return null
*/
- public function set_templates(array $templates);
+ public function set_templates(array $templates, $style_root_path);
/**
* Retrieves the path to the main template passed into set_templates()
diff --git a/phpBB/includes/template/template.php b/phpBB/includes/template/template.php
index d46032f521..228ea93513 100644
--- a/phpBB/includes/template/template.php
+++ b/phpBB/includes/template/template.php
@@ -133,7 +133,7 @@ class phpbb_template
$templates[$fallback_template_name] = $fallback_template_path;
}
- $this->provider->set_templates($templates);
+ $this->provider->set_templates($templates, $this->phpbb_root_path);
$this->locator->set_paths($this->provider);
$this->locator->set_main_template($this->provider->get_main_template_path());