mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 21:31:48 +01:00
- bugfix template inheritance status must be saved when calling sub-templates https://github.com/smarty-php/smarty/issues/215
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user