X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMergeHistory.php;h=b969e0394c04b92516d8c04c5e5ca19042618a15;hb=fd3773685b887dc2b4fa856907a9cf5229df74ac;hp=48ff97bdf11c70997687dff0dd60c452002df335;hpb=1b86e6bb67708d24fce32b3940c926c8314dfcbf;p=lhc%2Fweb%2Fwiklou.git 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 );