]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/action.php
use HTTPS for JSON if necessary
[quix0rs-gnu-social.git] / lib / action.php
index 9612a82b716342efc3c69050ada5f563baa0fe55..461121042236b32c80a04405961089f1e36a5f76 100644 (file)
@@ -229,7 +229,7 @@ class Action extends HTMLOutputter // lawsuit
                 Event::handle('EndShowLaconicaStyles', array($this));
             }
 
-            $this->cssLink(common_path('js/css/smoothness/jquery-ui.css'));
+            $this->cssLink(common_path('js/css/smoothness/jquery-ui.css', StatusNet::isHTTPS()));
 
             if (Event::handle('StartShowUAStyles', array($this))) {
                 $this->comment('[if IE]><link rel="stylesheet" type="text/css" '.
@@ -241,8 +241,10 @@ class Action extends HTMLOutputter // lawsuit
                                        'href="'.Theme::path('css/ie'.$ver.'.css', 'base').'?version='.STATUSNET_VERSION.'" /><![endif]');
                     }
                 }
-                $this->comment('[if IE]><link rel="stylesheet" type="text/css" '.
+                if (file_exists(Theme::file('css/ie.css'))) {
+                    $this->comment('[if IE]><link rel="stylesheet" type="text/css" '.
                                'href="'.Theme::path('css/ie.css', null).'?version='.STATUSNET_VERSION.'" /><![endif]');
+                }
                 Event::handle('EndShowUAStyles', array($this));
             }
 
@@ -300,7 +302,7 @@ class Action extends HTMLOutputter // lawsuit
                     $this->script('jquery.form.min.js');
                     $this->script('jquery-ui.min.js');
                     $this->script('jquery.cookie.min.js');
-                    $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.min.js').'"); }');
+                    $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.min.js', StatusNet::isHTTP()).'"); }');
                     $this->script('jquery.joverlay.min.js');
                     $this->script('jquery.infieldlabel.min.js');
                 } else {
@@ -308,7 +310,7 @@ class Action extends HTMLOutputter // lawsuit
                     $this->script('jquery.form.js');
                     $this->script('jquery-ui.min.js');
                     $this->script('jquery.cookie.js');
-                    $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.js').'"); }');
+                    $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.js', StatusNet::isHTTP()).'"); }');
                     $this->script('jquery.joverlay.js');
                     $this->script('jquery.infieldlabel.js');
                 }
@@ -326,10 +328,8 @@ class Action extends HTMLOutputter // lawsuit
                 }
                 // This route isn't available in single-user mode.
                 // Not sure why, but it causes errors here.
-                if (!common_config('singleuser', 'enabled')) {
-                    $this->inlineScript('var _peopletagAC = "' .
-                                        common_local_url('peopletagautocomplete') . '";');
-                }
+                $this->inlineScript('var _peopletagAC = "' .
+                                    common_local_url('peopletagautocomplete') . '";');
                 $this->showScriptMessages();
                 // Anti-framing code to avoid clickjacking attacks in older browsers.
                 // This will show a blank page if the page is being framed, which is