diff options
author | Mario <mario@mariovavti.com> | 2018-03-09 11:12:18 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-03-09 11:12:18 +0100 |
commit | 4baf5eab16d809977a44e7911ddcab0ff8383897 (patch) | |
tree | 393f618c4cfc20f53264ecd8a26a08de0823d35d /library/Smarty/libs/sysplugins/smarty_internal_compile_call.php | |
parent | 577da0eb9eb1f90a4cf7a70cfb3582cfb49007ac (diff) | |
parent | 7361af85b5488fc8bd1744389a3a332dc74276b0 (diff) | |
download | volse-hubzilla-3.2.tar.gz volse-hubzilla-3.2.tar.bz2 volse-hubzilla-3.2.zip |
Merge branch '3.2RC'3.2
Diffstat (limited to 'library/Smarty/libs/sysplugins/smarty_internal_compile_call.php')
-rw-r--r-- | library/Smarty/libs/sysplugins/smarty_internal_compile_call.php | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_call.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_call.php deleted file mode 100644 index b7204bec0..000000000 --- a/library/Smarty/libs/sysplugins/smarty_internal_compile_call.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * Smarty Internal Plugin Compile Function_Call - * Compiles the calls of user defined tags defined by {function} - * - * @package Smarty - * @subpackage Compiler - * @author Uwe Tews - */ - -/** - * Smarty Internal Plugin Compile Function_Call Class - * - * @package Smarty - * @subpackage Compiler - */ -class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase -{ - /** - * Attribute definition: Overwrites base class. - * - * @var array - * @see Smarty_Internal_CompileBase - */ - public $required_attributes = array('name'); - - /** - * Attribute definition: Overwrites base class. - * - * @var array - * @see Smarty_Internal_CompileBase - */ - public $shorttag_order = array('name'); - - /** - * Attribute definition: Overwrites base class. - * - * @var array - * @see Smarty_Internal_CompileBase - */ - public $optional_attributes = array('_any'); - - /** - * Compiles the calls of user defined tags defined by {function} - * - * @param array $args array with attributes from parser - * @param object $compiler compiler object - * - * @return string compiled code - */ - public function compile($args, $compiler) - { - // check and get attributes - $_attr = $this->getAttributes($compiler, $args); - // save possible attributes - if (isset($_attr['assign'])) { - // output will be stored in a smarty variable instead of being displayed - $_assign = $_attr['assign']; - } - //$_name = trim($_attr['name'], "'\""); - $_name = $_attr['name']; - unset($_attr['name'], $_attr['assign'], $_attr['nocache']); - // set flag (compiled code of {function} must be included in cache file - if (!$compiler->template->caching || $compiler->nocache || $compiler->tag_nocache) { - $_nocache = 'true'; - } else { - $_nocache = 'false'; - } - $_paramsArray = array(); - foreach ($_attr as $_key => $_value) { - if (is_int($_key)) { - $_paramsArray[] = "$_key=>$_value"; - } else { - $_paramsArray[] = "'$_key'=>$_value"; - } - } - $_params = 'array(' . implode(",", $_paramsArray) . ')'; - //$compiler->suppressNocacheProcessing = true; - // was there an assign attribute - if (isset($_assign)) { - $_output = - "<?php ob_start();\n\$_smarty_tpl->smarty->ext->_tplFunction->callTemplateFunction(\$_smarty_tpl, {$_name}, {$_params}, {$_nocache});\n\$_smarty_tpl->assign({$_assign}, ob_get_clean());?>\n"; - } else { - $_output = - "<?php \$_smarty_tpl->smarty->ext->_tplFunction->callTemplateFunction(\$_smarty_tpl, {$_name}, {$_params}, {$_nocache});?>\n"; - } - return $_output; - } -} |