r95333 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95332‎ | r95333 | r95334 >
Date:21:10, 23 August 2011
Author:johnduhart
Status:ok
Tags:
Comment:
(bug 29957) Special:CentralAuth should show time in user's local timezone
Modified paths:
  • /trunk/extensions/CentralAuth/specials/SpecialCentralAuth.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/specials/SpecialCentralAuth.php
@@ -282,7 +282,7 @@
283283 $age = $this->prettyTimespan( wfTimestamp( TS_UNIX ) - wfTimestamp( TS_UNIX, $reg ) );
284284 $attribs = array(
285285 'id' => $globalUser->getId(),
286 - 'registered' => $wgLang->timeanddate( $reg ) . " ($age)",
 286+ 'registered' => $wgLang->timeanddate( $reg, true ) . " ($age)",
287287 'home' => $this->determineHomeWiki(),
288288 'editcount' => $wgLang->formatNum( $this->evaluateTotalEditcount() ),
289289 'locked' => $globalUser->isLocked() ? wfMsg( 'centralauth-admin-yes' ) : wfMsg( 'centralauth-admin-no' ),
@@ -385,7 +385,7 @@
386386 // invisible, to make this column sortable
387387 Html::element( 'span', array( 'style' => 'display: none' ), htmlspecialchars( $row['attachedTimestamp'] ) ) .
388388 // visible date and time in users preference
389 - htmlspecialchars( $wgLang->timeanddate( $row['attachedTimestamp'] ) ) .
 389+ htmlspecialchars( $wgLang->timeanddate( $row['attachedTimestamp'], true ) ) .
390390 '</td>' .
391391 '<td style="text-align: center">' . $this->formatMergeMethod( $row['attachedMethod'] ) . '</td>' .
392392 '<td>' . $this->formatBlockStatus( $row ) . '</td>' .
@@ -409,9 +409,9 @@
410410 return wfMsgExt( 'centralauth-admin-blocked-indef', 'parseinline', array( $reason ) );
411411 } else {
412412 global $wgLang;
413 - $expiry = $wgLang->timeanddate( $row['block-expiry'] );
414 - $expiryd = $wgLang->date( $row['block-expiry'] );
415 - $expiryt = $wgLang->time( $row['block-expiry'] );
 413+ $expiry = $wgLang->timeanddate( $row['block-expiry'], true );
 414+ $expiryd = $wgLang->date( $row['block-expiry'], true );
 415+ $expiryt = $wgLang->time( $row['block-expiry'], true );
416416 $reason = $row['block-reason'];
417417
418418 $text = wfMsgExt( 'centralauth-admin-blocked', 'parseinline', array( $expiry, $reason, $expiryd, $expiryt ) );

Status & tagging log