aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGraham Eames <grahamje@users.sourceforge.net>2005-12-13 20:58:28 +0000
committerGraham Eames <grahamje@users.sourceforge.net>2005-12-13 20:58:28 +0000
commit9298082ddedb32873b953ed15399ef74e98ebf1f (patch)
tree414efdbf9efbd573d5ff3b6e4d07cc86bac0d928
parente4defede57bcde636ee7afb59e0e9a385f7f4a13 (diff)
downloadforums-9298082ddedb32873b953ed15399ef74e98ebf1f.tar
forums-9298082ddedb32873b953ed15399ef74e98ebf1f.tar.gz
forums-9298082ddedb32873b953ed15399ef74e98ebf1f.tar.bz2
forums-9298082ddedb32873b953ed15399ef74e98ebf1f.tar.xz
forums-9298082ddedb32873b953ed15399ef74e98ebf1f.zip
Some fixes to the template code
- this handles the case where file caching is used and no cached version exists git-svn-id: file:///svn/phpbb/trunk@5331 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/functions_template.php2
-rw-r--r--phpBB/includes/template.php10
2 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php
index 01ed80f61d..d82150993e 100644
--- a/phpBB/includes/functions_template.php
+++ b/phpBB/includes/functions_template.php
@@ -32,7 +32,7 @@ class template_compile
/**
* constuctor
*/
- function template_compile($template)
+ function template_compile(&$template)
{
$this->template = &$template;
}
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index f2bda6575f..85ac7d581e 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -229,12 +229,12 @@ class template
{
if ($row['template_filename'] == $this->filename[$handle])
{
- $this->_tpl_load_file($handle);
+ $compile->_tpl_load_file($handle);
}
else
{
$this->files[$row['template_filename']] = $this->root . '/' . $row['template_filename'];
- $this->_tpl_load_file($row['template_filename']);
+ $compile->_tpl_load_file($row['template_filename']);
unset($this->compiled_code[$row['template_filename']]);
unset($this->files[$row['template_filename']]);
}
@@ -242,8 +242,8 @@ class template
if ($row['template_filename'] == $this->filename[$handle])
{
- $this->compiled_code[$handle] = $this->compile(trim($row['template_data']));
- $this->compile_write($handle, $this->compiled_code[$handle]);
+ $this->compiled_code[$handle] = $compile->compile(trim($row['template_data']));
+ $compile->compile_write($handle, $this->compiled_code[$handle]);
}
else
{
@@ -251,7 +251,7 @@ class template
if (!file_exists($this->cachepath . $row['template_filename'] . '.' . (($this->static_lang) ? $user->data['user_lang'] . '.' : '') . $phpEx))
{
$this->filename[$row['template_filename']] = $row['template_filename'];
- $this->compile_write($row['template_filename'], $this->compile(trim($row['template_data'])));
+ $compile->compile_write($row['template_filename'], $compile->compile(trim($row['template_data'])));
unset($this->filename[$row['template_filename']]);
}
}