- bugfix do not overwrite 'smarty' template variable when {include ... scope=parent} exits

This commit is contained in:
uwe.tews@googlemail.com
2011-06-16 17:27:32 +00:00
parent bc96213c44
commit 4d07e3b03e
2 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,8 @@
===== SVN trunk =====
09/0672011
16/06/2011
- bugfix do not overwrite 'smarty' template variable when {include ... scope=parent} exits
09/06/2011
- bugfix smarty security_policy issue in plugins {html_image} and {fetch}
07/06/2011

View File

@@ -650,7 +650,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data {
$has_root = false;
foreach ($this->tpl_vars as $_key => $_variable) {
$_variable_scope = $this->tpl_vars[$_key]->scope;
if ($scope == Smarty::SCOPE_LOCAL && $_variable_scope == Smarty::SCOPE_LOCAL) {
if (($scope == Smarty::SCOPE_LOCAL && $_variable_scope == Smarty::SCOPE_LOCAL) || $_key == 'smarty') {
continue;
}
if (isset($this->parent) && ($scope == Smarty::SCOPE_PARENT || $_variable_scope == Smarty::SCOPE_PARENT)) {