From 6d4a4de0d51935a8e0853878aef25b685edbc23a Mon Sep 17 00:00:00 2001 From: uwetews Date: Wed, 13 Apr 2016 03:36:16 +0200 Subject: [PATCH] - bugfix template inheritance status must be saved when calling sub-templates https://github.com/smarty-php/smarty/issues/215 --- change_log.txt | 5 ++++- libs/Smarty.class.php | 2 +- libs/sysplugins/smarty_internal_template.php | 6 ++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 54b2ee7a..fcde649c 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,7 +1,10 @@  ===== 3.1.30-dev ===== (xx.xx.xx) + 13.04.2016 + - bugfix template inheritance status must be saved when calling sub-templates https://github.com/smarty-php/smarty/issues/215 + 27.03.2016 - bugfix change of 11.03.2016 cause again {capture} data could not been seen in other templates with {$smarty.capture.name} https://github.com/smarty-php/smarty/issues/153 - + 11.03.2016 - optimization of capture and security handling - improvement $smarty->clearCompiledTemplate() should return on recompiled or uncompiled resources diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 9ba0c060..6633b4aa 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.30-dev/59'; + const SMARTY_VERSION = '3.1.30-dev/60'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index 885de7ec..02ce83d8 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -330,6 +330,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase } } $tpl->_cache = array(); + $saved_inheritance = isset($tpl->ext->_inheritance) ? $tpl->ext->_inheritance : null; if (isset($uid)) { if ($smarty->debugging) { $smarty->_debug->start_template($tpl); @@ -347,6 +348,11 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase $tpl->render(); } } + if (isset($saved_inheritance)) { + $tpl->ext->_inheritance = $saved_inheritance; + } else { + unset($tpl->ext->_inheritance); + } } /**