-bugfix and enhancement on subtemplate {include} and template {function} tags.

* Calling a template which has a nocache section could fail if it was
called from a cached and a not cached subtemplate.
* Calling the same subtemplate cached and not cached with the
$smarty->merge_compiled_includes enabled could cause problems
* Many smaller related changes
This commit is contained in:
Uwe Tews
2014-11-01 22:42:34 +01:00
parent 5f2f292739
commit bc13ebbc9b
14 changed files with 456 additions and 308 deletions
+5 -1
View File
@@ -762,7 +762,11 @@ class Smarty_Template_Source
public function getCompiled($_template)
{
// check runtime cache
$_cache_key = $this->unique_resource . '#' . $_template->compile_id;
$_cache_key = $this->unique_resource . '#';
if ($_template->caching) {
$_cache_key .= 'caching#';
}
$_cache_key .= $_template->compile_id;
if (isset(Smarty_Resource::$compileds[$_cache_key])) {
return Smarty_Resource::$compileds[$_cache_key];
}