diff --git a/change_log.txt b/change_log.txt index 7a8d874f..e3d96448 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== SVN trunk ===== +03/03/2011 +- bugfix "smarty" template variable was not recreated when cached templated had expired + 01/03/2011 - bugfix replace modifier did not work in 3.0.7 on systems without multibyte support - bugfix {$smarty.template} could return in 3.0.7 parent template name instead of diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index e47488bf..98ea8e97 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -379,6 +379,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { $this->cacheFileChecked = true; if ($this->caching === Smarty::CACHING_LIFETIME_SAVED && $this->properties['cache_lifetime'] >= 0 && (time() > ($this->getCachedTimestamp() + $this->properties['cache_lifetime']))) { $this->tpl_vars = array(); + $this->tpl_vars['smarty'] = new Smarty_Variable; $this->rendered_content = null; return $this->isCached; } @@ -396,6 +397,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { // If ($mtime > $this->getCachedTimestamp()) { If ($mtime > $_file_to_check[1]) { $this->tpl_vars = array(); + $this->tpl_vars['smarty'] = new Smarty_Variable; $this->rendered_content = null; return $this->isCached; }