From 2bf9ea373b22dd8e2481085a98548599c134f570 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 26 Sep 2008 13:09:56 +0000 Subject: 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 --- phpBB/includes/template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/template.php') 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; } -- cgit v1.2.1