aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-09-01 15:09:58 -0400
committerNils Adermann <naderman@naderman.de>2011-09-29 16:15:53 +0200
commit4d08d769c2c146d0370d7e97b223b1c199412be1 (patch)
tree2ef87fa4aa827dcb241cfa2e20306f40038d978c /phpBB/includes/template
parent703fcae382e0170b0752bdbdc71bd5fd8a051847 (diff)
downloadforums-4d08d769c2c146d0370d7e97b223b1c199412be1.tar
forums-4d08d769c2c146d0370d7e97b223b1c199412be1.tar.gz
forums-4d08d769c2c146d0370d7e97b223b1c199412be1.tar.bz2
forums-4d08d769c2c146d0370d7e97b223b1c199412be1.tar.xz
forums-4d08d769c2c146d0370d7e97b223b1c199412be1.zip
[feature/extension-manager] Fallback template might not always be set
PHPBB3-10323
Diffstat (limited to 'phpBB/includes/template')
-rw-r--r--phpBB/includes/template/template.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/includes/template/template.php b/phpBB/includes/template/template.php
index 7b1ac79c9d..d46032f521 100644
--- a/phpBB/includes/template/template.php
+++ b/phpBB/includes/template/template.php
@@ -126,10 +126,14 @@ class phpbb_template
*/
public function set_custom_template($template_path, $template_name, $fallback_template_path = false, $fallback_template_name = false)
{
- $this->provider->set_templates(array(
- $template_name => $template_path,
- $fallback_template_name => $fallback_template_path,
- ));
+ $templates = array($template_name => $template_path);
+
+ if ($fallback_template_path !== false)
+ {
+ $templates[$fallback_template_name] = $fallback_template_path;
+ }
+
+ $this->provider->set_templates($templates);
$this->locator->set_paths($this->provider);
$this->locator->set_main_template($this->provider->get_main_template_path());