r106476 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106475‎ | r106476 | r106477 >
Date:20:55, 16 December 2011
Author:ialex
Status:ok
Tags:
Comment:
Per Aaron, fix for r105764: only set the timestamp if it's set in the cached ParserOutput object
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -499,8 +499,12 @@
500500 # the correct version information.
501501 $wgOut->setRevisionId( $this->mPage->getLatest() );
502502 # Preload timestamp to avoid a DB hit
503 - $wgOut->setRevisionTimestamp( $this->mParserOutput->getTimestamp() );
504 - $this->mPage->setTimestamp( $this->mParserOutput->getTimestamp() );
 503+ $cachedTimestamp = $this->mParserOutput->getTimestamp();
 504+ var_dump( $cachedTimestamp );
 505+ if ( $cachedTimestamp !== null ) {
 506+ $wgOut->setRevisionTimestamp( $cachedTimestamp );
 507+ $this->mPage->setTimestamp( $cachedTimestamp );
 508+ }
505509 $outputDone = true;
506510 }
507511 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r106477Fix for r106476: forgot to remove debugging codeialex20:57, 16 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r105764* Added revision's timestamp to OutputPage along with revision ID; avoid a DB...ialex16:30, 10 December 2011

Status & tagging log