API: Make action=block return an ISO 8601 timestamp rather than a UNIX timestamp
authorRoan Kattouw <catrope@users.mediawiki.org>
Tue, 27 May 2008 10:18:28 +0000 (10:18 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Tue, 27 May 2008 10:18:28 +0000 (10:18 +0000)
RELEASE-NOTES
includes/api/ApiBlock.php

index ce14ef1..d21c7f6 100644 (file)
@@ -368,6 +368,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Handled requesting disallowed tokens more gracefully
 * (bug 14140) URL-encoded page titles are now decoded in edit summaries
 * (bug 14243) Only accept post requests in action=edit; patch by HardDisk
+* action=block now returns an ISO8601 timestamp, like all other modules do
 
 === Languages updated in 1.13 ===
 
index f11b4b2..2a13c29 100644 (file)
@@ -95,7 +95,7 @@ class ApiBlock extends ApiBase {
 
                $res['user'] = $params['user'];
                $res['userID'] = $userID;
-               $res['expiry'] = ($expiry == Block::infinity() ? 'infinite' : $expiry);
+               $res['expiry'] = ($expiry == Block::infinity() ? 'infinite' : wfTimestamp(TS_ISO_8601, $expiry));
                $res['reason'] = $params['reason'];
                if($params['anononly'])
                        $res['anononly'] = '';