mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
- bugfix $smarty->clearCache('some.tpl') did by mistake cache the template object
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== SVN trunk =====
|
===== SVN trunk =====
|
||||||
|
24/02/2011
|
||||||
|
- bugfix $smarty->clearCache('some.tpl') did by mistake cache the template object
|
||||||
|
|
||||||
18/02/2011
|
18/02/2011
|
||||||
- bugfix removed possible race condition when isCached() was called for an individually cached subtemplate
|
- bugfix removed possible race condition when isCached() was called for an individually cached subtemplate
|
||||||
- bugfix force default debug.tpl to be loaded by the file resource when default_resource_type was modified
|
- bugfix force default debug.tpl to be loaded by the file resource when default_resource_type was modified
|
||||||
|
@@ -145,12 +145,14 @@ class Smarty_Internal_CacheResource_File {
|
|||||||
$_save_stat = $this->smarty->caching;
|
$_save_stat = $this->smarty->caching;
|
||||||
$this->smarty->caching = true;
|
$this->smarty->caching = true;
|
||||||
$tpl = new $this->smarty->template_class($resource_name, $this->smarty);
|
$tpl = new $this->smarty->template_class($resource_name, $this->smarty);
|
||||||
// remove from template cache
|
|
||||||
unset($this->smarty->template_objects[crc32($tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
|
|
||||||
$this->smarty->caching = $_save_stat;
|
$this->smarty->caching = $_save_stat;
|
||||||
if ($tpl->isExisting()) {
|
if ($tpl->isExisting()) {
|
||||||
$_resourcename_parts = basename(str_replace('^', '/', $tpl->getCachedFilepath()));
|
$_resourcename_parts = basename(str_replace('^', '/', $tpl->getCachedFilepath()));
|
||||||
|
// remove from template cache
|
||||||
|
unset($this->smarty->template_objects[sha1($tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
|
||||||
} else {
|
} else {
|
||||||
|
// remove from template cache
|
||||||
|
unset($this->smarty->template_objects[sha1($tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user