- bugfix template inheritance status must be saved when calling sub-templates https://github.com/smarty-php/smarty/issues/215

This commit is contained in:
uwetews
2016-04-13 03:36:16 +02:00
parent a36d9bc809
commit 6d4a4de0d5
3 changed files with 11 additions and 2 deletions

View File

@@ -1,7 +1,10 @@
 ===== 3.1.30-dev ===== (xx.xx.xx)  ===== 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 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 - 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 11.03.2016
- optimization of capture and security handling - optimization of capture and security handling
- improvement $smarty->clearCompiledTemplate() should return on recompiled or uncompiled resources - improvement $smarty->clearCompiledTemplate() should return on recompiled or uncompiled resources

View File

@@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/** /**
* smarty version * smarty version
*/ */
const SMARTY_VERSION = '3.1.30-dev/59'; const SMARTY_VERSION = '3.1.30-dev/60';
/** /**
* define variable scopes * define variable scopes

View File

@@ -330,6 +330,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
} }
} }
$tpl->_cache = array(); $tpl->_cache = array();
$saved_inheritance = isset($tpl->ext->_inheritance) ? $tpl->ext->_inheritance : null;
if (isset($uid)) { if (isset($uid)) {
if ($smarty->debugging) { if ($smarty->debugging) {
$smarty->_debug->start_template($tpl); $smarty->_debug->start_template($tpl);
@@ -347,6 +348,11 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
$tpl->render(); $tpl->render();
} }
} }
if (isset($saved_inheritance)) {
$tpl->ext->_inheritance = $saved_inheritance;
} else {
unset($tpl->ext->_inheritance);
}
} }
/** /**