mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Check for valid $template_path in includes/template.php - Bug #50055
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10036 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
74879efcb5
commit
edc5061f1d
1 changed files with 6 additions and 0 deletions
|
@ -94,6 +94,12 @@ class template
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $user;
|
global $phpbb_root_path, $user;
|
||||||
|
|
||||||
|
// Make sure $template_path has no ending slash
|
||||||
|
if (substr($template_path, -1) == '/')
|
||||||
|
{
|
||||||
|
$template_path = substr($template_path, 0, -1);
|
||||||
|
}
|
||||||
|
|
||||||
$this->root = $template_path;
|
$this->root = $template_path;
|
||||||
$this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_';
|
$this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_';
|
||||||
$user->theme['template_storedb'] = false;
|
$user->theme['template_storedb'] = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue