diff -r 000000000000 -r 3906ca745819 packages/ssoinabox-webui/root/usr/local/share/ssoinabox/htdocs/includes/smarty/sysplugins/smarty_internal_compile_eval.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/packages/ssoinabox-webui/root/usr/local/share/ssoinabox/htdocs/includes/smarty/sysplugins/smarty_internal_compile_eval.php Tue Jan 08 23:13:29 2013 -0500 @@ -0,0 +1,73 @@ +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']; + } + + // create template object + $_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();"; + } + return ""; + } + +} + +?> \ No newline at end of file