- fix on nocache code in child {block} tags

This commit is contained in:
Uwe.Tews
2009-11-12 22:50:48 +00:00
parent da8e893358
commit 39b25f8db8
5 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
11/12/2009
- fixed variable filenames in {include_php} and {insert}
- added scope to Smarty variables in the {block} tag compiler
- fix on nocache code in child {block} tags
11/11/2009
- fixed {foreachelse}, {forelse}, {sectionelse} compiled code at nocache variables

View File

@@ -39,7 +39,7 @@ class Smarty_Internal_Cacher_InlineCode {
// If the template is not evaluated and we have a nocache section and or a nocache tag
if ($is_code) {
// generate replacement code
if (!$compiler->template->isEvaluated() && $compiler->template->caching &&
if ((!$compiler->template->isEvaluated() || $compiler->template->forceNocache) && $compiler->template->caching &&
($compiler->nocache || $compiler->tag_nocache)) {
$compiler->tag_nocache = false;
$_output = str_replace("'", "\'", $content);

View File

@@ -58,7 +58,7 @@ class Smarty_Internal_Compile_Extend extends Smarty_Internal_CompileBase {
// compile block content
$_tpl = $this->smarty->createTemplate('string:' . $block_content,null,null,$template);
$_tpl->template_filepath = $this->compiler->template->getTemplateFilepath();
// $_tpl->suppressFileDependency = true;
$_tpl->forceNocache= true;
$_compiled_content = $_tpl->getCompiledTemplate();
unset($_tpl);
$_name = trim($_match[3], "\"'}");

View File

@@ -111,7 +111,7 @@ class Smarty_Internal_Resource_Extend {
// compile block content
$_tpl = $this->smarty->createTemplate('string:' . $block_content,null,null,$template);
$_tpl->template_filepath = $this->template->getTemplateFilepath();
// $_tpl->suppressFileDependency = true;
$_tpl->forceNocache= true;
$_compiled_content = $_tpl->getCompiledTemplate();
unset($_tpl);
$_name = trim($_match[3], "\"'}");

View File

@@ -25,6 +25,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
public $cacher_class = null;
public $caching_type = null;
public $force_compile = null;
public $forceNocache = false;
// Template resource
public $template_resource = null;
public $resource_type = null;