mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 12:14:12 +02:00
- 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:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user