r64438 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64437‎ | r64438 | r64439 >
Date:14:44, 31 March 2010
Author:gurch
Status:ok
Tags:
Comment:
(bug 22868) don't list infinite block expiry date as "now" in API logevents
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryLogEvents.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryLogEvents.php
@@ -208,8 +208,12 @@
209209 case 'block':
210210 $vals2 = array();
211211 list( $vals2['duration'], $vals2['flags'] ) = $params;
212 - $vals2['expiry'] = wfTimestamp( TS_ISO_8601,
 212+
 213+ // Indefinite blocks have no expiry time
 214+ if ( Block::parseExpiryInput( $params[0] ) !== Block::infinity() ) {
 215+ $vals2['expiry'] = wfTimestamp( TS_ISO_8601,
213216 strtotime( $params[0], wfTimestamp( TS_UNIX, $ts ) ) );
 217+ }
214218 $vals[$type] = $vals2;
215219 $params = null;
216220 break;
Index: trunk/phase3/RELEASE-NOTES
@@ -75,6 +75,7 @@
7676 * (bug 22764) uselang parameter for action=parse
7777 * (bug 22944) API: watchlist options are inconsistent
7878 * (bug 22339) "Go" result should be available through the API
 79+* (bug 22868) don't list infinite block expiry date as "now" in API logevents
7980
8081 === Languages updated in 1.17 ===
8182

Status & tagging log