From: Matthew Britton Date: Wed, 31 Mar 2010 14:44:35 +0000 (+0000) Subject: (bug 22868) don't list infinite block expiry date as "now" in API logevents X-Git-Tag: 1.31.0-rc.0~37289 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/?a=commitdiff_plain;h=fb18f9d8e7e0f90ddf80e4dfce056271a3c52d7b;p=lhc%2Fweb%2Fwiklou.git (bug 22868) don't list infinite block expiry date as "now" in API logevents --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 73b473cbdd..3efc3ab513 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -75,6 +75,7 @@ logged in (anonpreviewwarning). * (bug 22764) uselang parameter for action=parse * (bug 22944) API: watchlist options are inconsistent * (bug 22339) "Go" result should be available through the API +* (bug 22868) don't list infinite block expiry date as "now" in API logevents === Languages updated in 1.17 === diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index da388dcaa9..5c13172fe8 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -208,8 +208,12 @@ class ApiQueryLogEvents extends ApiQueryBase { case 'block': $vals2 = array(); list( $vals2['duration'], $vals2['flags'] ) = $params; - $vals2['expiry'] = wfTimestamp( TS_ISO_8601, + + // Indefinite blocks have no expiry time + if ( Block::parseExpiryInput( $params[0] ) !== Block::infinity() ) { + $vals2['expiry'] = wfTimestamp( TS_ISO_8601, strtotime( $params[0], wfTimestamp( TS_UNIX, $ts ) ) ); + } $vals[$type] = $vals2; $params = null; break;