MediaWiki
master
|
Adds the mw-reverted tag to reverted edits after a revert is made. More...
Public Member Functions | |
__construct (RevisionStore $revisionStore, LoggerInterface $logger, array $softwareTags, ILoadBalancer $loadBalancer, ServiceOptions $serviceOptions, int $revertId, EditResult $editResult) | |
doUpdate () | |
Marks reverted edits with mw-reverted tag. More... | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS = [ MainConfigNames::RevertedTagMaxDepth ] |
Protected Member Functions | |
getChangeTags (int $revisionId) | |
Protected function calling static ChangeTags class to allow for unit testing of this deferrable update. More... | |
markAsReverted (int $revisionId, array $extraParams) | |
Protected function calling static ChangeTags class to allow for unit testing of this deferrable update. More... | |
Adds the mw-reverted tag to reverted edits after a revert is made.
This class is used by RevertedTagUpdateJob to perform the actual update.
Definition at line 41 of file RevertedTagUpdate.php.
MediaWiki\Storage\RevertedTagUpdate::__construct | ( | RevisionStore | $revisionStore, |
LoggerInterface | $logger, | ||
array | $softwareTags, | ||
ILoadBalancer | $loadBalancer, | ||
ServiceOptions | $serviceOptions, | ||
int | $revertId, | ||
EditResult | $editResult | ||
) |
RevisionStore | $revisionStore | |
LoggerInterface | $logger | |
string[] | $softwareTags | Array of currently enabled software change tags. Can be obtained from ChangeTags::getSoftwareTags() |
ILoadBalancer | $loadBalancer | |
ServiceOptions | $serviceOptions | |
int | $revertId | ID of the revert |
EditResult | $editResult | EditResult object of this revert |
Definition at line 88 of file RevertedTagUpdate.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions().
MediaWiki\Storage\RevertedTagUpdate::doUpdate | ( | ) |
Marks reverted edits with mw-reverted
tag.
Implements DeferrableUpdate.
Definition at line 111 of file RevertedTagUpdate.php.
References MediaWiki\Revision\RevisionStore\INCLUDE_BOTH, MediaWiki\Storage\RevertedTagUpdate\markAsReverted(), and MediaWiki\MainConfigNames\RevertedTagMaxDepth.
|
protected |
Protected function calling static ChangeTags class to allow for unit testing of this deferrable update.
This class is not stable for extending, this is just to make the class testable.
ChangeTags should be passed by dependency injection when that becomes possible. See: T245964
int | $revisionId |
Definition at line 319 of file RevertedTagUpdate.php.
References DB_REPLICA, and ChangeTags\getTags().
|
protected |
Protected function calling static ChangeTags class to allow for unit testing of this deferrable update.
This class is not stable for extending, this is just to make the class testable.
ChangeTags should be passed by dependency injection when that becomes possible. See: T245964
int | $revisionId | ID of the revision to mark as reverted |
array | $extraParams | Params to put in the ct_params field of table 'change_tag' |
Definition at line 296 of file RevertedTagUpdate.php.
References ChangeTags\addTags(), FormatJson\encode(), and ChangeTags\TAG_REVERTED.
Referenced by MediaWiki\Storage\RevertedTagUpdate\doUpdate().
const MediaWiki\Storage\RevertedTagUpdate::CONSTRUCTOR_OPTIONS = [ MainConfigNames::RevertedTagMaxDepth ] |
Definition at line 46 of file RevertedTagUpdate.php.