Merge "Add parameter to API modules to apply change tags to log entries"
[lhc/web/wiklou.git] / includes / api / ApiBlock.php
index e2b27cb..58e3d1c 100644 (file)
@@ -39,8 +39,6 @@ class ApiBlock extends ApiBase {
         * 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();
@@ -126,7 +124,7 @@ class ApiBlock extends ApiBase {
 
                $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