Index: trunk/extensions/ConfirmAccount/presentation/specialpages/actions/RequestAccount_body.php |
— | — | @@ -378,9 +378,9 @@ |
379 | 379 | ); |
380 | 380 | # Send confirmation, required! |
381 | 381 | $result = $this->sendConfirmationMail( $u, $token, $expires ); |
382 | | - if ( WikiError::isError( $result ) ) { |
| 382 | + if ( !$result->isOK() ) { |
383 | 383 | $dbw->rollback(); // Nevermind |
384 | | - $error = wfMsg( 'mailerror', htmlspecialchars( $result->toString() ) ); |
| 384 | + $error = wfMsg( 'mailerror', $wgOut->parse( $result->getWikiText() ) ); |
385 | 385 | $this->showForm( $error ); |
386 | 386 | return false; |
387 | 387 | } |
— | — | @@ -516,7 +516,7 @@ |
517 | 517 | 'requestaccount-email-body-admin', $name, $title->getFullUrl() ); |
518 | 518 | # Actually send the email... |
519 | 519 | $result = UserMailer::send( $target, $source, $subject, $body ); |
520 | | - if ( WikiError::isError( $result ) ) { |
| 520 | + if ( !$result->isOK() ) { |
521 | 521 | wfDebug( "Could not sent email to admin at $target\n" ); |
522 | 522 | } |
523 | 523 | } |
— | — | @@ -582,7 +582,7 @@ |
583 | 583 | * @param User $user |
584 | 584 | * @param string $token |
585 | 585 | * @param string $expiration |
586 | | - * @return mixed True on success, a WikiError object on failure. |
| 586 | + * @return mixed True on success, a Status object on failure. |
587 | 587 | */ |
588 | 588 | protected function sendConfirmationMail( $user, $token, $expiration ) { |
589 | 589 | global $wgContLang; |
Index: trunk/extensions/ConfirmAccount/presentation/specialpages/actions/ConfirmAccount_body.php |
— | — | @@ -440,8 +440,8 @@ |
441 | 441 | ); |
442 | 442 | } |
443 | 443 | |
444 | | - if( WikiError::isError( $result ) ) { |
445 | | - $error = wfMsg( 'mailerror', htmlspecialchars( $result->toString() ) ); |
| 444 | + if( !$result->isOk() ) { |
| 445 | + $error = wfMsg( 'mailerror', $wgOut->parse( $result->getWikiText() ) ); |
446 | 446 | $this->showForm( $error ); |
447 | 447 | return false; |
448 | 448 | } |
— | — | @@ -595,8 +595,8 @@ |
596 | 596 | // init $error |
597 | 597 | $error = ''; |
598 | 598 | |
599 | | - if( WikiError::isError( $result ) ) { |
600 | | - $error = wfMsg( 'mailerror', htmlspecialchars( $result->toString() ) ); |
| 599 | + if( !$result->isOK() ) { |
| 600 | + $error = wfMsg( 'mailerror', $wgOut->parse( $result->getWikiText() ) ); |
601 | 601 | } |
602 | 602 | |
603 | 603 | # Safe to hook/log now... |
— | — | @@ -718,9 +718,9 @@ |
719 | 719 | wfMsgExt( 'confirmaccount-email-body5', |
720 | 720 | array('parsemag','content'), $u->getName(), $this->reason ) |
721 | 721 | ); |
722 | | - if( WikiError::isError( $result ) ) { |
| 722 | + if( !$result->isOK() ) { |
723 | 723 | $dbw->rollback(); |
724 | | - $error = wfMsg( 'mailerror', htmlspecialchars( $result->toString() ) ); |
| 724 | + $error = wfMsg( 'mailerror', $wgOut->parse( $result->getWikiText() ) ); |
725 | 725 | $this->showForm( $error ); |
726 | 726 | return false; |
727 | 727 | } |