From: Fomafix Date: Mon, 11 Apr 2016 10:41:39 +0000 (+0200) Subject: MergeHistory: Duplicate watchers on history merge X-Git-Tag: 1.31.0-rc.0~1180 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=1c779be7fbd435a4c022dc7d7bb9b29a11169a08;p=lhc%2Fweb%2Fwiklou.git MergeHistory: Duplicate watchers on history merge Bug: T132130 Change-Id: Ibb2be4f6f975f8f3c542689530fc120f8a464914 --- 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 );