r107844 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107843‎ | r107844 | r107845 >
Date:18:09, 2 January 2012
Author:johnduhart
Status:ok
Tags:
Comment:
Followup r100165, properly formatted timestamps
Modified paths:
  • /trunk/extensions/CheckUser/api/ApiQueryCheckUser.php (modified) (history)
  • /trunk/extensions/CheckUser/api/ApiQueryCheckUserLog.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CheckUser/api/ApiQueryCheckUser.php
@@ -52,7 +52,7 @@
5353
5454 $ips = array();
5555 foreach ( $res as $row ) {
56 - $timestamp = $row->cuc_timestamp;
 56+ $timestamp = wfTimestamp( TS_ISO_8601, $row->cuc_timestamp );
5757 $ip = strval( $row->cuc_ip );
5858 $xff = $row->cuc_xff;
5959
@@ -110,7 +110,7 @@
111111 $edits = array();
112112 foreach ( $res as $row ) {
113113 $edit = array(
114 - 'timestamp' => $row->cuc_timestamp,
 114+ 'timestamp' => wfTimestamp( TS_ISO_8601, $row->cuc_timestamp ),
115115 'ns' => $row->cuc_namespace,
116116 'title' => $row->cuc_title,
117117 'user' => $row->cuc_user_text,
@@ -160,12 +160,12 @@
161161 $agent = $row->cuc_agent;
162162
163163 if ( !isset( $users[$user] ) ) {
164 - $users[$user]['end'] = $row->cuc_timestamp;
 164+ $users[$user]['end'] = wfTimestamp( TS_ISO_8601, $row->cuc_timestamp );
165165 $users[$user]['editcount'] = 1;
166166 $users[$user]['ips'][] = $ip;
167167 $users[$user]['agents'][] = $agent;
168168 } else {
169 - $users[$user]['start'] = $row->cuc_timestamp;
 169+ $users[$user]['start'] = wfTimestamp( TS_ISO_8601, $row->cuc_timestamp );
170170 $users[$user]['editcount']++;
171171 if ( !in_array( $ip, $users[$user]['ips'] ) ) {
172172 $users[$user]['ips'][] = $ip;
Index: trunk/extensions/CheckUser/api/ApiQueryCheckUserLog.php
@@ -38,7 +38,7 @@
3939 $log = array();
4040 foreach ( $res as $row ) {
4141 $log[] = array(
42 - 'timestamp' => $row->cul_timestamp,
 42+ 'timestamp' => wfTimestamp( TS_ISO_8601, $row->cul_timestamp ),
4343 'checkuser' => $row->cul_user_text,
4444 'type' => $row->cul_type,
4545 'reason' => $row->cul_reason,

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100165Adds API Module by cryptocoryne...johnduhart21:37, 18 October 2011

Status & tagging log