From: Alexandre Emsenhuber Date: Sun, 9 Jan 2011 17:41:42 +0000 (+0000) Subject: Fix for r79874: only set $mRevIdFetched from fetchContent(), it was overriden by... X-Git-Tag: 1.31.0-rc.0~32663 X-Git-Url: http://git.cyclocoop.org/clavettes/images/siteon3.jpg?a=commitdiff_plain;h=c52cf288d40d1a925f9ec5e7346357f446a14018;p=lhc%2Fweb%2Fwiklou.git 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 --- 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(); + } } /**