[feature/extension-manager] Fallback template might not always be set

PHPBB3-10323
This commit is contained in:
Nils Adermann 2011-09-01 15:09:58 -04:00
parent 703fcae382
commit 4d08d769c2

View file

@ -126,10 +126,14 @@ class phpbb_template
*/ */
public function set_custom_template($template_path, $template_name, $fallback_template_path = false, $fallback_template_name = false) public function set_custom_template($template_path, $template_name, $fallback_template_path = false, $fallback_template_name = false)
{ {
$this->provider->set_templates(array( $templates = array($template_name => $template_path);
$template_name => $template_path,
$fallback_template_name => $fallback_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_paths($this->provider);
$this->locator->set_main_template($this->provider->get_main_template_path()); $this->locator->set_main_template($this->provider->get_main_template_path());