X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FMergeHistory.php;h=0e9bb4673d9ded071fc3b066fcd396f30652d749;hp=48ff97bdf11c70997687dff0dd60c452002df335;hb=9a37fb8e4851d13bfb208eb886c9947a7f21571c;hpb=313dde5d06c42be1eb7da9127ec92bb5d360ddab diff --git a/includes/MergeHistory.php b/includes/MergeHistory.php index 48ff97bdf1..0e9bb4673d 100644 --- a/includes/MergeHistory.php +++ b/includes/MergeHistory.php @@ -1,10 +1,6 @@ * * This program is free software; you can redistribute it and/or modify @@ -24,6 +20,7 @@ * * @file */ +use MediaWiki\MediaWikiServices; use Wikimedia\Timestamp\TimestampException; use Wikimedia\Rdbms\IDatabase; @@ -56,7 +53,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 +332,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 );