aboutsummaryrefslogtreecommitdiffstats
path: root/library/Smarty/libs/sysplugins/smarty_internal_compile_insert.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Smarty/libs/sysplugins/smarty_internal_compile_insert.php')
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_insert.php26
1 files changed, 12 insertions, 14 deletions
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 = '<?php ';
- // save posible attributes
+ // save possible 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 shure that the compiler knows about its nocache status
+ // create variable to make sure 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,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