]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/action.php
Move snapshot configuration to its own admin panel
[quix0rs-gnu-social.git] / lib / action.php
index b85f353a3d14087a460e8a492d4d0504183ab87e..816086d202f00889f686d31a228ac1e5049b5d49 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));
             }
@@ -421,15 +420,6 @@ class Action extends HTMLOutputter // lawsuit
     function showPrimaryNav()
     {
         $user = common_current_user();
-        $connect = '';
-        if (common_config('xmpp', 'enabled')) {
-            $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'));
         $this->element('dt', null, _('Primary site navigation'));
         $this->elementStart('dd');
@@ -440,10 +430,8 @@ class Action extends HTMLOutputter // lawsuit
                                 _('Home'), _('Personal profile and friends timeline'), false, 'nav_home');
                 $this->menuItem(common_local_url('profilesettings'),
                                 _('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account');
-                if ($connect) {
-                    $this->menuItem(common_local_url($connect),
-                                    _('Connect'), _('Connect to services'), false, 'nav_connect');
-                }
+                $this->menuItem(common_local_url('oauthconnectionssettings'),
+                                _('Connect'), _('Connect to services'), false, 'nav_connect');
                 if ($user->hasRight(Right::CONFIGURESITE)) {
                     $this->menuItem(common_local_url('siteadminpanel'),
                                     _('Admin'), _('Change site configuration'), false, 'nav_admin');
@@ -977,7 +965,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;