]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Renderer.php
Remove/replace killme() with *exit()
[friendica.git] / src / Core / Renderer.php
index 44b56fcba373afda90354e624efb2740db7070db..29b160634972ee5f3aab3f51b9e7051974600013 100644 (file)
@@ -48,29 +48,29 @@ class Renderer extends BaseObject
                'internal' => '',
                'smarty3' => '}}'
     ];
-    
-    /**
-     * @brief This is our template processor
-     *
-     * @param string|FriendicaSmarty $s The string requiring macro substitution or an instance of FriendicaSmarty
-     * @param array $r                  key value pairs (search => replace)
-     * 
-     * @return string substituted string
-    */
-    public static function replaceMacros($s, $r)
+
+       /**
+        * @brief This is our template processor
+        *
+        * @param string|FriendicaSmarty $s    The string requiring macro substitution or an instance of FriendicaSmarty
+        * @param array                  $vars key value pairs (search => replace)
+        *
+        * @return string substituted string
+        */
+    public static function replaceMacros($s, $vars)
     {
         $stamp1 = microtime(true);
         $a = self::getApp();
 
         // pass $baseurl to all templates
-        $r['$baseurl'] = System::baseUrl();
+        $vars['$baseurl'] = System::baseUrl();
         $t = self::getTemplateEngine();
 
         try {
-            $output = $t->replaceMacros($s, $r);
+            $output = $t->replaceMacros($s, $vars);
         } catch (Exception $e) {
             echo "<pre><b>" . __FUNCTION__ . "</b>: " . $e->getMessage() . "</pre>";
-            killme();
+            exit();
         }
 
         $a->saveTimestamp($stamp1, "rendering");
@@ -96,7 +96,7 @@ class Renderer extends BaseObject
             $template = $t->getTemplateFile($s, $root);
         } catch (Exception $e) {
             echo "<pre><b>" . __FUNCTION__ . "</b>: " . $e->getMessage() . "</pre>";
-            killme();
+            exit();
         }
 
         $a->saveTimestamp($stamp1, "file");