From 8be7d84449f50dce691f02703b120675a13ea224 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 10 Jul 2018 19:54:11 +0200 Subject: [PATCH] Use master when fetching revision to base a null-revison on. Bug: T198869 Change-Id: I7396246581deabc2cb7206b3e5d2a6f97f6d7418 --- includes/Storage/RevisionStore.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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. -- 2.20.1