|
MediaWiki master
|
Handles the backend logic of merging the histories of two pages. More...

Public Member Functions | |
| __construct (PageIdentity $source, PageIdentity $dest, ?string $timestamp, ?string $timestampStart, IConnectionProvider $dbProvider, IContentHandlerFactory $contentHandlerFactory, WatchedItemStoreInterface $watchedItemStore, SpamChecker $spamChecker, HookContainer $hookContainer, PageUpdaterFactory $pageUpdaterFactory, TitleFormatter $titleFormatter, TitleFactory $titleFactory, DeletePageFactory $deletePageFactory) | |
| authorizeMerge (Authority $performer, ?string $reason=null) | |
| Authorize the merge by $performer. | |
| getMergedRevisionCount () | |
| Get the number of revisions that were moved Used in the SpecialMergeHistory success message. | |
| getRevisionCount () | |
| Get the number of revisions that will be moved. | |
| isValidMerge () | |
| Does various checks that the merge is valid. | |
| merge (Authority $performer, $reason='') | |
| Actually attempt the history move. | |
| probablyCanMerge (Authority $performer, ?string $reason=null) | |
| Check whether $performer can execute the merge. | |
Public Attributes | |
| const | REVISION_LIMIT = 5000 |
| Maximum number of revisions that can be merged at once. | |
Protected Attributes | |
| IDatabase | $dbw |
| Database that we are using. | |
| ProperPageIdentity | $dest |
| Page to which history will be merged. | |
| int | $revisionsMerged |
| Number of revisions merged (for Special:MergeHistory success message) | |
| ProperPageIdentity | $source |
| Page from which history will be merged. | |
| MWTimestamp false null | $timestampLimit = false |
| Timestamp upto which history from the source will be merged. | |
| MWTimestamp false null | $timestampStartLimit = false |
| Timestamp upto which history from the source will be merged. | |
| array false null | $timeWhere = false |
| SQL WHERE condition that selects source revisions to insert into destination. | |
Handles the backend logic of merging the histories of two pages.
Definition at line 44 of file MergeHistory.php.
| MediaWiki\Page\MergeHistory::__construct | ( | PageIdentity | $source, |
| PageIdentity | $dest, | ||
| ?string | $timestamp, | ||
| ?string | $timestampStart, | ||
| IConnectionProvider | $dbProvider, | ||
| IContentHandlerFactory | $contentHandlerFactory, | ||
| WatchedItemStoreInterface | $watchedItemStore, | ||
| SpamChecker | $spamChecker, | ||
| HookContainer | $hookContainer, | ||
| PageUpdaterFactory | $pageUpdaterFactory, | ||
| TitleFormatter | $titleFormatter, | ||
| TitleFactory | $titleFactory, | ||
| DeletePageFactory | $deletePageFactory ) |
| PageIdentity | $source | Page from which history will be merged |
| PageIdentity | $dest | Page to which history will be merged |
| ?string | $timestamp | Timestamp up to which history from the source will be merged |
| ?string | $timestampStart | Timestamp after which history from the source will be merged |
| IConnectionProvider | $dbProvider | |
| IContentHandlerFactory | $contentHandlerFactory | |
| WatchedItemStoreInterface | $watchedItemStore | |
| SpamChecker | $spamChecker | |
| HookContainer | $hookContainer | |
| PageUpdaterFactory | $pageUpdaterFactory | |
| TitleFormatter | $titleFormatter | |
| TitleFactory | $titleFactory | |
| DeletePageFactory | $deletePageFactory |
Definition at line 117 of file MergeHistory.php.
References MediaWiki\Page\MergeHistory\$dest, MediaWiki\Page\MergeHistory\$source, and Wikimedia\Rdbms\IConnectionProvider\getPrimaryDatabase().
| MediaWiki\Page\MergeHistory::authorizeMerge | ( | Authority | $performer, |
| ?string | $reason = null ) |
Authorize the merge by $performer.
self::probablyCanMerge instead.| Authority | $performer | |
| string | null | $reason |
Definition at line 256 of file MergeHistory.php.
References MediaWiki\Permissions\Authority\authorizeWrite().
| MediaWiki\Page\MergeHistory::getMergedRevisionCount | ( | ) |
Get the number of revisions that were moved Used in the SpecialMergeHistory success message.
Definition at line 190 of file MergeHistory.php.
| MediaWiki\Page\MergeHistory::getRevisionCount | ( | ) |
Get the number of revisions that will be moved.
Definition at line 174 of file MergeHistory.php.
| MediaWiki\Page\MergeHistory::isValidMerge | ( | ) |
Does various checks that the merge is valid.
Only things based on the two pages should be checked here.
Definition at line 273 of file MergeHistory.php.
| MediaWiki\Page\MergeHistory::merge | ( | Authority | $performer, |
| $reason = '' ) |
Actually attempt the history move.
| Authority | $performer | |
| string | $reason |
Definition at line 393 of file MergeHistory.php.
References MediaWiki\Permissions\Authority\getUser(), and wfMessage().
| MediaWiki\Page\MergeHistory::probablyCanMerge | ( | Authority | $performer, |
| ?string | $reason = null ) |
Check whether $performer can execute the merge.
self::authorizeMerge instead.| Authority | $performer | |
| string | null | $reason |
Definition at line 235 of file MergeHistory.php.
References MediaWiki\Permissions\Authority\probablyCan().
|
protected |
Database that we are using.
Definition at line 56 of file MergeHistory.php.
|
protected |
Page to which history will be merged.
Definition at line 53 of file MergeHistory.php.
Referenced by MediaWiki\Page\MergeHistory\__construct().
|
protected |
Number of revisions merged (for Special:MergeHistory success message)
Definition at line 91 of file MergeHistory.php.
|
protected |
Page from which history will be merged.
Definition at line 50 of file MergeHistory.php.
Referenced by MediaWiki\Page\MergeHistory\__construct().
|
protected |
Timestamp upto which history from the source will be merged.
Use getTimestampLimit to lazily initialize.
Definition at line 73 of file MergeHistory.php.
|
protected |
Timestamp upto which history from the source will be merged.
Use getTimestampLimit to lazily initialize.
Definition at line 79 of file MergeHistory.php.
|
protected |
SQL WHERE condition that selects source revisions to insert into destination.
Use ::getTimeWhere to lazy-initialize.
Definition at line 67 of file MergeHistory.php.
| const MediaWiki\Page\MergeHistory::REVISION_LIMIT = 5000 |
Maximum number of revisions that can be merged at once.
Definition at line 47 of file MergeHistory.php.