X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FMergeHistory.php;h=b969e0394c04b92516d8c04c5e5ca19042618a15;hp=48ff97bdf11c70997687dff0dd60c452002df335;hb=1c779be7fbd435a4c022dc7d7bb9b29a11169a08;hpb=43a548a5c3436b5d07091b504bbf5eb80d1ed215 diff --git a/includes/MergeHistory.php b/includes/MergeHistory.php index 48ff97bdf1..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; @@ -56,7 +57,7 @@ class MergeHistory { /** @var MWTimestamp|bool Timestamp upto which history from the source will be merged */ protected $timestampLimit; - /** @var integer Number of revisions merged (for Special:MergeHistory success message) */ + /** @var int Number of revisions merged (for Special:MergeHistory success message) */ protected $revisionsMerged; /** @@ -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 );