r83832 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83831‎ | r83832 | r83833 >
Date:17:02, 13 March 2011
Author:happy-melon
Status:ok
Tags:
Comment:
Follow-up r83825: fix fatal in API
Modified paths:
  • /trunk/phase3/includes/api/ApiBlock.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiBlock.php
@@ -102,7 +102,7 @@
103103 $res['user'] = $params['user'];
104104 $res['userID'] = $target instanceof User ? $target->getId() : 0;
105105
106 - $block = SpecialBlock::getBlockFromTargetAndType( $target, $type );
 106+ $block = Block::newFromTargetAndType( $target, $type );
107107 if( $block instanceof Block ){
108108 $res['expiry'] = $block->mExpiry == Block::infinity()
109109 ? 'infinite'

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83825Some refactoring in Block.php and SpecialBlock.php: move backend stuff into B...happy-melon14:47, 13 March 2011

Status & tagging log