- bugfix of cache filename on extended templates when force_compile=true

This commit is contained in:
Uwe.Tews
2010-02-08 17:39:48 +00:00
parent 0c2b18c727
commit b48ef33cd5
2 changed files with 5 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
08/02/2010
- bugfix of cache filename on extended templates when force_compile=true
07/02/2010 07/02/2010
- bugfix on changes of 05/02/2010 - bugfix on changes of 05/02/2010
- preserve line endings type form template source - preserve line endings type form template source

View File

@@ -336,12 +336,12 @@ class Smarty_Internal_Template extends Smarty_Internal_Data {
{ {
if ($this->isCached === null) { if ($this->isCached === null) {
$this->isCached = false; $this->isCached = false;
if (($this->caching == SMARTY_CACHING_LIFETIME_CURRENT || $this->caching == SMARTY_CACHING_LIFETIME_SAVED) && !$this->resource_object->isEvaluated && !$this->force_compile && !$this->force_cache) { if (($this->caching == SMARTY_CACHING_LIFETIME_CURRENT || $this->caching == SMARTY_CACHING_LIFETIME_SAVED) && !$this->resource_object->isEvaluated) {
if (!isset($this->cache_resource_object)) { if (!isset($this->cache_resource_object)) {
$this->cache_resource_object = $this->smarty->loadCacheResource(); $this->cache_resource_object = $this->smarty->loadCacheResource();
} }
$cachedTimestamp = $this->getCachedTimestamp(); $cachedTimestamp = $this->getCachedTimestamp();
if ($cachedTimestamp === false) { if ($cachedTimestamp === false || $this->force_compile || $this->force_cache) {
return $this->isCached; return $this->isCached;
} }
if ($this->caching === SMARTY_CACHING_LIFETIME_SAVED || ($this->caching == SMARTY_CACHING_LIFETIME_CURRENT && (time() <= ($cachedTimestamp + $this->cache_lifetime) || $this->cache_lifetime < 0))) { if ($this->caching === SMARTY_CACHING_LIFETIME_SAVED || ($this->caching == SMARTY_CACHING_LIFETIME_CURRENT && (time() <= ($cachedTimestamp + $this->cache_lifetime) || $this->cache_lifetime < 0))) {