aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2013-07-24 13:31:09 -0500
committerNathaniel Guse <nathaniel.guse@gmail.com>2013-07-24 13:31:09 -0500
commit8795a354fed4e78b64cce531e6deaec9aa4d56f8 (patch)
treeb7211848a05f7b363d9127c99f4f1962a42d5b92 /phpBB
parent3b46f77e4e77defdd7c38249c865fdaecd83629e (diff)
downloadforums-8795a354fed4e78b64cce531e6deaec9aa4d56f8.tar
forums-8795a354fed4e78b64cce531e6deaec9aa4d56f8.tar.gz
forums-8795a354fed4e78b64cce531e6deaec9aa4d56f8.tar.bz2
forums-8795a354fed4e78b64cce531e6deaec9aa4d56f8.tar.xz
forums-8795a354fed4e78b64cce531e6deaec9aa4d56f8.zip
[ticket/11628] Remove the one usage of get_style_path()
Makes the code easier to follow PHPBB3-11628
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/template/template.php2
-rw-r--r--phpBB/phpbb/template/twig/twig.php18
2 files changed, 3 insertions, 17 deletions
diff --git a/phpBB/phpbb/template/template.php b/phpBB/phpbb/template/template.php
index 9881938a8f..6b9c331a3e 100644
--- a/phpBB/phpbb/template/template.php
+++ b/phpBB/phpbb/template/template.php
@@ -56,7 +56,7 @@ interface phpbb_template
* Note: Templates are still compiled to phpBB's cache directory.
*
* @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|array or string $paths Array of style paths, relative to current root directory
* @return phpbb_template $this
*/
public function set_custom_style($names, $paths);
diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php
index c3ed52c3bd..0b5b4105ae 100644
--- a/phpBB/phpbb/template/twig/twig.php
+++ b/phpBB/phpbb/template/twig/twig.php
@@ -208,7 +208,7 @@ class phpbb_template_twig implements phpbb_template
{
foreach ($names as $name)
{
- $path = $this->get_style_path($name, $directory) . 'template/';
+ $path = $this->phpbb_root_path . trim($directory, '/') . "/{$name}/template/";
if (is_dir($path))
{
@@ -236,7 +236,7 @@ class phpbb_template_twig implements phpbb_template
* Note: Templates are still compiled to phpBB's cache directory.
*
* @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|array or string $paths Array of style paths, relative to current root directory
* @return phpbb_template $this
*/
public function set_custom_style($names, $paths)
@@ -503,18 +503,4 @@ class phpbb_template_twig implements phpbb_template
{
return $this->twig->getLoader()->getCacheKey($this->get_filename_from_handle($handle));
}
-
- /**
- * Get location of style directory for specific style_path
- *
- * @param string $path Style path, such as "prosilver"
- * @param string $style_base_directory The base directory the style is in
- * E.g. 'styles', 'ext/foo/bar/styles'
- * Default: 'styles'
- * @return string Path to style directory, relative to current path
- */
- protected function get_style_path($path, $style_base_directory = 'styles')
- {
- return $this->phpbb_root_path . trim($style_base_directory, '/') . '/' . rtrim($path, '/') . '/';
- }
}