From: daniel Date: Tue, 10 Jul 2018 17:54:11 +0000 (+0200) Subject: Use master when fetching revision to base a null-revison on. X-Git-Tag: 1.34.0-rc.0~4824^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=8be7d84449f50dce691f02703b120675a13ea224;p=lhc%2Fweb%2Fwiklou.git Use master when fetching revision to base a null-revison on. Bug: T198869 Change-Id: I7396246581deabc2cb7206b3e5d2a6f97f6d7418 --- diff --git a/includes/Storage/RevisionStore.php b/includes/Storage/RevisionStore.php index 12bee1e01d..76cf3f94de 100644 --- a/includes/Storage/RevisionStore.php +++ b/includes/Storage/RevisionStore.php @@ -896,8 +896,13 @@ class RevisionStore return null; } - // Fetch the actual revision row, without locking all extra tables. - $oldRevision = $this->loadRevisionFromId( $dbw, $pageLatest ); + // Fetch the actual revision row from master, without locking all extra tables. + $oldRevision = $this->loadRevisionFromConds( + $dbw, + [ 'rev_id' => intval( $pageLatest ) ], + self::READ_LATEST, + $title + ); // Construct the new revision $timestamp = wfTimestampNow(); // TODO: use a callback, so we can override it for testing.