MediaWiki fundraising/REL1_35
|
Handles the backend logic of merging the histories of two pages. More...
Public Member Functions | |
__construct (Title $source, Title $dest, $timestamp=false, ILoadBalancer $loadBalancer=null, PermissionManager $permManager=null, IContentHandlerFactory $contentHandlerFactory=null, RevisionStore $revisionStore=null, WatchedItemStoreInterface $watchedItemStore=null, SpamChecker $spamChecker=null) | |
Since 1.35 dependencies are injected and not providing them is hard deprecated; use the MergeHistoryFactory service. | |
checkPermissions (User $user, $reason) | |
Check if the merge is possible. | |
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 sanity checks that the merge is valid. | |
merge (User $user, $reason='') | |
Actually attempt the history move. | |
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. | |
Title | $dest |
Page to which history will be merged. | |
MWTimestamp | $maxTimestamp |
Maximum timestamp that we can use (oldest timestamp of dest) | |
int | $revisionsMerged |
Number of revisions merged (for Special:MergeHistory success message) | |
Title | $source |
Page from which history will be merged. | |
MWTimestamp bool | $timestampLimit |
Timestamp upto which history from the source will be merged. | |
string | $timeWhere |
SQL WHERE condition that selects source revisions to insert into destination. | |
Private Attributes | |
IContentHandlerFactory | $contentHandlerFactory |
PermissionManager | $permManager |
RevisionStore | $revisionStore |
SpamChecker | $spamChecker |
WatchedItemStoreInterface | $watchedItemStore |
Handles the backend logic of merging the histories of two pages.
Definition at line 41 of file MergeHistory.php.
MergeHistory::__construct | ( | Title | $source, |
Title | $dest, | ||
$timestamp = false, | |||
ILoadBalancer | $loadBalancer = null, | ||
PermissionManager | $permManager = null, | ||
IContentHandlerFactory | $contentHandlerFactory = null, | ||
RevisionStore | $revisionStore = null, | ||
WatchedItemStoreInterface | $watchedItemStore = null, | ||
SpamChecker | $spamChecker = null ) |
Since 1.35 dependencies are injected and not providing them is hard deprecated; use the MergeHistoryFactory service.
Title | $source | Page from which history will be merged |
Title | $dest | Page to which history will be merged |
string | bool | $timestamp | Timestamp up to which history from the source will be merged |
ILoadBalancer | null | $loadBalancer | |
PermissionManager | null | $permManager | |
IContentHandlerFactory | null | $contentHandlerFactory | |
RevisionStore | null | $revisionStore | |
WatchedItemStoreInterface | null | $watchedItemStore | |
SpamChecker | null | $spamChecker |
Definition at line 96 of file MergeHistory.php.
References $source, DB_MASTER, and wfDeprecatedMsg().
MergeHistory::checkPermissions | ( | User | $user, |
$reason ) |
Check if the merge is possible.
User | $user | |
string | $reason |
Definition at line 219 of file MergeHistory.php.
References wfMergeErrorArrays().
Referenced by merge().
MergeHistory::getMergedRevisionCount | ( | ) |
Get the number of revisions that were moved Used in the SpecialMergeHistory success message.
Definition at line 209 of file MergeHistory.php.
MergeHistory::getRevisionCount | ( | ) |
Get the number of revisions that will be moved.
Definition at line 194 of file MergeHistory.php.
Referenced by isValidMerge().
MergeHistory::isValidMerge | ( | ) |
Does various sanity checks that the merge is valid.
Only things based on the two pages should be checked here.
Definition at line 257 of file MergeHistory.php.
References getRevisionCount(), and Message\numParam().
Referenced by merge().
MergeHistory::merge | ( | User | $user, |
$reason = '' ) |
Actually attempt the history move.
User | $user | |
string | $reason |
Definition at line 305 of file MergeHistory.php.
References checkPermissions(), isValidMerge(), wfMessage(), and wfTimestampNow().
|
private |
Definition at line 71 of file MergeHistory.php.
|
protected |
Database that we are using.
Definition at line 53 of file MergeHistory.php.
|
protected |
Page to which history will be merged.
Definition at line 50 of file MergeHistory.php.
|
protected |
Maximum timestamp that we can use (oldest timestamp of dest)
Definition at line 56 of file MergeHistory.php.
|
private |
Definition at line 68 of file MergeHistory.php.
|
protected |
Number of revisions merged (for Special:MergeHistory success message)
Definition at line 65 of file MergeHistory.php.
|
private |
Definition at line 74 of file MergeHistory.php.
|
protected |
Page from which history will be merged.
Definition at line 47 of file MergeHistory.php.
|
private |
Definition at line 80 of file MergeHistory.php.
|
protected |
Timestamp upto which history from the source will be merged.
Definition at line 62 of file MergeHistory.php.
|
protected |
SQL WHERE condition that selects source revisions to insert into destination.
Definition at line 59 of file MergeHistory.php.
|
private |
Definition at line 77 of file MergeHistory.php.
const MergeHistory::REVISION_LIMIT = 5000 |
Maximum number of revisions that can be merged at once.
Definition at line 44 of file MergeHistory.php.