aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/template/twig
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2013-07-24 13:25:20 -0500
committerNathaniel Guse <nathaniel.guse@gmail.com>2013-07-24 13:25:20 -0500
commit12c22585069066957cc3211136ebd480295d4758 (patch)
tree6358ba04f28a8368ef5806aec70825466c30e778 /phpBB/phpbb/template/twig
parent863592a8bedbacf3e7bf6bee458797e819020e6f (diff)
downloadforums-12c22585069066957cc3211136ebd480295d4758.tar
forums-12c22585069066957cc3211136ebd480295d4758.tar.gz
forums-12c22585069066957cc3211136ebd480295d4758.tar.bz2
forums-12c22585069066957cc3211136ebd480295d4758.tar.xz
forums-12c22585069066957cc3211136ebd480295d4758.zip
[ticket/11628] Remove template_path option on set_custom_style
This was set to default 'template/' to append template/ to all the paths, but every location was actually just setting it to '' to not append anything. So removed the option entirely (additional paths can be appended to the paths being sent to the function already) PHPBB3-11628
Diffstat (limited to 'phpBB/phpbb/template/twig')
-rw-r--r--phpBB/phpbb/template/twig/twig.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php
index 26f454e972..4aa1774ef4 100644
--- a/phpBB/phpbb/template/twig/twig.php
+++ b/phpBB/phpbb/template/twig/twig.php
@@ -225,7 +225,7 @@ class phpbb_template_twig implements phpbb_template
$this->twig->getLoader()->setPaths($paths, 'core');
}
- $this->set_custom_style($names, $paths, '');
+ $this->set_custom_style($names, $paths);
return $this;
}
@@ -237,10 +237,9 @@ class phpbb_template_twig implements phpbb_template
*
* @param string|array $names Array of names or string of name of template(s) in inheritance tree order, used by extensions.
* @param array or string $paths Array of style paths, relative to current root directory
- * @param string $template_path Path to templates, relative to style directory. Default (template/).
* @return phpbb_template $this
*/
- public function set_custom_style($names, $paths, $template_path = 'template/')
+ public function set_custom_style($names, $paths)
{
if (is_string($paths))
{
@@ -252,14 +251,8 @@ class phpbb_template_twig implements phpbb_template
$names = array($names);
}
- $style_paths = array();
- foreach ($paths as $path)
- {
- $style_paths[] = $path . '/' . ltrim($template_path, '/');
- }
-
// Set as __main__ namespace
- $this->twig->getLoader()->setPaths($style_paths);
+ $this->twig->getLoader()->setPaths($paths);
// Add all namespaces for all extensions
if ($this->extension_manager instanceof phpbb_extension_manager)