From 1c779be7fbd435a4c022dc7d7bb9b29a11169a08 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Mon, 11 Apr 2016 12:41:39 +0200 Subject: [PATCH] MergeHistory: Duplicate watchers on history merge Bug: T132130 Change-Id: Ibb2be4f6f975f8f3c542689530fc120f8a464914 --- includes/MergeHistory.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/MergeHistory.php b/includes/MergeHistory.php index 9d63869641..b969e0394c 100644 --- a/includes/MergeHistory.php +++ b/includes/MergeHistory.php @@ -24,6 +24,7 @@ * * @file */ +use MediaWiki\MediaWikiServices; use Wikimedia\Timestamp\TimestampException; use Wikimedia\Rdbms\IDatabase; @@ -335,6 +336,10 @@ class MergeHistory { } $this->dest->invalidateCache(); // update histories + // Duplicate watchers of the old article to the new article on history merge + $store = MediaWikiServices::getInstance()->getWatchedItemStore(); + $store->duplicateAllAssociatedEntries( $this->source, $this->dest ); + // Update our logs $logEntry = new ManualLogEntry( 'merge', 'merge' ); $logEntry->setPerformer( $user ); -- 2.20.1