mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- bugfix {include} could result in a fatal error if used in appended or prepended nested {block} tags
(reported by mh and Issue 83)
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
===== trunk =====
|
||||
19.02.2012
|
||||
- bugfix {include} could result in a fatal error if used in appended or prepended nested {block} tags
|
||||
(reported by mh and Issue 83)
|
||||
|
||||
07.02.2012
|
||||
- bugfix increase entropy of internal function names in compiled and cached template files (Forum Topic 20996)
|
||||
- enhancement cacheable parameter added to default plugin handler, same functionality as in registerPlugin (request by calguy1000)
|
||||
|
@@ -240,10 +240,14 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_CompileBase {
|
||||
$_name = trim($saved_data[0]['name'], "\"'");
|
||||
if (isset($compiler->template->block_data[$_name]) && !isset($compiler->template->block_data[$_name]['compiled'])) {
|
||||
// restore to status before {block} tag as new subtemplate code of parent {block} is not needed
|
||||
$compiler->merged_templates = $saved_data[4];
|
||||
$compiler->smarty->merged_templates_func = $saved_data[5];
|
||||
$compiler->template->properties = $saved_data[6];
|
||||
$compiler->template->has_nocache_code = $saved_data[7];
|
||||
// TODO: Below code was disabled in 3.1.8 because of problems with {include} in nested {block} tags in child templates
|
||||
// combined with append/prepend or $smarty.block.parent
|
||||
// For later versions it should be checked under which conditions it could run for optimisation
|
||||
//
|
||||
//$compiler->merged_templates = $saved_data[4];
|
||||
//$compiler->smarty->merged_templates_func = $saved_data[5];
|
||||
//$compiler->template->properties = $saved_data[6];
|
||||
//$compiler->template->has_nocache_code = $saved_data[7];
|
||||
$_output = Smarty_Internal_Compile_Block::compileChildBlock($compiler, $_name);
|
||||
} else {
|
||||
if (isset($saved_data[0]['hide']) && !isset($compiler->template->block_data[$_name]['source'])) {
|
||||
@@ -256,7 +260,7 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_CompileBase {
|
||||
// reset flags
|
||||
$compiler->parser->current_buffer = $saved_data[1];
|
||||
$compiler->nocache = $saved_data[2];
|
||||
$compiler->smarty->merge_compiled_includes = $saved_data[3];
|
||||
//$compiler->smarty->merge_compiled_includes = $saved_data[3];
|
||||
// reset flag for {block} tag
|
||||
$compiler->inheritance = false;
|
||||
// $_output content has already nocache code processed
|
||||
|
Reference in New Issue
Block a user