summaryrefslogtreecommitdiff
path: root/lib/logingroupnav.php
diff options
context:
space:
mode:
authorCiaranG <ciaran@ciarang.com>2009-03-19 21:07:31 +0000
committerCiaranG <ciaran@ciarang.com>2009-03-19 21:07:31 +0000
commit94271293ceb1098d559f83e80aa4578cddd8976a (patch)
tree8384bb04c9726e0e406672ea4ec2b2c24745fc82 /lib/logingroupnav.php
parent0e1186dfd0e96a64688c107f28a93b1ef172f56a (diff)
Remove 'Register' from login group nav when site is closed or inviteonly. See ticket #1335
Diffstat (limited to 'lib/logingroupnav.php')
-rw-r--r--lib/logingroupnav.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/logingroupnav.php b/lib/logingroupnav.php
index fd909581f..f23985f3a 100644
--- a/lib/logingroupnav.php
+++ b/lib/logingroupnav.php
@@ -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'));