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.

This commit is contained in:
Brion Vibber 2010-04-19 18:45:50 +02:00
parent 4f0672a94c
commit e547a2f54c
2 changed files with 8 additions and 4 deletions

View File

@ -267,10 +267,14 @@ 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? ' .
$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;
}
}
/**

View File

@ -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