We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit e547a2f5 authored by Brion Vibber's avatar Brion Vibber

Fix ticket #2289: registration links were showing in top nav bar, login page...

Fix ticket #2289: registration links were showing in top nav bar, login page message when site set to invite-only or closed registration, when the 'register' action can't be used.
parent 4f0672a9
......@@ -267,9 +267,13 @@ class LoginAction extends Action
'user name and password ' .
'before changing your settings.');
} else {
return _('Login with your username and password. ' .
'Don\'t have a username yet? ' .
'[Register](%%action.register%%) a new account.');
$prompt = _('Login with your username and password.');
if (!common_config('site', 'closed') && !common_config('site', 'inviteonly')) {
$prompt .= ' ';
$prompt .= _('Don\'t have a username yet? ' .
'[Register](%%action.register%%) a new account.');
}
return $prompt;
}
}
......
......@@ -464,7 +464,7 @@ class Action extends HTMLOutputter // lawsuit
_m('MENU', 'Logout'), $tooltip, false, 'nav_logout');
}
else {
if (!common_config('site', 'closed')) {
if (!common_config('site', 'closed') && !common_config('site', 'inviteonly')) {
// TRANS: Tooltip for main menu option "Register"
$tooltip = _m('TOOLTIP', 'Create an account');
// TRANS: Main menu option when not logged in to register a new account
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment