Skip to content

Commit

Permalink
- bugfix template inheritance status must be saved when calling sub-t…
Browse files Browse the repository at this point in the history
…emplates #215
  • Loading branch information
uwetews committed Apr 13, 2016
1 parent a36d9bc commit 6d4a4de
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion change_log.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion libs/Smarty.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions libs/sysplugins/smarty_internal_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ public function _subTemplateRender($template, $cache_id, $compile_id, $caching,
}
}
$tpl->_cache = array();
$saved_inheritance = isset($tpl->ext->_inheritance) ? $tpl->ext->_inheritance : null;
if (isset($uid)) {
if ($smarty->debugging) {
$smarty->_debug->start_template($tpl);
Expand All @@ -347,6 +348,11 @@ public function _subTemplateRender($template, $cache_id, $compile_id, $caching,
$tpl->render();
}
}
if (isset($saved_inheritance)) {
$tpl->ext->_inheritance = $saved_inheritance;
} else {
unset($tpl->ext->_inheritance);
}
}

/**
Expand Down

0 comments on commit 6d4a4de

Please sign in to comment.