More informative error message in Special:Confirmemail
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 14 Oct 2006 06:09:37 +0000 (06:09 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 14 Oct 2006 06:09:37 +0000 (06:09 +0000)
includes/SpecialConfirmemail.php
languages/messages/MessagesEn.php

index 7256760..94104f3 100644 (file)
@@ -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 );
index 92a1d15..c88f223 100644 (file)
@@ -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.',