mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-18 22:58:10 +01:00
Fixed INCLUDE. Now cached items are processed correctly. all glitches are fixed (for example the strange display after a template got changed)
git-svn-id: file:///svn/phpbb/trunk@3824 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
46f33fae41
commit
2918db79d5
@ -174,7 +174,7 @@ class Template {
|
||||
|
||||
if (!$this->compile_load($_str, $handle, true))
|
||||
{
|
||||
global $user;
|
||||
global $user, $phpEx;
|
||||
|
||||
if (!$this->loadfile($handle))
|
||||
{
|
||||
@ -231,9 +231,9 @@ class Template {
|
||||
$this->files[$handle] = $this->make_filename($filename);
|
||||
$_str = '';
|
||||
|
||||
if (!($this->compile_load($_str, $handle, false)))
|
||||
if (!($this->compile_load($_str, $handle, true)))
|
||||
{
|
||||
global $user;
|
||||
global $user, $phpEx;
|
||||
|
||||
if (!$this->loadfile($handle))
|
||||
{
|
||||
@ -243,7 +243,7 @@ class Template {
|
||||
$this->compiled_code[$handle] = $this->compile($this->uncompiled_code[$handle]);
|
||||
$this->compile_write($handle, $this->compiled_code[$handle]);
|
||||
|
||||
return $handle;
|
||||
eval($this->compiled_code[$handle]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -372,8 +372,7 @@ class Template {
|
||||
case 'INCLUDE':
|
||||
$temp = '';
|
||||
list(, $temp) = each($include_blocks);
|
||||
$compile_blocks[] = "// INCLUDE $temp\ninclude('" . $this->cachedir . $temp . ".' . \$phpEx);\n";
|
||||
$this->assign_from_include($temp);
|
||||
$compile_blocks[] = "// INCLUDE $temp\n\$this->assign_from_include('" . $temp . "');\n";
|
||||
break;
|
||||
/* case 'INCLUDEPHP':
|
||||
$compile_blocks[] = '// INCLUDEPHP ' . $blocks[2][$curr_tb] . "\n" . $this->compile_tag_include_php($blocks[2][$curr_tb]);
|
||||
@ -700,6 +699,7 @@ class Template {
|
||||
if (file_exists($filename) && @filemtime($filename) >= @filemtime($this->files[$handle]))
|
||||
{
|
||||
$_str = '';
|
||||
|
||||
include($filename);
|
||||
|
||||
if ($do_echo && $_str != '')
|
||||
|
Loading…
x
Reference in New Issue
Block a user