]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix for disappearing 'connect' menu if xmpp and sms are disabled.
authorZach Copley <zach@status.net>
Wed, 3 Mar 2010 18:19:14 +0000 (10:19 -0800)
committerZach Copley <zach@status.net>
Wed, 3 Mar 2010 18:19:14 +0000 (10:19 -0800)
All 'connect' menu panels used to be optional, so Action tried to
figure out what the first item on the 'connect' menu should be.
This is no longer necessary because we have the non-optional OAuth
client connections panel now, which is not optional and can't be
turned off.

lib/action.php
plugins/Facebook/FacebookPlugin.php
plugins/MobileProfile/MobileProfilePlugin.php

index 0918c68582b31cc2c2ff7e9b2d07c6f2c0420a34..816086d202f00889f686d31a228ac1e5049b5d49 100644 (file)
@@ -420,13 +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';
-        }
-
         $this->elementStart('dl', array('id' => 'site_nav_global_primary'));
         $this->element('dt', null, _('Primary site navigation'));
         $this->elementStart('dd');
@@ -437,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');
index 90ed7351f3cb43f42c1dfad431201fe2ed637f76..65d4409b5e44db258abef59163ebcbcab79e0adf 100644 (file)
@@ -436,16 +436,7 @@ class FacebookPlugin extends Plugin
     function onStartPrimaryNav($action)
     {
         if (self::hasKeys()) {
-
             $user = common_current_user();
-
-            $connect = 'FBConnectSettings';
-            if (common_config('xmpp', 'enabled')) {
-                $connect = 'imsettings';
-            } else if (common_config('sms', 'enabled')) {
-                $connect = 'smssettings';
-            }
-
             if (!empty($user)) {
 
                 $fbuid = $this->loggedIn();
@@ -472,7 +463,6 @@ class FacebookPlugin extends Plugin
                         'src' => $iconurl));
 
                     $action->elementEnd('li');
-
                 }
             }
         }
index f788639aed7383d7b7fe1ca2ec9042c2cc257f07..0b37734b7dc89975e26ff123b6d6b154eeb94489 100644 (file)
@@ -307,23 +307,14 @@ class MobileProfilePlugin extends WAP20Plugin
     function _showPrimaryNav($action)
     {
         $user    = common_current_user();
-        $connect = '';
-        if (common_config('xmpp', 'enabled')) {
-            $connect = 'imsettings';
-        } else if (common_config('sms', 'enabled')) {
-            $connect = 'smssettings';
-        }
-
         $action->elementStart('ul', array('id' => 'site_nav_global_primary'));
         if ($user) {
             $action->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
                             _('Home'));
             $action->menuItem(common_local_url('profilesettings'),
                             _('Account'));
-            if ($connect) {
-                $action->menuItem(common_local_url($connect),
+            $action->menuItem(common_local_url('oauthconnectionssettings'),
                                 _('Connect'));
-            }
             if ($user->hasRight(Right::CONFIGURESITE)) {
                 $action->menuItem(common_local_url('siteadminpanel'),
                                 _('Admin'), _('Change site configuration'), false, 'nav_admin');