1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-08-09 05:02:44 +03:00

update Smarty to v3.1.33 - "This release does cover security issue CVE-2018-16831, other bug fixes (see changelog.txt) and adds a new feature of the {capture} tag (see NEW_FEATURES.txt)."

This commit is contained in:
David Goodwin
2019-09-25 13:55:07 +01:00
parent 7360407b73
commit 907bd7ee46
199 changed files with 5335 additions and 4857 deletions

View File

@@ -6,11 +6,9 @@
* @package Smarty
* @subpackage PluginsInternal
* @author Uwe Tews
*
**/
class Smarty_Internal_Runtime_Inheritance
{
/**
* State machine
* - 0 idle next extends will create a new inheritance tree
@@ -42,7 +40,7 @@ class Smarty_Internal_Runtime_Inheritance
*
* @var int
*/
public $tplIndex = - 1;
public $tplIndex = -1;
/**
* Array of template source objects
@@ -64,7 +62,6 @@ class Smarty_Internal_Runtime_Inheritance
* @param \Smarty_Internal_Template $tpl template object of caller
* @param bool $initChild if true init for child template
* @param array $blockNames outer level block name
*
*/
public function init(Smarty_Internal_Template $tpl, $initChild, $blockNames = array())
{
@@ -76,7 +73,6 @@ class Smarty_Internal_Runtime_Inheritance
}
++$this->tplIndex;
$this->sources[ $this->tplIndex ] = $tpl->source;
// start of child sub template(s)
if ($initChild) {
$this->state = 1;
@@ -113,18 +109,21 @@ class Smarty_Internal_Runtime_Inheritance
ob_end_clean();
$this->state = 2;
}
if (isset($template) && (($tpl->parent->_isTplObj() && $tpl->parent->source->type !== 'extends') ||
$tpl->smarty->extends_recursion)) {
$tpl->_subTemplateRender($template,
$tpl->cache_id,
$tpl->compile_id,
$tpl->caching ? 9999 : 0,
$tpl->cache_lifetime,
array(),
2,
false,
$uid,
$func);
if (isset($template) && (($tpl->parent->_isTplObj() && $tpl->parent->source->type !== 'extends')
|| $tpl->smarty->extends_recursion)
) {
$tpl->_subTemplateRender(
$template,
$tpl->cache_id,
$tpl->compile_id,
$tpl->caching ? 9999 : 0,
$tpl->cache_lifetime,
array(),
2,
false,
$uid,
$func
);
}
}
@@ -166,9 +165,11 @@ class Smarty_Internal_Runtime_Inheritance
*
* @throws \SmartyException
*/
public function process(Smarty_Internal_Template $tpl, Smarty_Internal_Block $block,
Smarty_Internal_Block $parent = null)
{
public function process(
Smarty_Internal_Template $tpl,
Smarty_Internal_Block $block,
Smarty_Internal_Block $parent = null
) {
if ($block->hide && !isset($block->child)) {
return;
}
@@ -187,8 +188,8 @@ class Smarty_Internal_Runtime_Inheritance
if ($block->prepend && isset($parent)) {
$this->callParent($tpl, $block, '{block prepend}');
if ($block->append) {
if ($block->callsChild || !isset($block->child) ||
($block->child->hide && !isset($block->child->child))
if ($block->callsChild || !isset($block->child)
|| ($block->child->hide && !isset($block->child->child))
) {
$this->callBlock($block, $tpl);
} else {