diff options
Diffstat (limited to 'Widgets/smarty/libs/sysplugins/smarty_internal_compile_insert.php')
-rw-r--r-- | Widgets/smarty/libs/sysplugins/smarty_internal_compile_insert.php | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/Widgets/smarty/libs/sysplugins/smarty_internal_compile_insert.php b/Widgets/smarty/libs/sysplugins/smarty_internal_compile_insert.php index 4c658554..e4d3f935 100644 --- a/Widgets/smarty/libs/sysplugins/smarty_internal_compile_insert.php +++ b/Widgets/smarty/libs/sysplugins/smarty_internal_compile_insert.php @@ -2,21 +2,22 @@ /** * Smarty Internal Plugin Compile Insert + * * Compiles the {insert} tag * - * @package Smarty + * @package Smarty * @subpackage Compiler - * @author Uwe Tews + * @author Uwe Tews */ /** * Smarty Internal Plugin Compile Insert Class * - * @package Smarty + * @package Smarty * @subpackage Compiler */ -class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase -{ +class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase { + /** * Attribute definition: Overwrites base class. * @@ -42,9 +43,8 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase /** * Compiles code for the {insert} tag * - * @param array $args array with attributes from parser - * @param object $compiler compiler object - * + * @param array $args array with attributes from parser + * @param object $compiler compiler object * @return string compiled code */ public function compile($args, $compiler) @@ -59,12 +59,12 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase $_script = null; $_output = '<?php '; - // save possible attributes + // save posible attributes eval('$_name = ' . $_attr['name'] . ';'); if (isset($_attr['assign'])) { // output will be stored in a smarty variable instead of being displayed $_assign = $_attr['assign']; - // create variable to make sure that the compiler knows about its nocache status + // create variable to make shure that the compiler knows about its nocache status $compiler->template->tpl_vars[trim($_attr['assign'], "'")] = new Smarty_Variable(null, true); } if (isset($_attr['script'])) { @@ -82,7 +82,7 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase $_dir = $compiler->smarty->trusted_dir; } if (!empty($_dir)) { - foreach ((array) $_dir as $_script_dir) { + foreach((array)$_dir as $_script_dir) { $_script_dir = rtrim($_script_dir, '/\\') . DS; if (file_exists($_script_dir . $_script)) { $_filepath = $_script_dir . $_script; @@ -134,7 +134,9 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase $_output .= "echo {$_function}({$_params},\$_smarty_tpl);?>"; } } - return $_output; } + } + +?>
\ No newline at end of file |