Fix for r79874: only set $mRevIdFetched from fetchContent(), it was overriden by...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 9 Jan 2011 17:41:42 +0000 (17:41 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 9 Jan 2011 17:41:42 +0000 (17:41 +0000)
includes/Article.php

index d3673a3..bb0c3fd 100644 (file)
@@ -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();
+               }
        }
 
        /**