mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34:27 +02:00
- fix on nocache code in child {block} tags
This commit is contained in:
@@ -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
|
||||
|
@@ -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);
|
||||
|
@@ -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], "\"'}");
|
||||
|
@@ -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], "\"'}");
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user