From 25ea3dd1de996d935da388d997205b4d1b9e71a8 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Fri, 7 May 2010 18:28:17 +0000 Subject: [PATCH] - bugfix on {insert} --- libs/sysplugins/smarty_internal_nocache_insert.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/sysplugins/smarty_internal_nocache_insert.php b/libs/sysplugins/smarty_internal_nocache_insert.php index 79aa8857..ea593832 100644 --- a/libs/sysplugins/smarty_internal_nocache_insert.php +++ b/libs/sysplugins/smarty_internal_nocache_insert.php @@ -37,7 +37,12 @@ class Smarty_Internal_Nocache_Insert { } else { $_output .= "echo {$_function}(" . var_export($_attr, true) . ",\$_smarty_tpl->smarty,\$_smarty_tpl);?>"; } - return "/*%%SmartyNocache:{$_template->properties['nocache_hash']}%%*/" . $_output . "/*/%%SmartyNocache:{$_template->properties['nocache_hash']}%%*/"; + $_tpl = $_template; + while ($_tpl->parent instanceof Smarty_Internal_Template) { + $_tpl = $_tpl->parent; + } + return "/*%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/" . $_output . "/*/%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/"; } } + ?> \ No newline at end of file