]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge commit 'refs/merge-requests/1738' of git://gitorious.org/statusnet/mainline...
authorCraig Andrews <candrews@integralblue.com>
Sun, 11 Oct 2009 17:17:59 +0000 (13:17 -0400)
committerCraig Andrews <candrews@integralblue.com>
Sun, 11 Oct 2009 17:17:59 +0000 (13:17 -0400)
1  2 
plugins/FBConnect/FBConnectPlugin.php

index cb19b054610abb9f8961a3e88b6e0ba727678215,950718a33c313b3202456b65281b100c338d4ceb..ff74aade45b9301b1934afc45392dd207fc4151a
@@@ -232,6 -232,14 +232,14 @@@ class FBConnectPlugin extends Plugi
      {
  
          $user = common_current_user();
+         $connect = 'FBConnectSettings';
+         if (common_config('xmpp', 'enabled')) {
+             $connect = 'imsettings';
+         } else if (common_config('sms', 'enabled')) {
+             $connect = 'smssettings';
+         } else if (common_config('twitter', 'enabled')) {
+             $connect = 'twittersettings';
+         }
  
          if (!empty($user)) {
  
                  _('Home'), _('Personal profile and friends timeline'), false, 'nav_home');
              $action->menuItem(common_local_url('profilesettings'),
                  _('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account');
-             if (common_config('xmpp', 'enabled')) {
-                 $action->menuItem(common_local_url('imsettings'),
-                     _('Connect'), _('Connect to IM, SMS, Twitter'), false, 'nav_connect');
-             } else {
-              $action->menuItem(common_local_url('smssettings'),
-                  _('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect');
-             }
+             $action->menuItem(common_local_url($connect),
+                 _('Connect'), _('Connect to services'), false, 'nav_connect');
              if (common_config('invite', 'enabled')) {
                  $action->menuItem(common_local_url('invite'),
                      _('Invite'),
               }
           }
           else {
-              if (!common_config('site', 'closed')) {
-                  $action->menuItem(common_local_url('register'),
-                      _('Register'), _('Create an account'), false, 'nav_register');
+              if (!common_config('site', 'openidonly')) {
+                  if (!common_config('site', 'closed')) {
+                      $action->menuItem(common_local_url('register'),
+                          _('Register'), _('Create an account'), false, 'nav_register');
+                  }
+                  $action->menuItem(common_local_url('login'),
+                      _('Login'), _('Login to the site'), false, 'nav_login');
+              } else {
+                  $this->menuItem(common_local_url('openidlogin'),
+                                  _('OpenID'), _('Login with OpenID'), false, 'nav_openid');
               }
-              $action->menuItem(common_local_url('login'),
-                  _('Login'), _('Login to the site'), false, 'nav_login');
           }
  
           $action->menuItem(common_local_url('doc', array('title' => 'help')),
               _('Help'), _('Help me!'), false, 'nav_help');
-          $action->menuItem(common_local_url('peoplesearch'),
-              _('Search'), _('Search for people or text'), false, 'nav_search');
+          if ($user || !common_config('site', 'private')) {
+              $action->menuItem(common_local_url('peoplesearch'),
+                  _('Search'), _('Search for people or text'), false, 'nav_search');
+          }
  
 +        // We are replacing the primary nav entirely; give other
 +        // plugins a chance to handle it here.
 +
 +        Event::handle('EndPrimaryNav', array($action));
 +
          return false;
      }