Allow inline script to be output without HTML prefixing.
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 7 May 2010 19:24:10 +0000 (13:24 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 7 May 2010 19:28:11 +0000 (13:28 -0600)
framework/Core/lib/Horde.php

index 9bda0a3..c0acb7c 100644 (file)
@@ -1836,8 +1836,10 @@ HTML;
 
     /**
      * Print pending inline javascript to the output buffer.
+     *
+     * @param boolean $nowrap  Don't wrap inline script.
      */
-    static public function outputInlineScript()
+    static public function outputInlineScript($nowrap = false)
     {
         if (empty(self::$_inlineScript)) {
             return;
@@ -1861,7 +1863,9 @@ HTML;
             $script[] = $val;
         }
 
-        echo self::wrapInlineScript($script);
+        echo $nowrap
+            ? implode('', $script)
+            : self::wrapInlineScript($script);
 
         self::$_inlineScript = array();
     }