mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[feature/template-engine] Move DEBUG_EXTRA check for $recompile up.
PHPBB3-9726
This commit is contained in:
parent
504acaba6b
commit
7778771819
1 changed files with 10 additions and 14 deletions
|
@ -325,15 +325,12 @@ class phpbb_template
|
||||||
$filename = $this->cachepath . str_replace('/', '.', $this->filename[$handle]) . '.' . $phpEx;
|
$filename = $this->cachepath . str_replace('/', '.', $this->filename[$handle]) . '.' . $phpEx;
|
||||||
$this->files_template[$handle] = (isset($user->theme['template_id'])) ? $user->theme['template_id'] : 0;
|
$this->files_template[$handle] = (isset($user->theme['template_id'])) ? $user->theme['template_id'] : 0;
|
||||||
|
|
||||||
$recompile = (!file_exists($filename) || @filesize($filename) === 0 || ($config['load_tplcompile'] && @filemtime($filename) < @filemtime($this->files[$handle]))) ? true : false;
|
$recompile = defined('DEBUG_EXTRA') ||
|
||||||
|
!file_exists($filename) ||
|
||||||
|
@filesize($filename) === 0 ||
|
||||||
|
($config['load_tplcompile'] && @filemtime($filename) < @filemtime($this->files[$handle]));
|
||||||
|
|
||||||
if (!$recompile)
|
if (!$recompile && $config['load_tplcompile'])
|
||||||
{
|
|
||||||
if (defined('DEBUG_EXTRA'))
|
|
||||||
{
|
|
||||||
$recompile = true;
|
|
||||||
}
|
|
||||||
else if ($config['load_tplcompile'])
|
|
||||||
{
|
{
|
||||||
// No way around it: we need to check inheritance here
|
// No way around it: we need to check inheritance here
|
||||||
if ($user->theme['template_inherits_id'] && !file_exists($this->files[$handle]))
|
if ($user->theme['template_inherits_id'] && !file_exists($this->files[$handle]))
|
||||||
|
@ -343,7 +340,6 @@ class phpbb_template
|
||||||
}
|
}
|
||||||
$recompile = (@filemtime($filename) < @filemtime($this->files[$handle])) ? true : false;
|
$recompile = (@filemtime($filename) < @filemtime($this->files[$handle])) ? true : false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Recompile page if the original template is newer, otherwise load the compiled version
|
// Recompile page if the original template is newer, otherwise load the compiled version
|
||||||
if (!$recompile)
|
if (!$recompile)
|
||||||
|
|
Loading…
Add table
Reference in a new issue