http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97987
Revision: 97987
Author: aaron
Date: 2011-09-24 07:38:09 +0000 (Sat, 24 Sep 2011)
Log Message:
-----------
Fixed fatals due to WikiError being replaced with Status in core code
Modified Paths:
--------------
trunk/extensions/ConfirmAccount/presentation/specialpages/actions/ConfirmAccount_body.php
trunk/extensions/ConfirmAccount/presentation/specialpages/actions/RequestAccount_body.php
Modified:
trunk/extensions/ConfirmAccount/presentation/specialpages/actions/ConfirmAccount_body.php
===================================================================
---
trunk/extensions/ConfirmAccount/presentation/specialpages/actions/ConfirmAccount_body.php
2011-09-24 07:25:22 UTC (rev 97986)
+++
trunk/extensions/ConfirmAccount/presentation/specialpages/actions/ConfirmAccount_body.php
2011-09-24 07:38:09 UTC (rev 97987)
@@ -440,8 +440,8 @@
);
}
- if( WikiError::isError( $result ) ) {
- $error = wfMsg( 'mailerror',
htmlspecialchars( $result->toString() ) );
+ if( !$result->isOk() ) {
+ $error = wfMsg( 'mailerror',
$wgOut->parse( $result->getWikiText() ) );
$this->showForm( $error );
return false;
}
@@ -595,8 +595,8 @@
// init $error
$error = '';
- if( WikiError::isError( $result ) ) {
- $error = wfMsg( 'mailerror', htmlspecialchars(
$result->toString() ) );
+ if( !$result->isOK() ) {
+ $error = wfMsg( 'mailerror', $wgOut->parse(
$result->getWikiText() ) );
}
# Safe to hook/log now...
@@ -718,9 +718,9 @@
wfMsgExt( 'confirmaccount-email-body5',
array('parsemag','content'),
$u->getName(), $this->reason )
);
- if( WikiError::isError( $result ) ) {
+ if( !$result->isOK() ) {
$dbw->rollback();
- $error = wfMsg( 'mailerror',
htmlspecialchars( $result->toString() ) );
+ $error = wfMsg( 'mailerror',
$wgOut->parse( $result->getWikiText() ) );
$this->showForm( $error );
return false;
}
Modified:
trunk/extensions/ConfirmAccount/presentation/specialpages/actions/RequestAccount_body.php
===================================================================
---
trunk/extensions/ConfirmAccount/presentation/specialpages/actions/RequestAccount_body.php
2011-09-24 07:25:22 UTC (rev 97986)
+++
trunk/extensions/ConfirmAccount/presentation/specialpages/actions/RequestAccount_body.php
2011-09-24 07:38:09 UTC (rev 97987)
@@ -378,9 +378,9 @@
);
# Send confirmation, required!
$result = $this->sendConfirmationMail( $u, $token, $expires );
- if ( WikiError::isError( $result ) ) {
+ if ( !$result->isOK() ) {
$dbw->rollback(); // Nevermind
- $error = wfMsg( 'mailerror', htmlspecialchars(
$result->toString() ) );
+ $error = wfMsg( 'mailerror', $wgOut->parse(
$result->getWikiText() ) );
$this->showForm( $error );
return false;
}
@@ -516,7 +516,7 @@
'requestaccount-email-body-admin',
$name, $title->getFullUrl() );
# Actually send the email...
$result = UserMailer::send( $target, $source,
$subject, $body );
- if ( WikiError::isError( $result ) ) {
+ if ( !$result->isOK() ) {
wfDebug( "Could not sent email to admin
at $target\n" );
}
}
@@ -582,7 +582,7 @@
* @param User $user
* @param string $token
* @param string $expiration
- * @return mixed True on success, a WikiError object on failure.
+ * @return mixed True on success, a Status object on failure.
*/
protected function sendConfirmationMail( $user, $token, $expiration ) {
global $wgContLang;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs