- bugfix for other cache resources than file

This commit is contained in:
Uwe.Tews
2009-09-30 16:00:11 +00:00
parent 26949347e2
commit ed6df80a8f
2 changed files with 5 additions and 6 deletions

View File

@@ -1,4 +1,7 @@
09/30/2009
- bugfix for other cache resources than file
- the methodes assign_by_ref is now wrapped to assign, append_by_ref to append
- allow arrays of variables pass in display, fetch and createTemplate calls
$data = array('foo'=>'bar','foo2'=>'blar');

View File

@@ -457,15 +457,11 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
}
// write to cache when nessecary
if (!$this->isEvaluated() && $this->caching) {
// $this->properties['file_dependency'] = array_unique($this->properties['file_dependency']);
// write rendered template
$this->writeCachedContent($this);
if ($this->usesCompiler()) {
// cache file may contain nocache code
ob_start();
$_smarty_tpl = $this;
include $this->getCachedFilepath();
$this->rendered_content = ob_get_clean();
// cache file may contain nocache code. read it back for processing
$this->rendered_content = $this->smarty->cache_resource_objects[$this->caching_type]->getCachedContents($this);
}
}
}