From a175ef0c04134595f4945707d76343b8b0c7ebd2 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 14 Oct 2006 06:09:37 +0000 Subject: [PATCH] More informative error message in Special:Confirmemail --- includes/SpecialConfirmemail.php | 7 +++++-- languages/messages/MessagesEn.php | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/includes/SpecialConfirmemail.php b/includes/SpecialConfirmemail.php index 725676099b..94104f3407 100644 --- a/includes/SpecialConfirmemail.php +++ b/includes/SpecialConfirmemail.php @@ -54,8 +54,11 @@ class EmailConfirmation extends SpecialPage { global $wgOut, $wgUser, $wgLang, $wgRequest; if( $wgRequest->wasPosted() && $wgUser->matchEditToken( $wgRequest->getText( 'token' ) ) ) { $ok = $wgUser->sendConfirmationMail(); - $message = WikiError::isError( $ok ) ? 'confirmemail_sendfailed' : 'confirmemail_sent'; - $wgOut->addWikiText( wfMsg( $message ) ); + if ( WikiError::isError( $ok ) ) { + $wgOut->addWikiText( wfMsg( 'confirmemail_sendfailed', $ok->toString() ) ); + } else { + $wgOut->addWikiText( wfMsg( 'confirmemail_sent' ) ); + } } else { if( $wgUser->isEmailConfirmed() ) { $time = $wgLang->timeAndDate( $wgUser->mEmailAuthenticated, true ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 92a1d15393..c88f223289 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2351,7 +2351,10 @@ mail to your address. The mail will include a link containing a code; load the link in your browser to confirm that your e-mail address is valid.", 'confirmemail_send' => 'Mail a confirmation code', 'confirmemail_sent' => 'Confirmation e-mail sent.', -'confirmemail_sendfailed' => 'Could not send confirmation mail. Check address for invalid characters.', +'confirmemail_sendfailed' => 'Could not send confirmation mail. Check address for invalid characters. + +Mailer returned: $1 +', '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.', -- 2.20.1