aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template.php
diff options
context:
space:
mode:
authorthe_systech <the_systech@users.sourceforge.net>2001-08-31 20:59:12 +0000
committerthe_systech <the_systech@users.sourceforge.net>2001-08-31 20:59:12 +0000
commit9ef75ba2b8f5f833d1d836871d341b6e24ab90da (patch)
tree28e2983ec0fab3a0d9e642b2287d65adb0533d00 /phpBB/includes/template.php
parent5c6eb1e14918762ef657d8c93d83d2fafd2b36e0 (diff)
downloadforums-9ef75ba2b8f5f833d1d836871d341b6e24ab90da.tar
forums-9ef75ba2b8f5f833d1d836871d341b6e24ab90da.tar.gz
forums-9ef75ba2b8f5f833d1d836871d341b6e24ab90da.tar.bz2
forums-9ef75ba2b8f5f833d1d836871d341b6e24ab90da.tar.xz
forums-9ef75ba2b8f5f833d1d836871d341b6e24ab90da.zip
Fix for Paul's Polling problem..
git-svn-id: file:///svn/phpbb/trunk@957 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/template.php')
-rw-r--r--phpBB/includes/template.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index b043749721..8396b7b4a0 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -125,7 +125,6 @@ class Template {
// Run the compiled code.
eval($this->compiled_code[$handle]);
-
return true;
}
@@ -145,13 +144,10 @@ class Template {
}
// Compile it, with the "no echo statements" option on.
- $code = $this->compile($this->uncompiled_code[$handle], true);
- // turn it into a variable assignment.
- $code = '$_str = \'' . $code . '\';';
+ $code = $this->compile($this->uncompiled_code[$handle], true, '_str');
// evaluate the variable assignment.
eval($code);
-
// assign the value of the generated variable to the given varname.
$this->assign_var($varname, $_str);
@@ -285,7 +281,7 @@ class Template {
* executable, but can be used as part of a variable assignment
* for use in assign_code_from_handle().
*/
- function compile($code, $do_not_echo = false)
+ function compile($code, $do_not_echo = false, $retvar = '')
{
// replace \ with \\ and then ' with \'.
$code = str_replace('\\', '\\\\', $code);
@@ -406,6 +402,10 @@ class Template {
{
$code_lines[$i] = 'echo \'' . $code_lines[$i] . '\' . "\\n";';
}
+ else
+ {
+ $code_lines[$i] = '$' . $retvar . '.= \'' . $code_lines[$i] . '\' . "\\n";';
+ }
}
}
@@ -472,4 +472,4 @@ class Template {
}
-?> \ No newline at end of file
+?>