r95243 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95242‎ | r95243 | r95244 >
Date:20:29, 22 August 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
$result is already used

fu r95241
Modified paths:
  • /trunk/extensions/TitleBlacklist/api/ApiQueryTitleBlacklist.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TitleBlacklist/api/ApiQueryTitleBlacklist.php
@@ -58,13 +58,13 @@
5959 htmlspecialchars( $params['title'] ),
6060 );
6161
62 - $result = $this->getResult();
63 - $result->addValue( 'titleblacklist', 'result', 'blacklisted' );
 62+ $res = $this->getResult();
 63+ $res->addValue( 'titleblacklist', 'result', 'blacklisted' );
6464 // this is hardcoded to 'edit' in Titleblacklist.hooks.php, duplicating that.
6565 $message = $blacklisted->getErrorMessage( 'edit' );
66 - $result->addValue( 'titleblacklist', 'reason', wfMessage( $message, $result )->text() );
67 - $result->addValue( 'titleblacklist', 'message', $message );
68 - $result->addValue( 'titleblacklist', 'line', htmlspecialchars( $blacklisted->getRaw() ) );
 66+ $res->addValue( 'titleblacklist', 'reason', wfMessage( $message, $result )->text() );
 67+ $res->addValue( 'titleblacklist', 'message', $message );
 68+ $res->addValue( 'titleblacklist', 'line', htmlspecialchars( $blacklisted->getRaw() ) );
6969 } else {
7070 // not blacklisted
7171 $this->getResult()->addValue( 'titleblacklist', 'result', 'ok' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95241Subclass ApiBase...reedy20:27, 22 August 2011

Comments

#Comment by 😂 (talk | contribs)   19:42, 23 August 2011

Don't use "fu," it's lame.

Status & tagging log