- bugfix subtemplate called in nocache mode could be called with wrong compile_id when it did change on one of the calling templates

This commit is contained in:
Uwe Tews
2014-11-08 21:27:53 +01:00
parent ea9c681106
commit b82756a705
2 changed files with 98 additions and 57 deletions
@@ -767,6 +767,18 @@ abstract class Smarty_Internal_TemplateCompilerBase
return $_output;
}
/**
* Generate nocache code string
*
* @param string $code PHP code
*
* @return string
*/
public function makeNocacheCode($code)
{
return "echo '/*%%SmartyNocache:{$this->nocache_hash}%%*/<?php " . str_replace("^#^", "'", addcslashes($code, '\'\\')) . "?>/*/%%SmartyNocache:{$this->nocache_hash}%%*/';\n";
}
/**
* push current file and line offset on stack for tracing {block} source lines
*