]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Remove 'Register' from login group nav when site is closed or inviteonly. See ticket...
authorCiaranG <ciaran@ciarang.com>
Thu, 19 Mar 2009 21:07:31 +0000 (21:07 +0000)
committerCiaranG <ciaran@ciarang.com>
Thu, 19 Mar 2009 21:07:31 +0000 (21:07 +0000)
lib/logingroupnav.php

index fd909581f4d1de0c890429a890d42b07c9f04091..f23985f3ab3a1293bcb02a8ab98364b355628a81 100644 (file)
@@ -70,16 +70,16 @@ class LoginGroupNav extends Widget
     function show()
     {
         // action => array('prompt', 'title')
-        $menu =
-          array('login' =>
-                array(_('Login'),
-                      _('Login with a username and password')),
-                'register' =>
-                array(_('Register'),
-                      _('Sign up for a new account')),
-                'openidlogin' =>
-                array(_('OpenID'),
-                      _('Login or register with OpenID')));
+        $menu = array();
+
+        $menu['login'] = array(_('Login'),
+                         _('Login with a username and password'));
+        if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
+            $menu['register'] = array(_('Register'),
+                                _('Sign up for a new account'));
+        }
+        $menu['openidlogin'] = array(_('OpenID'),
+                               _('Login or register with OpenID'));
 
         $action_name = $this->action->trimmed('action');
         $this->action->elementStart('ul', array('class' => 'nav'));