r110106 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110105‎ | r110106 | r110107 >
Date:07:23, 27 January 2012
Author:ialex
Status:ok
Tags:
Comment:
Use Language::userTimeAndDate() and related to get the time with user preferences instead of Language::timeanddate() and related
Modified paths:
  • /trunk/phase3/includes/QueryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/QueryPage.php
@@ -438,7 +438,9 @@
439439 */
440440 function execute( $par ) {
441441 global $wgQueryCacheLimit;
442 - if ( !$this->userCanExecute( $this->getUser() ) ) {
 442+
 443+ $user = $this->getUser();
 444+ if ( !$this->userCanExecute( $user ) ) {
443445 $this->displayRestrictionError();
444446 return;
445447 }
@@ -475,9 +477,9 @@
476478 $maxResults = $lang->formatNum( $wgQueryCacheLimit );
477479
478480 if ( $ts ) {
479 - $updated = $lang->timeanddate( $ts, true, true );
480 - $updateddate = $lang->date( $ts, true, true );
481 - $updatedtime = $lang->time( $ts, true, true );
 481+ $updated = $lang->userTimeAndDate( $ts, $user );
 482+ $updateddate = $lang->userDate( $ts, $user );
 483+ $updatedtime = $lang->userTime( $ts, $user );
482484 $out->addMeta( 'Data-Cache-Time', $ts );
483485 $out->addInlineScript( "var dataCacheTime = '$ts';" );
484486 $out->addWikiMsg( 'perfcachedts', $updated, $updateddate, $updatedtime, $maxResults );

Status & tagging log