r90963 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90962‎ | r90963 | r90964 >
Date:14:42, 28 June 2011
Author:akshay
Status:ok
Tags:
Comment:
Fixed -isGood() bug
Modified paths:
  • /trunk/extensions/SignupAPI/includes/SpecialUserSignup.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SignupAPI/includes/SpecialUserSignup.php
@@ -206,7 +206,7 @@
207207 # Send out an email authentication message if needed
208208 if( $wgEmailAuthentication && User::isValidEmailAddr( $mUser->getEmail() ) ) {
209209 $status = $mUser->sendConfirmationMail();
210 - if( $status==1 ) {
 210+ if( $status->isGood() ) {
211211 $wgOut->addWikiMsg( 'confirmemail_oncreate' );
212212 } else {
213213 $wgOut->addWikiText( $status->getWikiText( 'confirmemail_sendfailed' ) );
@@ -336,7 +336,7 @@
337337 # if email is provided then validate it
338338 if( !empty( $this->mEmail ) && !Sanitizer::validateEmail( $this->mEmail ) ) {
339339 return self::INVALID_EMAIL;
340 - }
 340+ }
341341
342342 # Set some additional data so the AbortNewAccount hook can be used for
343343 # more than just username validation

Status & tagging log