From ab5d8d4e07bb3c8230d0285ef8902ef1979fce51 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 18 Oct 2018 02:39:34 +0200 Subject: Updating Smarty --- .../sysplugins/smarty_internal_compile_eval.php | 33 ++++++++++------------ 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'lib/smarty/sysplugins/smarty_internal_compile_eval.php') diff --git a/lib/smarty/sysplugins/smarty_internal_compile_eval.php b/lib/smarty/sysplugins/smarty_internal_compile_eval.php index 6cf481b..8e0174e 100644 --- a/lib/smarty/sysplugins/smarty_internal_compile_eval.php +++ b/lib/smarty/sysplugins/smarty_internal_compile_eval.php @@ -1,22 +1,21 @@ required_attributes = array('var'); - $this->optional_attributes = array('assign'); // check and get attributes $_attr = $this->getAttributes($compiler, $args); - if (isset($_attr['assign'])) { - // output will be stored in a smarty variable instead of beind displayed - $_assign = $_attr['assign']; + if (isset($_attr[ 'assign' ])) { + // output will be stored in a smarty variable instead of being displayed + $_assign = $_attr[ 'assign' ]; } - // create template object - $_output = "\$_template = new {$compiler->smarty->template_class}('eval:'.".$_attr['var'].", \$_smarty_tpl->smarty, \$_smarty_tpl);"; + $_output = + "\$_template = new {$compiler->smarty->template_class}('eval:'.{$_attr[ 'var' ]}, \$_smarty_tpl->smarty, \$_smarty_tpl);"; //was there an assign attribute? if (isset($_assign)) { $_output .= "\$_smarty_tpl->assign($_assign,\$_template->fetch());"; } else { - $_output .= "echo \$_template->fetch();"; + $_output .= 'echo $_template->fetch();'; } return ""; } - } - -?> \ No newline at end of file -- cgit v1.2.3