- bugfix when using {$smarty.block.child} and name of {block} was in double quoted string

- bugfix updateParentVariables() was called twice when leaving {include} processing
This commit is contained in:
uwe.tews@googlemail.com
2011-01-10 17:10:35 +00:00
parent eba1d212f2
commit 65e823610d
3 changed files with 9 additions and 2 deletions

View File

@@ -1,4 +1,9 @@
===== SVN trunk =====
10/01/2010
- bugfix when using {$smarty.block.child} and name of {block} was in double quoted string
- bugfix updateParentVariables() was called twice when leaving {include} processing
- bugfix mb_str_replace in replace and escape modifiers work with utf8
31/12/2010

View File

@@ -96,7 +96,7 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
$stack_count = count($compiler->_tag_stack);
while (--$stack_count >= 0) {
if ($compiler->_tag_stack[$stack_count][0] == 'block') {
$_name = trim($compiler->_tag_stack[$stack_count][1][0]['name'] ,"'");
$_name = trim($compiler->_tag_stack[$stack_count][1][0]['name'] ,"'\"");
break;
}
}

View File

@@ -163,7 +163,9 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
$_output .= "<?php \$_smarty_tpl = array_pop(\$_tpl_stack);?>";
} else {
$_output .= " echo \$_template->getRenderedTemplate();?>";
$_output .= "<?php \$_template->updateParentVariables($_parent_scope);?>";
if ($_parent_scope != Smarty::SCOPE_LOCAL) {
$_output .= "<?php \$_template->updateParentVariables($_parent_scope);?>";
}
}
}
$_output .= "<?php unset(\$_template);?>";