r41668 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41667‎ | r41668 | r41669 >
Date:22:08, 4 October 2008
Author:aaron
Status:old
Tags:
Comment:
* Fix date outputs for PG (bug 15833)
* Offset time here too
Modified paths:
  • /trunk/extensions/CheckUser/CheckUser_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CheckUser/CheckUser_body.php
@@ -311,10 +311,10 @@
312312 $s .= ' (<a href="' . $blockip->escapeLocalURL( 'ip='.urlencode($ip) ).'">' .
313313 wfMsgHtml('blocklink') . '</a>)';
314314 if( $ips_first[$ip] == $ips_last[$ip] ) {
315 - $s .= ' (' . $wgLang->timeanddate( $ips_first[$ip], true ) . ') ';
 315+ $s .= ' (' . $wgLang->timeanddate( wfTimestamp(TS_MW,$ips_first[$ip]), true ) . ') ';
316316 } else {
317 - $s .= ' (' . $wgLang->timeanddate( $ips_first[$ip], true ) .
318 - ' -- ' . $wgLang->timeanddate( $ips_last[$ip], true ) . ') ';
 317+ $s .= ' (' . $wgLang->timeanddate( wfTimestamp(TS_MW,$ips_first[$ip]), true ) .
 318+ ' -- ' . $wgLang->timeanddate( wfTimestamp(TS_MW,$ips_last[$ip]), true ) . ') ';
319319 }
320320 $s .= ' <strong>[' . $edits . ']</strong>';
321321
@@ -444,10 +444,10 @@
445445 $wgTitle->escapeLocalURL( 'user='.urlencode($ip).'&reason='.urlencode($reason).'&checktype=subipusers' ) .
446446 '">'.$ip.'</a>';
447447 if( $row->first == $row->last ) {
448 - $s .= ' (' . $wgLang->timeanddate( $row->first, true ) . ') ';
 448+ $s .= ' (' . $wgLang->timeanddate( wfTimestamp(TS_MW,$row->first), true ) . ') ';
449449 } else {
450 - $s .= ' (' . $wgLang->timeanddate( $row->first, true ) .
451 - ' -- ' . $wgLang->timeanddate( $row->last, true ) . ') ';
 450+ $s .= ' (' . $wgLang->timeanddate( wfTimestamp(TS_MW,$row->first), true ) .
 451+ ' -- ' . $wgLang->timeanddate( wfTimestamp(TS_MW,$row->last), true ) . ') ';
452452 }
453453 $s .= " [<strong>" . $row->count . "</strong>]</li>\n";
454454 ++$counter;
@@ -705,10 +705,10 @@
706706 $wgTitle->escapeLocalURL( 'user='.urlencode($ip).'&reason='.urlencode($reason).'&checktype=subipusers' ) .
707707 '">'.$ip.'</a>';
708708 if( $row->first == $row->last ) {
709 - $s .= ' (' . $wgLang->timeanddate( $row->first, true ) . ') ';
 709+ $s .= ' (' . $wgLang->timeanddate( wfTimestamp(TS_MW,$row->first), true ) . ') ';
710710 } else {
711 - $s .= ' (' . $wgLang->timeanddate( $row->first, true ) .
712 - ' -- ' . $wgLang->timeanddate( $row->last, true ) . ') ';
 711+ $s .= ' (' . $wgLang->timeanddate( wfTimestamp(TS_MW,$row->first), true ) .
 712+ ' -- ' . $wgLang->timeanddate( wfTimestamp(TS_MW,$row->last), true ) . ') ';
713713 }
714714 $s .= " [<strong>" . $row->count . "</strong>]</li>\n";
715715 ++$counter;
@@ -775,10 +775,10 @@
776776 $s .= ' (<a href="' . $wgTitle->escapeLocalURL( 'user='.urlencode($name) .
777777 '&reason='.urlencode($reason) ) . '">' . wfMsgHtml('checkuser-check') . '</a>)';
778778 if( $users_first[$name] == $users_last[$name] ) {
779 - $s .= ' (' . $wgLang->timeanddate( $users_first[$name], true ) . ') ';
 779+ $s .= ' (' . $wgLang->timeanddate( wfTimestamp(TS_MW,$users_first[$name]), true ) . ') ';
780780 } else {
781 - $s .= ' (' . $wgLang->timeanddate( $users_first[$name], true ) .
782 - ' -- ' . $wgLang->timeanddate( $users_last[$name], true ) . ') ';
 781+ $s .= ' (' . $wgLang->timeanddate( wfTimestamp(TS_MW,$users_first[$name]), true ) .
 782+ ' -- ' . $wgLang->timeanddate( wfTimestamp(TS_MW,$users_last[$name]), true ) . ') ';
783783 }
784784 $s .= ' [<strong>' . $count . '</strong>]<br />';
785785 $flags = array();
@@ -1252,7 +1252,8 @@
12531253 }
12541254
12551255 return '<li>' .
1256 - $wgLang->timeanddate( $row->cul_timestamp ) . wfMsg( 'comma-separator' ) .
 1256+ $wgLang->timeanddate( wfTimestamp(TS_MW,$row->cul_timestamp), true ) .
 1257+ wfMsg( 'comma-separator' ) .
12571258 wfMsg(
12581259 'checkuser-log-' . $row->cul_type,
12591260 $user,

Status & tagging log