- 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,4 +1,7 @@
 ===== 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

View File

@@ -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

View File

@@ -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);
}
}
/**