From: Alexandre Emsenhuber Date: Fri, 16 Dec 2011 20:55:54 +0000 (+0000) Subject: Per Aaron, fix for r105764: only set the timestamp if it's set in the cached ParserOu... X-Git-Tag: 1.31.0-rc.0~25930 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=9e892c7fd845455576b298f10ddec8b479cb742c;p=lhc%2Fweb%2Fwiklou.git Per Aaron, fix for r105764: only set the timestamp if it's set in the cached ParserOutput object --- diff --git a/includes/Article.php b/includes/Article.php index f2fb262c5f..7ed28e6b02 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -499,8 +499,12 @@ class Article extends Page { # the correct version information. $wgOut->setRevisionId( $this->mPage->getLatest() ); # Preload timestamp to avoid a DB hit - $wgOut->setRevisionTimestamp( $this->mParserOutput->getTimestamp() ); - $this->mPage->setTimestamp( $this->mParserOutput->getTimestamp() ); + $cachedTimestamp = $this->mParserOutput->getTimestamp(); + var_dump( $cachedTimestamp ); + if ( $cachedTimestamp !== null ) { + $wgOut->setRevisionTimestamp( $cachedTimestamp ); + $this->mPage->setTimestamp( $cachedTimestamp ); + } $outputDone = true; } }