]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/action.php
Merge branch 'twitter-facebook-mods'
[quix0rs-gnu-social.git] / lib / action.php
index b85f353a3d14087a460e8a492d4d0504183ab87e..0918c68582b31cc2c2ff7e9b2d07c6f2c0420a34 100644 (file)
@@ -249,7 +249,7 @@ class Action extends HTMLOutputter // lawsuit
                 $this->script('jquery.min.js');
                 $this->script('jquery.form.js');
                 $this->script('jquery.cookie.js');
-                $this->script('json2.js');
+                $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.js').'"); }');
                 $this->script('jquery.joverlay.min.js');
                 Event::handle('EndShowJQueryScripts', array($this));
             }
@@ -259,8 +259,7 @@ class Action extends HTMLOutputter // lawsuit
                 $this->script('util.js');
                 $this->script('geometa.js');
                 // Frame-busting code to avoid clickjacking attacks.
-                $this->element('script', array('type' => 'text/javascript'),
-                               'if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');
+                $this->inlineScript('if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');
                 Event::handle('EndShowStatusNetScripts', array($this));
                 Event::handle('EndShowLaconicaScripts', array($this));
             }
@@ -426,8 +425,6 @@ class Action extends HTMLOutputter // lawsuit
             $connect = 'imsettings';
         } else if (common_config('sms', 'enabled')) {
             $connect = 'smssettings';
-        } else if (common_config('twitter', 'enabled')) {
-            $connect = 'twittersettings';
         }
 
         $this->elementStart('dl', array('id' => 'site_nav_global_primary'));
@@ -977,7 +974,7 @@ class Action extends HTMLOutputter // lawsuit
 
         if (is_null($arg)) {
             return $def;
-        } else if (in_array($arg, array('true', 'yes', '1'))) {
+        } else if (in_array($arg, array('true', 'yes', '1', 'on'))) {
             return true;
         } else if (in_array($arg, array('false', 'no', '0'))) {
             return false;