From c52cf288d40d1a925f9ec5e7346357f446a14018 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 9 Jan 2011 17:41:42 +0000 Subject: [PATCH] Fix for r79874: only set $mRevIdFetched from fetchContent(), it was overriden by the loadLastEdit() call in getRevIdFetched() for old versions which caused it to be always the latest rev id --- includes/Article.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index d3673a3f96..bb0c3fdd4f 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -719,13 +719,11 @@ class Article { $this->mTimestamp = $revision->getTimestamp(); $this->mComment = $revision->getComment(); $this->mMinorEdit = $revision->isMinor(); - $this->mRevIdFetched = $revision->getId(); } /** * @return string GMT timestamp of last article revision - **/ - + */ public function getTimestamp() { // Check if the field has been filled by ParserCache::get() if ( !$this->mTimestamp ) { @@ -775,8 +773,11 @@ class Article { * @return int revision ID of last article revision */ public function getRevIdFetched() { - $this->loadLastEdit(); - return $this->mRevIdFetched; + if ( $this->mRevIdFetched ) { + return $this->mRevIdFetched; + } else { + return $this->getLatest(); + } } /** -- 2.20.1