mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-06 22:45:02 +02: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))
|
if (!$this->compile_load($_str, $handle, true))
|
||||||
{
|
{
|
||||||
global $user;
|
global $user, $phpEx;
|
||||||
|
|
||||||
if (!$this->loadfile($handle))
|
if (!$this->loadfile($handle))
|
||||||
{
|
{
|
||||||
@ -231,9 +231,9 @@ class Template {
|
|||||||
$this->files[$handle] = $this->make_filename($filename);
|
$this->files[$handle] = $this->make_filename($filename);
|
||||||
$_str = '';
|
$_str = '';
|
||||||
|
|
||||||
if (!($this->compile_load($_str, $handle, false)))
|
if (!($this->compile_load($_str, $handle, true)))
|
||||||
{
|
{
|
||||||
global $user;
|
global $user, $phpEx;
|
||||||
|
|
||||||
if (!$this->loadfile($handle))
|
if (!$this->loadfile($handle))
|
||||||
{
|
{
|
||||||
@ -243,7 +243,7 @@ class Template {
|
|||||||
$this->compiled_code[$handle] = $this->compile($this->uncompiled_code[$handle]);
|
$this->compiled_code[$handle] = $this->compile($this->uncompiled_code[$handle]);
|
||||||
$this->compile_write($handle, $this->compiled_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':
|
case 'INCLUDE':
|
||||||
$temp = '';
|
$temp = '';
|
||||||
list(, $temp) = each($include_blocks);
|
list(, $temp) = each($include_blocks);
|
||||||
$compile_blocks[] = "// INCLUDE $temp\ninclude('" . $this->cachedir . $temp . ".' . \$phpEx);\n";
|
$compile_blocks[] = "// INCLUDE $temp\n\$this->assign_from_include('" . $temp . "');\n";
|
||||||
$this->assign_from_include($temp);
|
|
||||||
break;
|
break;
|
||||||
/* case 'INCLUDEPHP':
|
/* case 'INCLUDEPHP':
|
||||||
$compile_blocks[] = '// INCLUDEPHP ' . $blocks[2][$curr_tb] . "\n" . $this->compile_tag_include_php($blocks[2][$curr_tb]);
|
$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]))
|
if (file_exists($filename) && @filemtime($filename) >= @filemtime($this->files[$handle]))
|
||||||
{
|
{
|
||||||
$_str = '';
|
$_str = '';
|
||||||
|
|
||||||
include($filename);
|
include($filename);
|
||||||
|
|
||||||
if ($do_echo && $_str != '')
|
if ($do_echo && $_str != '')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user