aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-09-26 13:09:56 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-09-26 13:09:56 +0000
commit2bf9ea373b22dd8e2481085a98548599c134f570 (patch)
treec067d125c72cc78b9a5f26f545ee4e6713227c9c /phpBB/includes/template.php
parentc0f6538cf6d9f6f0aca04cd97b9ed94457f72ad4 (diff)
downloadforums-2bf9ea373b22dd8e2481085a98548599c134f570.tar
forums-2bf9ea373b22dd8e2481085a98548599c134f570.tar.gz
forums-2bf9ea373b22dd8e2481085a98548599c134f570.tar.bz2
forums-2bf9ea373b22dd8e2481085a98548599c134f570.tar.xz
forums-2bf9ea373b22dd8e2481085a98548599c134f570.zip
Fix problems with styles using an underscore within the filename. (Bug #34315)
- Also display inheriting template on style installation (previously, it was only displayed on template installs) - Fixes undefined variable in error message if inheriting style does not work - Fixes export of styles/templates and correctly set inherit_from variable git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8943 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/template.php')
-rw-r--r--phpBB/includes/template.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index d17ad55691..0098c484bd 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -54,7 +54,7 @@ class template
if (file_exists($phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template'))
{
$this->root = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template';
- $this->cachepath = $phpbb_root_path . 'cache/tpl_' . $user->theme['template_path'] . '_';
+ $this->cachepath = $phpbb_root_path . 'cache/tpl_' . str_replace('_', '-', $user->theme['template_path']) . '_';
if ($user->theme['template_inherits_id'])
{
@@ -80,7 +80,7 @@ class template
global $phpbb_root_path;
$this->root = $template_path;
- $this->cachepath = $phpbb_root_path . 'cache/ctpl_' . $template_name . '_';
+ $this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_';
return true;
}