MediaWiki
master
|
Controller-like object for creating and updating pages by creating new revisions. More...
Public Member Functions | |
__construct (UserIdentity $author, WikiPage $wikiPage, DerivedPageDataUpdater $derivedDataUpdater, ILoadBalancer $loadBalancer, RevisionStore $revisionStore, SlotRoleRegistry $slotRoleRegistry, IContentHandlerFactory $contentHandlerFactory, HookContainer $hookContainer, UserEditTracker $userEditTracker, UserGroupManager $userGroupManager, TitleFormatter $titleFormatter, ServiceOptions $serviceOptions, array $softwareTags) | |
addSoftwareTag (string $tag) | |
Sets software tag to this update. More... | |
addTag (string $tag) | |
Sets a tag to apply to this update. More... | |
addTags (array $tags) | |
Sets tags to apply to this update. More... | |
getEditResult () | |
Returns the EditResult associated with this PageUpdater. More... | |
getExplicitTags () | |
Returns the list of tags set using the addTag() method. More... | |
getNewRevision () | |
The new revision created by saveRevision(), or null if saveRevision() has not yet been called, failed, or did not create a new revision because the content did not change. More... | |
getPage () | |
Get the page we're currently updating. More... | |
getStatus () | |
The Status object indicating whether saveRevision() was successful, or null if saveRevision() was not yet called on this instance. More... | |
grabParentRevision () | |
Returns the revision that was the page's current revision when grabParentRevision() was first called. More... | |
hasEditConflict ( $expectedParentRevision) | |
Checks whether this update conflicts with another update performed between the client loading data to prepare an edit, and the client committing the edit. More... | |
inheritSlot (SlotRecord $originalSlot) | |
Explicitly inherit a slot from some earlier revision. More... | |
isChange () | |
Whether the prepared edit is a change compared to the previous revision. More... | |
isNew () | |
Whether saveRevision() was called and created a new page. More... | |
isUnchanged () | |
Whether saveRevision() did create a revision because the content didn't change: (null-edit). More... | |
markAsRevert (int $revertMethod, int $newestRevertedRevId, int $revertAfterRevId=null) | |
Marks this edit as a revert and applies relevant information. More... | |
prepareUpdate (int $flags=0) | |
Prepare the update. More... | |
preventChange () | |
Disable new revision creation, throwing an exception if it is attempted. More... | |
removeSlot ( $role) | |
Removes the slot with the given role. More... | |
saveRevision (CommentStoreComment $summary, int $flags=0) | |
Change an existing article or create a new article. More... | |
setContent ( $role, Content $content) | |
Set the new content for the given slot role. More... | |
setFlags (int $flags) | |
Sets any flags to use when performing the update. More... | |
setForceEmptyRevision (bool $forceEmptyRevision) | |
Set whether null-edits should create a revision. More... | |
setOriginalRevisionId ( $originalRevId) | |
Sets the ID of an earlier revision that is being repeated or restored by this update. More... | |
setRcPatrolStatus ( $status) | |
Sets the "patrolled" status of the edit. More... | |
setSlot (SlotRecord $slot) | |
Set the new slot for the given slot role. More... | |
setUseAutomaticEditSummaries ( $useAutomaticEditSummaries) | |
Can be used to enable or disable automatic summaries that are applied to certain kinds of changes, like completely blanking a page. More... | |
setUsePageCreationLog ( $use) | |
Whether to create a log entry for new page creations. More... | |
updateAuthor (UserIdentity $author) | |
After creation of the user during the save process, update the stored UserIdentity. More... | |
updateRevision (int $revId=0) | |
Updates derived slots of an existing article. More... | |
wasCommitted () | |
Whether saveRevision() has been called on this instance. More... | |
wasRevisionCreated () | |
Whether saveRevision() did create a revision. More... | |
wasSuccessful () | |
Whether saveRevision() completed successfully. More... | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS |
Options that have to be present in the ServiceOptions object passed to the constructor. More... | |
Private Member Functions | |
buildEditResult (RevisionRecord $revision, bool $isNew) | |
Builds the EditResult for this update. More... | |
checkAllRequiredRoles (array $roles, Status $status) | |
checkAllRolesAllowed (array $roles, Status $status) | |
checkAllRolesDerived (array $roles, Status $status) | |
checkNoRolesRequired (array $roles, Status $status) | |
computeEffectiveTags () | |
doCreate (CommentStoreComment $summary) | |
doModify (CommentStoreComment $summary) | |
doUpdate (RevisionRecord $revision) | |
Update derived slots in an existing revision. More... | |
ensureRoleAllowed ( $role) | |
ensureRoleNotRequired ( $role) | |
getAllowedSlotRoles () | |
getAtomicSectionUpdate (IDatabase $dbw, WikiPage $wikiPage, RevisionRecord $newRevisionRecord, CommentStoreComment $summary, array $hints=[]) | |
getContentHandler ( $role) | |
getDBConnectionRef ( $mode) | |
getParentContent ( $role) | |
Returns the content of the given slot of the parent revision, with no audience checks applied. More... | |
getRequiredSlotRoles () | |
getTitle () | |
getWikiId () | |
getWikiPage () | |
makeAutoSummary () | |
makeNewRevision (CommentStoreComment $comment, Status $status) | |
Constructs a MutableRevisionRecord based on the Content prepared by the DerivedPageDataUpdater. More... | |
Static Private Member Functions | |
static | toLegacyUser (UserIdentity $user) |
Controller-like object for creating and updating pages by creating new revisions.
PageUpdater instances provide compare-and-swap (CAS) protection against concurrent updates between the time grabParentRevision() is called and saveRevision() inserts a new revision. This allows application logic to safely perform edit conflict resolution using the parent revision's content.
MCR migration note: this replaces the relevant methods in WikiPage.
Definition at line 82 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::__construct | ( | UserIdentity | $author, |
WikiPage | $wikiPage, | ||
DerivedPageDataUpdater | $derivedDataUpdater, | ||
ILoadBalancer | $loadBalancer, | ||
RevisionStore | $revisionStore, | ||
SlotRoleRegistry | $slotRoleRegistry, | ||
IContentHandlerFactory | $contentHandlerFactory, | ||
HookContainer | $hookContainer, | ||
UserEditTracker | $userEditTracker, | ||
UserGroupManager | $userGroupManager, | ||
TitleFormatter | $titleFormatter, | ||
ServiceOptions | $serviceOptions, | ||
array | $softwareTags | ||
) |
UserIdentity | $author | |
WikiPage | $wikiPage | |
DerivedPageDataUpdater | $derivedDataUpdater | |
ILoadBalancer | $loadBalancer | |
RevisionStore | $revisionStore | |
SlotRoleRegistry | $slotRoleRegistry | |
IContentHandlerFactory | $contentHandlerFactory | |
HookContainer | $hookContainer | |
UserEditTracker | $userEditTracker | |
UserGroupManager | $userGroupManager | |
TitleFormatter | $titleFormatter | |
ServiceOptions | $serviceOptions | |
string[] | $softwareTags | Array of currently enabled software change tags. Can be obtained from ChangeTags::getSoftwareTags() |
Definition at line 229 of file PageUpdater.php.
References MediaWiki\Storage\PageUpdater\$author, MediaWiki\Storage\PageUpdater\$contentHandlerFactory, MediaWiki\Storage\PageUpdater\$derivedDataUpdater, MediaWiki\Storage\PageUpdater\$hookContainer, MediaWiki\Storage\PageUpdater\$loadBalancer, MediaWiki\Storage\PageUpdater\$revisionStore, MediaWiki\Storage\PageUpdater\$serviceOptions, MediaWiki\Storage\PageUpdater\$slotRoleRegistry, MediaWiki\Storage\PageUpdater\$softwareTags, MediaWiki\Storage\PageUpdater\$titleFormatter, MediaWiki\Storage\PageUpdater\$userEditTracker, MediaWiki\Storage\PageUpdater\$userGroupManager, MediaWiki\Storage\PageUpdater\$wikiPage, MediaWiki\Config\ServiceOptions\assertRequiredOptions(), MediaWiki\Storage\EditResultBuilder\CONSTRUCTOR_OPTIONS, MediaWiki\Config\ServiceOptions\get(), and MediaWiki\MainConfigNames\ManualRevertSearchRadius.
MediaWiki\Storage\PageUpdater::addSoftwareTag | ( | string | $tag | ) |
Sets software tag to this update.
If the tag is not defined in the current software tags, it's ignored.
string | $tag |
Definition at line 691 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::addTag | ( | string | $tag | ) |
Sets a tag to apply to this update.
Callers are responsible for permission checks, using ChangeTags::canAddTagsAccompanyingChange.
string | $tag |
Definition at line 663 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::addTags | ( | array | $tags | ) |
Sets tags to apply to this update.
Callers are responsible for permission checks, using ChangeTags::canAddTagsAccompanyingChange.
string[] | $tags |
Definition at line 675 of file PageUpdater.php.
|
private |
Builds the EditResult for this update.
Should be called by either doModify or doCreate.
RevisionRecord | $revision | |
bool | $isNew |
Definition at line 1237 of file PageUpdater.php.
|
private |
array | $roles | |
Status | $status |
Definition at line 1741 of file PageUpdater.php.
References StatusValue\error().
|
private |
array | $roles | |
Status | $status |
Definition at line 1687 of file PageUpdater.php.
References StatusValue\error().
|
private |
array | $roles | |
Status | $status |
Definition at line 1704 of file PageUpdater.php.
References StatusValue\error().
|
private |
array | $roles | |
Status | $status |
Definition at line 1724 of file PageUpdater.php.
References StatusValue\error().
|
private |
|
private |
CommentStoreComment | $summary | The edit summary |
DBUnexpectedError | |
MWException |
Definition at line 1474 of file PageUpdater.php.
References ChangeTags\addTags(), DeferredUpdates\addUpdate(), DB_PRIMARY, EDIT_FORCE_BOT, EDIT_SUPPRESS_RC, WikiPage\insertOn(), StatusValue\newGood(), RecentChange\notifyNew(), and WikiPage\updateRevisionOn().
|
private |
CommentStoreComment | $summary | The edit summary |
MWException |
Definition at line 1307 of file PageUpdater.php.
References ChangeTags\addTags(), DeferredUpdates\addUpdate(), DB_PRIMARY, EDIT_FORCE_BOT, EDIT_SUPPRESS_RC, getTitle(), WikiPage\lockAndGetLatest(), StatusValue\newGood(), RecentChange\notifyEdit(), and WikiPage\updateRevisionOn().
|
private |
Update derived slots in an existing revision.
If the revision is the current revision, this will update page_touched and trigger secondary updates.
We do not have sufficient information to know whether to or how to update recentchanges here, so, as opposed to doCreate(), updating recentchanges is left as the responsibility of the caller.
RevisionRecord | $revision |
Definition at line 1254 of file PageUpdater.php.
References StatusValue\newFatal().
|
private |
Definition at line 1669 of file PageUpdater.php.
|
private |
Definition at line 1676 of file PageUpdater.php.
|
private |
Definition at line 1665 of file PageUpdater.php.
|
private |
Definition at line 1590 of file PageUpdater.php.
References EDIT_NEW, EDIT_UPDATE, RecentChange\PRC_AUTOPATROLLED, and RecentChange\PRC_PATROLLED.
|
private |
string | $role | slot role name |
Definition at line 754 of file PageUpdater.php.
|
private |
int | $mode | DB_PRIMARY or DB_REPLICA |
Definition at line 441 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::getEditResult | ( | ) |
Returns the EditResult associated with this PageUpdater.
Will return null if PageUpdater::saveRevision() wasn't called yet. Will also return null if the update was not successful.
Definition at line 652 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::getExplicitTags | ( | ) |
Returns the list of tags set using the addTag() method.
Definition at line 703 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::getNewRevision | ( | ) |
The new revision created by saveRevision(), or null if saveRevision() has not yet been called, failed, or did not create a new revision because the content did not change.
Definition at line 1140 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::getPage | ( | ) |
Get the page we're currently updating.
Definition at line 449 of file PageUpdater.php.
|
private |
Returns the content of the given slot of the parent revision, with no audience checks applied.
If there is no parent revision or the slot is not defined, this returns null.
string | $role | slot role name |
Definition at line 740 of file PageUpdater.php.
|
private |
Definition at line 1658 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::getStatus | ( | ) |
The Status object indicating whether saveRevision() was successful, or null if saveRevision() was not yet called on this instance.
Possible status errors: edit-hook-aborted: The ArticleSave hook aborted the update but didn't set the fatal flag of $status. edit-gone-missing: In update mode, but the article didn't exist. edit-conflict: In update mode, the article changed unexpectedly. edit-no-change: Warning that the text was the same as before. edit-already-exists: In creation mode, but the article already exists.
Extensions may define additional errors.
$return->value will contain an associative array with members as follows: new: Boolean indicating if the function attempted to create a new article. revision-record: The RevisionRecord object for the inserted revision, or null.
Definition at line 1063 of file PageUpdater.php.
|
private |
Definition at line 456 of file PageUpdater.php.
|
private |
Definition at line 432 of file PageUpdater.php.
|
private |
Definition at line 464 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::grabParentRevision | ( | ) |
Returns the revision that was the page's current revision when grabParentRevision() was first called.
This revision is the expected parent revision of the update, and will be recorded as the new revision's parent revision (unless no new revision is created because the content was not changed).
This method MUST not be called after saveRevision() was called!
The current revision determined by the first call to this method effectively acts a compare-and-swap (CAS) token which is checked by saveRevision(), which fails if any concurrent updates created a new revision.
Application code should call this method before applying transformations to the new content that depend on the parent revision, e.g. adding/replacing sections, or resolving conflicts via a 3-way merge. This protects against race conditions triggered by concurrent updates.
LogicException | if called after saveRevision(). |
Definition at line 536 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::hasEditConflict | ( | $expectedParentRevision | ) |
Checks whether this update conflicts with another update performed between the client loading data to prepare an edit, and the client committing the edit.
This is intended to detect user level "edit conflict" when the latest revision known to the client is no longer the current revision when processing the update.
An update expected to create a new page can be checked by setting $expectedParentRevision = 0. Such an update is considered to have a conflict if a current revision exists (that is, the page was created since the edit was initiated on the client).
This method returning true indicates to calling code that edit conflict resolution should be applied before saving any data. It does not prevent the update from being performed, and it should not be confused with a "late" conflict indicated by the "edit-conflict" status. A "late" conflict is a CAS failure caused by an update being performed concurrently between the time grabParentRevision() was called and the time saveRevision() trying to insert the new revision.
int | $expectedParentRevision | The ID of the revision the client expects to be the current one. Use 0 to indicate that the page is expected to not yet exist. |
Definition at line 502 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::inheritSlot | ( | SlotRecord | $originalSlot | ) |
Explicitly inherit a slot from some earlier revision.
The primary use case for this is rollbacks, when slots are to be inherited from the rollback target, overriding the content from the parent revision (which is the revision being rolled back).
This should typically not be used to inherit slots from the parent revision, which happens implicitly. Using this method causes the given slot to be treated as "modified" during revision creation, even if it has the same content as in the parent revision.
SlotRecord | $originalSlot | A slot already existing in the database, to be inherited by the new revision. |
Definition at line 582 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::isChange | ( | ) |
Whether the prepared edit is a change compared to the previous revision.
Definition at line 1104 of file PageUpdater.php.
Referenced by EditPage\createTempUser().
MediaWiki\Storage\PageUpdater::isNew | ( | ) |
Whether saveRevision() was called and created a new page.
Definition at line 1084 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::isUnchanged | ( | ) |
Whether saveRevision() did create a revision because the content didn't change: (null-edit).
Whether the content changed or not is determined by DerivedPageDataUpdater::isChange().
Definition at line 1095 of file PageUpdater.php.
|
private |
Definition at line 776 of file PageUpdater.php.
References $content, EDIT_AUTOSUMMARY, and CommentStoreComment\newUnsavedComment().
|
private |
Constructs a MutableRevisionRecord based on the Content prepared by the DerivedPageDataUpdater.
This takes care of inheriting slots, updating slots with PST applied, and removing discontinued slots.
This calls Content::prepareSave() to verify that the slot content can be saved. The $status parameter is updated with any errors or warnings found by Content::prepareSave().
CommentStoreComment | $comment | |
Status | $status |
Definition at line 1159 of file PageUpdater.php.
References $content, $title, EDIT_MINOR, getTitle(), StatusValue\merge(), and wfWarn().
MediaWiki\Storage\PageUpdater::markAsRevert | ( | int | $revertMethod, |
int | $newestRevertedRevId, | ||
int | $revertAfterRevId = null |
||
) |
Marks this edit as a revert and applies relevant information.
Will also cause the PageUpdater to add a relevant change tag when saving the edit.
int | $revertMethod | The method used to make the revert: REVERT_UNDO, REVERT_ROLLBACK or REVERT_MANUAL |
int | $newestRevertedRevId | the revision ID of the latest reverted revision. |
int | null | $revertAfterRevId | the revision ID after which revisions are being reverted. Defaults to the revision before the $newestRevertedRevId. |
Definition at line 634 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::prepareUpdate | ( | int | $flags = 0 | ) |
Prepare the update.
This sets up the RevisionRecord to be saved.
int | $flags | Bitfield, will be combined with flags set via setFlags(). EDIT_FORCE_BOT and EDIT_INTERNAL will bypass the edit stash. |
Definition at line 316 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::preventChange | ( | ) |
Disable new revision creation, throwing an exception if it is attempted.
Definition at line 1113 of file PageUpdater.php.
Referenced by EditPage\createTempUser().
MediaWiki\Storage\PageUpdater::removeSlot | ( | $role | ) |
Removes the slot with the given role.
This discontinues the "stream" of slots with this role on the page, preventing the new revision, and any subsequent revisions, from inheriting the slot with this role.
string | $role | A slot role name (but not "main") |
Definition at line 601 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::saveRevision | ( | CommentStoreComment | $summary, |
int | $flags = 0 |
||
) |
Change an existing article or create a new article.
Updates RC and all necessary caches, optionally via the deferred update array. This does not check user permissions.
It is guaranteed that saveRevision() will fail if the current revision of the page changes after grabParentRevision() was called and before saveRevision() can insert a new revision, as per the CAS mechanism described above.
The caller is however responsible for calling hasEditConflict() to detect a user-level edit conflict, and to adjust the content of the new revision accordingly, e.g. by using a 3-way-merge.
MCR migration note: this replaces WikiPage::doEditContent. Callers that change to using saveRevision() now need to check the "minoredit" themselves before using EDIT_MINOR.
CommentStoreComment | $summary | Edit summary |
int | $flags | Bitfield, will be combined with the flags set via setFlags(). See there for details. |
MWException | |
RuntimeException |
Definition at line 831 of file PageUpdater.php.
References DeferredUpdates\addCallableUpdate(), EDIT_MINOR, EDIT_NEW, EDIT_UPDATE, ContentHandler\getLocalizedName(), StatusValue\newFatal(), StatusValue\newGood(), and wfMessage().
MediaWiki\Storage\PageUpdater::setContent | ( | $role, | |
Content | $content | ||
) |
Set the new content for the given slot role.
string | $role | A slot role name (such as "main") |
Content | $content |
Definition at line 547 of file PageUpdater.php.
References $content.
MediaWiki\Storage\PageUpdater::setFlags | ( | int | $flags | ) |
Sets any flags to use when performing the update.
Flags passed in subsequent calls to this method as well as calls to prepareUpdate() or saveRevision() are aggregated using bitwise OR.
Known flags:
EDIT_NEW Create a new page, or fail with "edit-already-exists" if the page exists. EDIT_UPDATE Create a new revision, or fail with "edit-gone-missing" if the page does not exist. EDIT_MINOR Mark this revision as minor EDIT_SUPPRESS_RC Do not log the change in recentchanges EDIT_FORCE_BOT Mark the revision as automated ("bot edit") EDIT_AUTOSUMMARY Fill in blank summaries with generated text where possible EDIT_INTERNAL Signal that the page retrieve/save cycle happened entirely in this request.
int | $flags | Bitfield |
Definition at line 301 of file PageUpdater.php.
References MediaWiki\Storage\PageUpdater\$flags.
MediaWiki\Storage\PageUpdater::setForceEmptyRevision | ( | bool | $forceEmptyRevision | ) |
Set whether null-edits should create a revision.
Enabling this allows the creation of dummy revisions ("null revisions") to mark events such as renaming in the page history.
Callers should typically also call setOriginalRevisionId() to indicate the ID of the revision that is being repeated. That ID can be obtained from grabParentRevision()->getId().
bool | $forceEmptyRevision |
Definition at line 419 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::setOriginalRevisionId | ( | $originalRevId | ) |
Sets the ID of an earlier revision that is being repeated or restored by this update.
The new revision is expected to have the exact same content as the given original revision. This is used with rollbacks and with dummy "null" revisions which are created to record things like page moves. setForceEmptyRevision() calls this implicitly.
int | bool | $originalRevId | The original revision id, or false if no earlier revision is known to be repeated or restored by this update. |
Definition at line 617 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::setRcPatrolStatus | ( | $status | ) |
Sets the "patrolled" status of the edit.
Callers should check the "patrol" and "autopatrol" permissions as appropriate.
int | $status | RC patrol status, e.g. RecentChange::PRC_AUTOPATROLLED. |
Definition at line 383 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::setSlot | ( | SlotRecord | $slot | ) |
Set the new slot for the given slot role.
SlotRecord | $slot |
Definition at line 560 of file PageUpdater.php.
References MediaWiki\Revision\SlotRecord\getRole().
MediaWiki\Storage\PageUpdater::setUseAutomaticEditSummaries | ( | $useAutomaticEditSummaries | ) |
Can be used to enable or disable automatic summaries that are applied to certain kinds of changes, like completely blanking a page.
bool | $useAutomaticEditSummaries |
Definition at line 368 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::setUsePageCreationLog | ( | $use | ) |
Whether to create a log entry for new page creations.
bool | $use |
Definition at line 396 of file PageUpdater.php.
|
staticprivate |
UserIdentity | $user |
Definition at line 340 of file PageUpdater.php.
References User\newFromIdentity().
MediaWiki\Storage\PageUpdater::updateAuthor | ( | UserIdentity | $author | ) |
After creation of the user during the save process, update the stored UserIdentity.
UserIdentity | $author |
Definition at line 351 of file PageUpdater.php.
References MediaWiki\User\UserIdentity\getName().
Referenced by EditPage\createTempUser().
MediaWiki\Storage\PageUpdater::updateRevision | ( | int | $revId = 0 | ) |
Updates derived slots of an existing article.
Does not update RC. Updates all necessary caches, optionally via the deferred update array. This does not check user permissions. Does not do a PST.
Use wasRevisionCreated(), wasSuccessful() and getStatus() to determine the outcome of the revision update.
int | $revId |
Definition at line 965 of file PageUpdater.php.
References EDIT_INTERNAL, ContentHandler\getLocalizedName(), StatusValue\newFatal(), StatusValue\newGood(), and wfMessage().
MediaWiki\Storage\PageUpdater::wasCommitted | ( | ) |
Whether saveRevision() has been called on this instance.
Definition at line 1036 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::wasRevisionCreated | ( | ) |
Whether saveRevision() did create a revision.
This is not the same as wasSuccessful(): when the new content is exactly the same as the old one (DerivedPageDataUpdater::isChange() returns false) and setForceEmptyRevision( true ) is not set, no new revision is created, but the save is considered successful. This behavior constitutes a "null edit".
Definition at line 1128 of file PageUpdater.php.
MediaWiki\Storage\PageUpdater::wasSuccessful | ( | ) |
Whether saveRevision() completed successfully.
This is not the same as wasRevisionCreated(): when the new content is exactly the same as the old one (DerivedPageDataUpdater::isChange() returns false) and setForceEmptyRevision( true ) is not set, no new revision is created, but the save is considered successful. This behavior constitutes a "null edit".
Definition at line 1075 of file PageUpdater.php.
|
private |
Definition at line 97 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().
|
private |
Definition at line 127 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().
|
private |
Definition at line 107 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().
|
private |
Definition at line 198 of file PageUpdater.php.
|
private |
Definition at line 193 of file PageUpdater.php.
|
private |
Definition at line 208 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\setFlags().
|
private |
Whether null-edits create a revision.
Definition at line 167 of file PageUpdater.php.
|
private |
Definition at line 137 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().
|
private |
Definition at line 132 of file PageUpdater.php.
|
private |
Definition at line 112 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().
|
private |
Whether to prevent new revision creation by throwing if it is attempted.
Definition at line 173 of file PageUpdater.php.
|
private |
the RC patrol status the new revision should be marked with.
Definition at line 157 of file PageUpdater.php.
|
private |
Definition at line 117 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().
|
private |
Definition at line 203 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().
|
private |
Definition at line 122 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().
|
private |
Definition at line 183 of file PageUpdater.php.
|
private |
Definition at line 211 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().
|
private |
Definition at line 188 of file PageUpdater.php.
|
private |
Definition at line 178 of file PageUpdater.php.
|
private |
Definition at line 146 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().
|
private |
see $wgUseAutomaticEditSummaries
Definition at line 152 of file PageUpdater.php.
|
private |
whether to create a log entry for new page creations.
Definition at line 162 of file PageUpdater.php.
|
private |
Definition at line 140 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().
|
private |
Definition at line 143 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().
|
private |
Definition at line 102 of file PageUpdater.php.
Referenced by MediaWiki\Storage\PageUpdater\__construct().
const MediaWiki\Storage\PageUpdater::CONSTRUCTOR_OPTIONS |
Options that have to be present in the ServiceOptions object passed to the constructor.
Definition at line 89 of file PageUpdater.php.