diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-07-24 12:55:41 -0500 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-07-24 12:56:39 -0500 |
commit | 4b761f65758c40db4851983fa3a08d354da3323d (patch) | |
tree | 8bc46941ba86b83d190dcb4648f275138215ed85 /phpBB/phpbb/template | |
parent | bfbc7aa74250ea5e9e39efc63caf7cfdb9407e14 (diff) | |
download | forums-4b761f65758c40db4851983fa3a08d354da3323d.tar forums-4b761f65758c40db4851983fa3a08d354da3323d.tar.gz forums-4b761f65758c40db4851983fa3a08d354da3323d.tar.bz2 forums-4b761f65758c40db4851983fa3a08d354da3323d.tar.xz forums-4b761f65758c40db4851983fa3a08d354da3323d.zip |
[ticket/11628] Remove third parameter ($names) from set_custom_style
This was basically duplicating functionality. $names would be used if not
empty, else array($name) would be used. Merged functionality into the first
argument
PHPBB3-11628
Diffstat (limited to 'phpBB/phpbb/template')
-rw-r--r-- | phpBB/phpbb/template/template.php | 5 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/twig.php | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/phpBB/phpbb/template/template.php b/phpBB/phpbb/template/template.php index 95a48ba0ad..c77586587f 100644 --- a/phpBB/phpbb/template/template.php +++ b/phpBB/phpbb/template/template.php @@ -55,13 +55,12 @@ interface phpbb_template * * Note: Templates are still compiled to phpBB's cache directory. * - * @param string $name Name of style, used for cache prefix. Examples: "admin", "prosilver" + * @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 array $names Array of names of templates in inheritance tree order, used by extensions. If empty, $name will be used. * @param string $template_path Path to templates, relative to style directory. False if path should be set to default (templates/). * @return phpbb_template $this */ - public function set_custom_style($name, $paths, $names = array(), $template_path = false); + public function set_custom_style($names, $paths, $template_path = false); /** * 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 48ea8edeb1..c9249196e7 100644 --- a/phpBB/phpbb/template/twig/twig.php +++ b/phpBB/phpbb/template/twig/twig.php @@ -236,22 +236,21 @@ class phpbb_template_twig implements phpbb_template * * Note: Templates are still compiled to phpBB's cache directory. * - * @param string $name Name of style, used for cache prefix. Examples: "admin", "prosilver" + * @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 array $names Array of names of templates in inheritance tree order, used by extensions. If empty, $name will be used. * @param string $template_path Path to templates, relative to style directory. False if path should be set to default (templates/). * @return phpbb_template $this */ - public function set_custom_style($name, $paths, $names = array(), $template_path = false) + public function set_custom_style($names, $paths, $template_path = false) { if (is_string($paths)) { $paths = array($paths); } - if (empty($names)) + if (!is_array($names)) { - $names = array($name); + $names = array($names); } $new_paths = array(); |