dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reduce some nesting in CryptRand.php
[lhc/web/wiklou.git]
/
includes
/
MergeHistory.php
diff --git
a/includes/MergeHistory.php
b/includes/MergeHistory.php
index
48ff97b
..
0e9bb46
100644
(file)
--- a/
includes/MergeHistory.php
+++ b/
includes/MergeHistory.php
@@
-1,10
+1,6
@@
<?php
/**
<?php
/**
- *
- *
- * Created on Dec 29, 2015
- *
* Copyright © 2015 Geoffrey Mon <geofbot@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* Copyright © 2015 Geoffrey Mon <geofbot@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
@@
-24,6
+20,7
@@
*
* @file
*/
*
* @file
*/
+use MediaWiki\MediaWikiServices;
use Wikimedia\Timestamp\TimestampException;
use Wikimedia\Rdbms\IDatabase;
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 MWTimestamp|bool Timestamp upto which history from the source will be merged */
protected $timestampLimit;
- /** @var int
eger
Number of revisions merged (for Special:MergeHistory success message) */
+ /** @var int Number of revisions merged (for Special:MergeHistory success message) */
protected $revisionsMerged;
/**
protected $revisionsMerged;
/**
@@
-335,6
+332,10
@@
class MergeHistory {
}
$this->dest->invalidateCache(); // update histories
}
$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 );
// Update our logs
$logEntry = new ManualLogEntry( 'merge', 'merge' );
$logEntry->setPerformer( $user );