r37419 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37418‎ | r37419 | r37420 >
Date:17:41, 9 July 2008
Author:brion
Status:old
Tags:
Comment:
Tweak to r37385: put the timestamp format normalization on the input read (Revision::getTimestampFromId()) instead of the middle tier (Skin::lastModified())
Modified paths:
  • /trunk/phase3/includes/Revision.php (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Revision.php
@@ -917,7 +917,7 @@
918918 $dbw = wfGetDB( DB_MASTER );
919919 $timestamp = $dbw->selectField( 'revision', 'rev_timestamp', $conds, __METHOD__ );
920920 }
921 - return $timestamp;
 921+ return wfTimestamp( TS_MW, $timestamp );
922922 }
923923
924924 /**
Index: trunk/phase3/includes/Skin.php
@@ -1205,8 +1205,7 @@
12061206 function lastModified() {
12071207 global $wgLang, $wgArticle;
12081208 if( $this->mRevisionId ) {
1209 - $timestamp = wfTimestamp( TS_MW,
1210 - Revision::getTimestampFromId( $this->mRevisionId, $wgArticle->getId() ) );
 1209+ $timestamp = Revision::getTimestampFromId( $this->mRevisionId, $wgArticle->getId() );
12111210 } else {
12121211 $timestamp = $wgArticle->getTimestamp();
12131212 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r37385Fix regression from r37158, Article::lastModified() now works on non-mySQL sc...demon12:27, 9 July 2008

Status & tagging log