* of success. If it fails, the result will specify the nature of the error.
*/
public function execute() {
- global $wgContLang;
-
$this->checkUserRightsAny( 'block' );
$user = $this->getUser();
$block = Block::newFromTarget( $target, null, true );
if ( $block instanceof Block ) {
- $res['expiry'] = $wgContLang->formatExpiry( $block->mExpiry, TS_ISO_8601, 'infinite' );
+ $res['expiry'] = ApiResult::formatExpiry( $block->mExpiry, 'infinite' );
$res['id'] = $block->getId();
} else {
# should be unreachable