From 7e36f98c1d6d5c12ca683b5466d82881a2ad69ca Mon Sep 17 00:00:00 2001 From: uwetews Date: Sun, 14 Feb 2016 14:33:59 +0100 Subject: [PATCH] - bugfix using extendsall as default resource and {include} inside {block} tags could produce unexpected results https://github.com/smarty-php/smarty/issues/183 --- change_log.txt | 1 + libs/Smarty.class.php | 2 +- libs/sysplugins/smarty_internal_runtime_inheritance.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 06a014a51..aa3d17adf 100644 --- a/change_log.txt +++ b/change_log.txt @@ -2,6 +2,7 @@ 14.02.2016 - new tag {make_nocache} read NEW_FEATURES.txt https://github.com/smarty-php/smarty/issues/110 - optimization of sub-template processing + - bugfix using extendsall as default resource and {include} inside {block} tags could produce unexpected results https://github.com/smarty-php/smarty/issues/183 11.02.2016 - improvement added KnockoutJS comments to trimwhitespace outputfilter https://github.com/smarty-php/smarty/issues/82 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 3151c224b..141437dd2 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/40'; + const SMARTY_VERSION = '3.1.30-dev/41'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_runtime_inheritance.php b/libs/sysplugins/smarty_internal_runtime_inheritance.php index 4adb881b5..96eba319f 100644 --- a/libs/sysplugins/smarty_internal_runtime_inheritance.php +++ b/libs/sysplugins/smarty_internal_runtime_inheritance.php @@ -70,7 +70,7 @@ class Smarty_Internal_Runtime_Inheritance public function init(Smarty_Internal_Template $tpl, $initChild, $blockNames = array()) { // if called while executing parent template it must be a sub-template with new inheritance root - if ($initChild && $this->state == 3) { + if ($initChild && $this->state == 3 && (strpos($tpl->template_resource, 'extendsall') === false)) { $tpl->ext->_inheritance = new Smarty_Internal_Runtime_Inheritance(); $tpl->ext->_inheritance->init($tpl, $initChild, $blockNames); return;