Follow-up r83825: fix fatal in API
authorHappy-melon <happy-melon@users.mediawiki.org>
Sun, 13 Mar 2011 17:02:50 +0000 (17:02 +0000)
committerHappy-melon <happy-melon@users.mediawiki.org>
Sun, 13 Mar 2011 17:02:50 +0000 (17:02 +0000)
includes/api/ApiBlock.php

index a719732..ede2e13 100644 (file)
@@ -102,7 +102,7 @@ class ApiBlock extends ApiBase {
                $res['user'] = $params['user'];
                $res['userID'] = $target instanceof User ? $target->getId() : 0;
 
-               $block = SpecialBlock::getBlockFromTargetAndType( $target, $type );
+               $block = Block::newFromTargetAndType( $target, $type );
                if( $block instanceof Block ){
                        $res['expiry'] = $block->mExpiry == Block::infinity()
                                ? 'infinite'