mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
- bugfix unique_resource did not properly apply to compiled resources (Forum Topic 20128)
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== trunk =====
|
===== trunk =====
|
||||||
|
14.10.2011
|
||||||
|
- bugfix unique_resource did not properly apply to compiled resources (Forum Topic 20128)
|
||||||
|
|
||||||
13.10.2011
|
13.10.2011
|
||||||
- add caching for config files in Smarty_Resource
|
- add caching for config files in Smarty_Resource
|
||||||
- bugfix disable of caching after isCached() call did not work (Forum Topic 20131)
|
- bugfix disable of caching after isCached() call did not work (Forum Topic 20131)
|
||||||
|
@@ -656,13 +656,9 @@ class Smarty_Template_Source {
|
|||||||
public function getCompiled(Smarty_Internal_Template $_template)
|
public function getCompiled(Smarty_Internal_Template $_template)
|
||||||
{
|
{
|
||||||
// check runtime cache
|
// check runtime cache
|
||||||
$_cache_key_dir = $_template->smarty->joined_template_dir;
|
$_cache_key = $this->unique_resource . '#' . $_template->compile_id;
|
||||||
$_cache_key = $_template->template_resource . '#' . $_template->compile_id;
|
if (isset(Smarty_Resource::$compileds[$_cache_key])) {
|
||||||
if (!isset(Smarty_Resource::$compileds[$_cache_key_dir])) {
|
return Smarty_Resource::$compileds[$_cache_key];
|
||||||
Smarty_Resource::$compileds[$_cache_key_dir] = array();
|
|
||||||
}
|
|
||||||
if (isset(Smarty_Resource::$compileds[$_cache_key_dir][$_cache_key])) {
|
|
||||||
return Smarty_Resource::$compileds[$_cache_key_dir][$_cache_key];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$compiled = new Smarty_Template_Compiled($this);
|
$compiled = new Smarty_Template_Compiled($this);
|
||||||
@@ -671,7 +667,7 @@ class Smarty_Template_Source {
|
|||||||
$compiled->exists = !!$compiled->timestamp;
|
$compiled->exists = !!$compiled->timestamp;
|
||||||
|
|
||||||
// runtime cache
|
// runtime cache
|
||||||
Smarty_Resource::$compileds[$_cache_key_dir][$_cache_key] = $compiled;
|
Smarty_Resource::$compileds[$_cache_key] = $compiled;
|
||||||
|
|
||||||
return $compiled;
|
return $compiled;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user