aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2013-07-24 13:01:30 -0500
committerNathaniel Guse <nathaniel.guse@gmail.com>2013-07-24 13:01:30 -0500
commit67627f3336f7a90a7de67427d25c8cdd43d74f6e (patch)
tree5815793ca4a54f52df1ce229eac61fb7eb9fabd1 /phpBB/phpbb
parent4b761f65758c40db4851983fa3a08d354da3323d (diff)
downloadforums-67627f3336f7a90a7de67427d25c8cdd43d74f6e.tar
forums-67627f3336f7a90a7de67427d25c8cdd43d74f6e.tar.gz
forums-67627f3336f7a90a7de67427d25c8cdd43d74f6e.tar.bz2
forums-67627f3336f7a90a7de67427d25c8cdd43d74f6e.tar.xz
forums-67627f3336f7a90a7de67427d25c8cdd43d74f6e.zip
[ticket/11628] Change set_custom_style $template path to default to string
Rather than default to false and compare === false ? 'template/' : value just assign this default in the arguments PHPBB3-11628
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/template/template.php4
-rw-r--r--phpBB/phpbb/template/twig/twig.php6
2 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/phpbb/template/template.php b/phpBB/phpbb/template/template.php
index c77586587f..c929934376 100644
--- a/phpBB/phpbb/template/template.php
+++ b/phpBB/phpbb/template/template.php
@@ -57,10 +57,10 @@ interface 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. False if path should be set to default (templates/).
+ * @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 = false);
+ public function set_custom_style($names, $paths, $template_path = 'template/');
/**
* Sets the style names/paths corresponding to style hierarchy being compiled
diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php
index c9249196e7..5537b1195c 100644
--- a/phpBB/phpbb/template/twig/twig.php
+++ b/phpBB/phpbb/template/twig/twig.php
@@ -238,10 +238,10 @@ 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. False if path should be set to default (templates/).
+ * @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 = false)
+ public function set_custom_style($names, $paths, $template_path = 'template/')
{
if (is_string($paths))
{
@@ -256,7 +256,7 @@ class phpbb_template_twig implements phpbb_template
$new_paths = array();
foreach ($paths as $path)
{
- $new_paths[] = $path . '/' . (($template_path !== false) ? $template_path : 'template/');
+ $new_paths[] = $path . '/' . ltrim($template_path, '/');
}
$this->set_style_names($names, $new_paths);