1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

[feature/twig] Use twig loader filesystem with namespaces to add paths

Twig now handles loading style files on its own

PHPBB3-11598
This commit is contained in:
Nathaniel Guse
2013-06-14 01:00:38 -05:00
parent 38d8025f12
commit 30a1f21735
3 changed files with 65 additions and 11 deletions

View File

@@ -135,15 +135,29 @@ class phpbb_style
$this->provider->set_styles($paths);
$this->locator->set_paths($this->provider);
$this->template->set_style_names($names);
if ($template_path !== false)
{
$this->locator->set_template_path($template_path);
$appended_paths = array();
foreach ($paths as $path)
{
$appended_paths[] = $path . '/' . $template_path;
}
$this->template->set_style_names($names, $appended_paths);
}
else
{
$this->locator->set_default_template_path();
$appended_paths = array();
foreach ($paths as $path)
{
$appended_paths[] = $path . '/template/';
}
$this->template->set_style_names($names, $appended_paths);
}
$this->template->cachepath = $this->phpbb_root_path . 'cache/tpl_' . str_replace('_', '-', $name) . '_';