diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2003-04-13 11:36:43 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2003-04-13 11:36:43 +0000 |
| commit | 2918db79d5a71390800673df1f5e7e07090e3b07 (patch) | |
| tree | d4050e9a383bcb4d8270dffde506d294951c52a7 | |
| parent | 46f33fae4197b1d6d992c8a503077da96b9ae07b (diff) | |
| download | forums-2918db79d5a71390800673df1f5e7e07090e3b07.tar forums-2918db79d5a71390800673df1f5e7e07090e3b07.tar.gz forums-2918db79d5a71390800673df1f5e7e07090e3b07.tar.bz2 forums-2918db79d5a71390800673df1f5e7e07090e3b07.tar.xz forums-2918db79d5a71390800673df1f5e7e07090e3b07.zip | |
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
| -rw-r--r-- | phpBB/includes/template.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 274fffb1d7..74790c6e96 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -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 != '') |
