bugfix for non-existent handles and theme data (we really need to clean this up, template_files feels quite furry)

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10213 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2009-10-05 16:22:21 +00:00
parent e9c1c03ca6
commit d5fe2e7db7

View file

@ -248,8 +248,13 @@ class template
{
global $user, $phpEx, $config;
if (!isset($this->filename[$handle]))
{
trigger_error("template->_tpl_load(): No file specified for handle $handle", E_USER_ERROR);
}
$filename = $this->cachepath . str_replace('/', '.', $this->filename[$handle]) . '.' . $phpEx;
$this->files_template[$handle] = $user->theme['template_id'];
$this->files_template[$handle] = (isset($user->theme['template_id'])) ? $user->theme['template_id'] : 0;
$recompile = false;
if (!file_exists($filename) || @filesize($filename) === 0)