r93659 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93658‎ | r93659 | r93660 >
Date:21:36, 1 August 2011
Author:raindrift
Status:resolved
Tags:
Comment:
Added raw message name to output, so localization can happen on the client side if necessary.
Added another line to test source, for checking custom error messages
Modified paths:
  • /trunk/extensions/TitleBlacklist/api/ApiQueryTitleBlacklist.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TitleBlacklist/api/ApiQueryTitleBlacklist.php
@@ -62,7 +62,9 @@
6363
6464 $this->getResult()->addValue( 'titleblacklist', 'result', 'blacklisted' );
6565 // this is hardcoded to 'edit' in Titleblacklist.hooks.php, duplicating that.
66 - $this->getResult()->addValue( 'titleblacklist', 'reason', wfMessage( $blacklisted->getErrorMessage( 'edit' ), $result )->text() );
 66+ $message = $blacklisted->getErrorMessage( 'edit' );
 67+ $this->getResult()->addValue( 'titleblacklist', 'reason', wfMessage( $message, $result )->text() );
 68+ $this->getResult()->addValue( 'titleblacklist', 'message', $message );
6769 $this->getResult()->addValue( 'titleblacklist', 'line', htmlspecialchars( $blacklisted->getRaw() ) );
6870 } else {
6971 // not blacklisted

Follow-up revisions

RevisionCommit summaryAuthorDate
r93666checking in tests that were missed in r93659raindrift22:44, 1 August 2011

Status & tagging log