r79906 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79905‎ | r79906 | r79907 >
Date:17:41, 9 January 2011
Author:ialex
Status:ok
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -719,13 +719,11 @@
720720 $this->mTimestamp = $revision->getTimestamp();
721721 $this->mComment = $revision->getComment();
722722 $this->mMinorEdit = $revision->isMinor();
723 - $this->mRevIdFetched = $revision->getId();
724723 }
725724
726725 /**
727726 * @return string GMT timestamp of last article revision
728 - **/
729 -
 727+ */
730728 public function getTimestamp() {
731729 // Check if the field has been filled by ParserCache::get()
732730 if ( !$this->mTimestamp ) {
@@ -775,8 +773,11 @@
776774 * @return int revision ID of last article revision
777775 */
778776 public function getRevIdFetched() {
779 - $this->loadLastEdit();
780 - return $this->mRevIdFetched;
 777+ if ( $this->mRevIdFetched ) {
 778+ return $this->mRevIdFetched;
 779+ } else {
 780+ return $this->getLatest();
 781+ }
781782 }
782783
783784 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79874Only set $mUser, $mUserText, $mComment and $mTimestamp fields in fetchContent...ialex20:07, 8 January 2011

Status & tagging log