MediaWiki REL1_37
|
Public Member Functions | |
__construct (ServiceOptions $options, ILoadBalancer $loadBalancer, UserFactory $userFactory, ReadOnlyMode $readOnlyMode, RevisionStore $revisionStore, TitleFormatter $titleFormatter, HookContainer $hookContainer, WikiPageFactory $wikiPageFactory, ActorMigration $actorMigration, ActorNormalization $actorNormalization, PageIdentity $page, Authority $performer, UserIdentity $byUser) | |
authorizeRollback () | |
Authorize the rollback. | |
markAsBot (?bool $bot) | |
Mark all reverted edits as bot. | |
rollback () | |
Backend implementation of rollbackIfAllowed(). | |
rollbackIfAllowed () | |
Rollback the most recent consecutive set of edits to a page from the same user; fails if there are no eligible edits to roll back to, e.g. | |
setChangeTags (?array $tags) | |
Change tags to apply to the rollback. | |
setSummary (?string $summary) | |
Set custom edit summary. | |
Private Member Functions | |
getSummary (RevisionRecord $current, RevisionRecord $target) | |
Generate and format summary for the rollback. | |
updateRecentChange (IDatabase $dbw, RevisionRecord $current, RevisionRecord $target) | |
Set patrolling and bot flag on the edits, which gets rolled back. | |
Private Attributes | |
ActorMigration | $actorMigration |
ActorNormalization | $actorNormalization |
bool | $bot = false |
UserIdentity | $byUser |
who made the edits we are rolling back | |
HookRunner | $hookRunner |
ILoadBalancer | $loadBalancer |
ServiceOptions | $options |
PageIdentity | $page |
Authority | $performer |
ReadOnlyMode | $readOnlyMode |
RevisionStore | $revisionStore |
string | $summary = '' |
string[] | $tags = [] |
TitleFormatter | $titleFormatter |
UserFactory | $userFactory |
WikiPageFactory | $wikiPageFactory |
Definition at line 55 of file RollbackPage.php.
MediaWiki\Page\RollbackPage::__construct | ( | ServiceOptions | $options, |
ILoadBalancer | $loadBalancer, | ||
UserFactory | $userFactory, | ||
ReadOnlyMode | $readOnlyMode, | ||
RevisionStore | $revisionStore, | ||
TitleFormatter | $titleFormatter, | ||
HookContainer | $hookContainer, | ||
WikiPageFactory | $wikiPageFactory, | ||
ActorMigration | $actorMigration, | ||
ActorNormalization | $actorNormalization, | ||
PageIdentity | $page, | ||
Authority | $performer, | ||
UserIdentity | $byUser | ||
) |
ServiceOptions | $options | |
ILoadBalancer | $loadBalancer | |
UserFactory | $userFactory | |
ReadOnlyMode | $readOnlyMode | |
RevisionStore | $revisionStore | |
TitleFormatter | $titleFormatter | |
HookContainer | $hookContainer | |
WikiPageFactory | $wikiPageFactory | |
ActorMigration | $actorMigration | |
ActorNormalization | $actorNormalization | |
PageIdentity | $page | |
Authority | $performer | |
UserIdentity | $byUser | who made the edits we are rolling back |
Definition at line 129 of file RollbackPage.php.
References MediaWiki\Page\RollbackPage\$actorMigration, MediaWiki\Page\RollbackPage\$actorNormalization, MediaWiki\Page\RollbackPage\$byUser, MediaWiki\Page\RollbackPage\$loadBalancer, MediaWiki\Page\RollbackPage\$options, MediaWiki\Page\RollbackPage\$page, MediaWiki\Page\RollbackPage\$performer, MediaWiki\Page\RollbackPage\$readOnlyMode, MediaWiki\Page\RollbackPage\$revisionStore, MediaWiki\Page\RollbackPage\$titleFormatter, MediaWiki\Page\RollbackPage\$userFactory, MediaWiki\Page\RollbackPage\$wikiPageFactory, and MediaWiki\Config\ServiceOptions\assertRequiredOptions().
MediaWiki\Page\RollbackPage::authorizeRollback | ( | ) |
Authorize the rollback.
Definition at line 205 of file RollbackPage.php.
References StatusValue\fatal().
|
private |
Generate and format summary for the rollback.
RevisionRecord | $current | |
RevisionRecord | $target |
Definition at line 482 of file RollbackPage.php.
MediaWiki\Page\RollbackPage::markAsBot | ( | ?bool | $bot | ) |
Mark all reverted edits as bot.
bool | null | $bot |
Definition at line 178 of file RollbackPage.php.
MediaWiki\Page\RollbackPage::rollback | ( | ) |
Backend implementation of rollbackIfAllowed().
Definition at line 253 of file RollbackPage.php.
References DB_PRIMARY, EDIT_FORCE_BOT, EDIT_INTERNAL, EDIT_MINOR, and EDIT_UPDATE.
MediaWiki\Page\RollbackPage::rollbackIfAllowed | ( | ) |
Rollback the most recent consecutive set of edits to a page from the same user; fails if there are no eligible edits to roll back to, e.g.
user is the sole contributor. This function performs permissions checks and executes ::rollback.
Definition at line 230 of file RollbackPage.php.
MediaWiki\Page\RollbackPage::setChangeTags | ( | ?array | $tags | ) |
Change tags to apply to the rollback.
string[] | null | $tags |
Definition at line 195 of file RollbackPage.php.
MediaWiki\Page\RollbackPage::setSummary | ( | ?string | $summary | ) |
Set custom edit summary.
string | null | $summary |
Definition at line 167 of file RollbackPage.php.
|
private |
Set patrolling and bot flag on the edits, which gets rolled back.
IDatabase | $dbw | |
RevisionRecord | $current | |
RevisionRecord | $target |
Definition at line 443 of file RollbackPage.php.
References Wikimedia\Rdbms\IDatabase\addQuotes(), MediaWiki\Revision\RevisionRecord\getPageId(), MediaWiki\Revision\RevisionRecord\getTimestamp(), MediaWiki\Revision\RevisionRecord\getUser(), Wikimedia\Rdbms\IDatabase\timestamp(), and Wikimedia\Rdbms\IDatabase\update().
|
private |
Definition at line 91 of file RollbackPage.php.
Referenced by MediaWiki\Page\RollbackPage\__construct().
|
private |
Definition at line 94 of file RollbackPage.php.
Referenced by MediaWiki\Page\RollbackPage\__construct().
|
private |
Definition at line 109 of file RollbackPage.php.
|
private |
who made the edits we are rolling back
Definition at line 103 of file RollbackPage.php.
Referenced by MediaWiki\Page\RollbackPage\__construct().
|
private |
Definition at line 85 of file RollbackPage.php.
|
private |
Definition at line 70 of file RollbackPage.php.
Referenced by MediaWiki\Page\RollbackPage\__construct().
|
private |
Definition at line 67 of file RollbackPage.php.
Referenced by MediaWiki\Page\RollbackPage\__construct().
|
private |
Definition at line 97 of file RollbackPage.php.
Referenced by MediaWiki\Page\RollbackPage\__construct().
|
private |
Definition at line 100 of file RollbackPage.php.
Referenced by MediaWiki\Page\RollbackPage\__construct().
|
private |
Definition at line 76 of file RollbackPage.php.
Referenced by MediaWiki\Page\RollbackPage\__construct().
|
private |
Definition at line 82 of file RollbackPage.php.
Referenced by MediaWiki\Page\RollbackPage\__construct().
|
private |
Definition at line 106 of file RollbackPage.php.
|
private |
Definition at line 112 of file RollbackPage.php.
|
private |
Definition at line 79 of file RollbackPage.php.
Referenced by MediaWiki\Page\RollbackPage\__construct().
|
private |
Definition at line 73 of file RollbackPage.php.
Referenced by MediaWiki\Page\RollbackPage\__construct().
|
private |
Definition at line 88 of file RollbackPage.php.
Referenced by MediaWiki\Page\RollbackPage\__construct().