From 4d07e3b03e7cfda5fcb09d9c0f11a25145d86e94 Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Thu, 16 Jun 2011 17:27:32 +0000 Subject: [PATCH] - bugfix do not overwrite 'smarty' template variable when {include ... scope=parent} exits --- change_log.txt | 5 ++++- libs/sysplugins/smarty_internal_template.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 4727ce58..71ac579c 100644 --- a/change_log.txt +++ b/change_log.txt @@ -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 diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index 480fbee6..4d798f78 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -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)) {