]> git.mxchange.org Git - friendica.git/blobdiff - library/Smarty/libs/sysplugins/smarty_internal_compile_insert.php
reverting tinymce changes, updating smarty to 3.1.19
[friendica.git] / library / Smarty / libs / sysplugins / smarty_internal_compile_insert.php
index e4d3f93552c9f7559c7b8c995d53e9d1ac10c3ad..4c6585543f874dc399f97af00614d49d7196ff99 100644 (file)
@@ -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