From 967ab871b836f618107fe144978bd1453c3c6634 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Thu, 11 Dec 2014 20:15:27 +0000 Subject: Update Smarty --- .../sysplugins/smarty_internal_compile_insert.php | 26 ++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'library/Smarty/libs/sysplugins/smarty_internal_compile_insert.php') diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_insert.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_insert.php index e4d3f9355..4c6585543 100644 --- a/library/Smarty/libs/sysplugins/smarty_internal_compile_insert.php +++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_insert.php @@ -2,22 +2,21 @@ /** * 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. * @@ -43,8 +42,9 @@ 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 = '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,9 +134,7 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase { $_output .= "echo {$_function}({$_params},\$_smarty_tpl);?>"; } } + return $_output; } - } - -?> \ No newline at end of file -- cgit v1.2.3