* (bug 5838) Namespace names for Nds-NL
* (bug 5749) Added Tyvan language files
* (bug 5791) Fix SQL syntax in Special:BrokenRedirects, was causing incorrect data to show
+* (bug 5839) Prevent access to Special:Confirmemail for logged-out users
== Compatibility ==
class ConfirmationForm {
/** */
function show( $code ) {
- if( empty( $code ) ) {
+ global $wgUser;
+ if( !$wgUser->isLoggedIn() ) {
+ $this->showNeedLogin();
+ } elseif( empty( $code ) ) {
$this->showEmpty( $this->checkAndSend() );
} else {
$this->showCode( $code );
}
}
+ function showNeedLogin() {
+ global $wgOut, $wgUser;
+
+ $title = Title::makeTitle( NS_SPECIAL, 'Userlogin' );
+ $self = Title::makeTitle( NS_SPECIAL, 'Confirmemail' );
+ $skin = $wgUser->getSkin();
+ $llink = $skin->makeKnownLinkObj( $title, wfMsgHtml( 'loginreqlink' ), 'returnto=' . $self->getPrefixedUrl() );
+
+ $wgOut->setPageTitle( wfMsg( 'confirmemail' ) );
+ $wgOut->addHtml( wfMsgWikiHtml( 'confirmemail_needlogin', $llink ) );
+ return;
+ }
+
/** */
function showCode( $code ) {
$user = User::newFromConfirmationCode( $code );
'confirmemail_sent' => 'Confirmation e-mail sent.',
'confirmemail_sendfailed' => 'Could not send confirmation mail. Check address for invalid characters.',
'confirmemail_invalid' => 'Invalid confirmation code. The code may have expired.',
+'confirmemail_needlogin' => 'You need to $1 to confirm your email address.',
'confirmemail_success' => 'Your e-mail address has been confirmed. You may now log in and enjoy the wiki.',
'confirmemail_loggedin' => 'Your e-mail address has now been confirmed.',
'confirmemail_error' => 'Something went wrong saving your confirmation.',