]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/htmloutputter.php
catch exceptions from snapshot
[quix0rs-gnu-social.git] / lib / htmloutputter.php
index a88a5b82c5066523634c7f84a68ffae55d697344..2091c6e2ca4d60fd4020f2ca91cfbcb09558c909 100644 (file)
@@ -67,7 +67,7 @@ class HTMLOutputter extends XMLOutputter
      * @param boolean $indent Whether to indent output, default true
      */
 
-    function __construct($output='php://output', $indent=true)
+    function __construct($output='php://output', $indent=null)
     {
         parent::__construct($output, $indent);
     }
@@ -405,10 +405,11 @@ class HTMLOutputter extends XMLOutputter
             if( empty($url->scheme) && empty($url->host) && empty($url->query) && empty($url->fragment))
             {
                 if(file_exists(Theme::file($src,$theme))){
-                   $src = Theme::path($src, $theme) . '?version=' . STATUSNET_VERSION;
+                   $src = Theme::path($src, $theme);
                 }else{
                    $src = common_path($src);
                 }
+                $src.= '?version=' . STATUSNET_VERSION;
             }
             $this->element('link', array('rel' => 'stylesheet',
                                     'type' => 'text/css',
@@ -477,13 +478,10 @@ class HTMLOutputter extends XMLOutputter
     */
     function autofocus($id)
     {
-        $this->elementStart('script', array('type' => 'text/javascript'));
-        $this->raw('/*<![CDATA[*/'.
+        $this->inlineScript(
                    ' $(document).ready(function() {'.
                    ' var el = $("#' . $id . '");'.
                    ' if (el.length) { el.focus(); }'.
-                   ' });'.
-                   ' /*]]>*/');
-        $this->elementEnd('script');
+                   ' });');
     }
 }