aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/style/style.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-06-12 00:02:30 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-11-02 19:39:05 -0400
commit09794c6821a93023c19d6b74e8e5d0e835e37be6 (patch)
tree09c63f9897e369cedb2d8a31bd50d5166c9751c3 /phpBB/includes/style/style.php
parent6295b014d35890d60ccf422f5bb8228569e8ca3a (diff)
downloadforums-09794c6821a93023c19d6b74e8e5d0e835e37be6.tar
forums-09794c6821a93023c19d6b74e8e5d0e835e37be6.tar.gz
forums-09794c6821a93023c19d6b74e8e5d0e835e37be6.tar.bz2
forums-09794c6821a93023c19d6b74e8e5d0e835e37be6.tar.xz
forums-09794c6821a93023c19d6b74e8e5d0e835e37be6.zip
[ticket/10933] Add mutators for template_path to style resource locator.
template_path is now private. Change semantics of passing false for template path - now this resets template path to default which I think makes sense. PHPBB3-10933
Diffstat (limited to 'phpBB/includes/style/style.php')
-rw-r--r--phpBB/includes/style/style.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/includes/style/style.php b/phpBB/includes/style/style.php
index d8974bc516..effd496fb9 100644
--- a/phpBB/includes/style/style.php
+++ b/phpBB/includes/style/style.php
@@ -110,7 +110,7 @@ class phpbb_style
*
* @param string $name Name of style, used for cache prefix. Examples: "admin", "prosilver"
* @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 not be changed.
+ * @param string $template_path Path to templates, relative to style directory. False if path should be set to default (templates/).
*/
public function set_custom_style($name, $paths, $template_path = false)
{
@@ -122,13 +122,17 @@ class phpbb_style
$this->provider->set_styles($paths);
$this->locator->set_paths($this->provider);
- $this->template->cachepath = $this->phpbb_root_path . 'cache/tpl_' . str_replace('_', '-', $name) . '_';
-
if ($template_path !== false)
{
- $this->locator->template_path = $template_path;
+ $this->locator->set_template_path($template_path);
+ }
+ else
+ {
+ $this->locator->set_default_template_path();
}
+ $this->template->cachepath = $this->phpbb_root_path . 'cache/tpl_' . str_replace('_', '-', $name) . '_';
+
return true;
}