mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/extension-manager] Fallback template might not always be set
PHPBB3-10323
This commit is contained in:
parent
703fcae382
commit
4d08d769c2
1 changed files with 8 additions and 4 deletions
|
@ -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());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue