$revision: New Revision of the article
$status: Status object about to be returned by doEditContent()
$baseRevId: the rev ID (or false) this edit was based on
+$undidRevId: the rev ID (or 0) this edit undid
'ArticleUndelete': When one or more revisions of an article are restored.
&$title: Title corresponding to the article restored
nothing)
$status: Status object about to be returned by doEditContent()
$baseRevId: the rev ID (or false) this edit was based on
+$undidRevId: the rev ID (or 0) this edit undid
'PageHistoryBeforeList': When a history page list is about to be constructed.
&$article: the article that the history is loading for
* @param array|null $tags Change tags to apply to this edit
* Callers are responsible for permission checks
* (with ChangeTags::canAddTagsAccompanyingChange)
+ * @param Int $undidRevId Id of revision that was undone or 0
*
* @throws MWException
* @return Status Possible errors:
*/
public function doEditContent(
Content $content, $summary, $flags = 0, $baseRevId = false,
- User $user = null, $serialFormat = null, $tags = []
+ User $user = null, $serialFormat = null, $tags = [], $undidRevId = 0
) {
global $wgUser, $wgUseAutomaticEditSummaries;
'oldId' => $this->getLatest(),
'oldIsRedirect' => $this->isRedirect(),
'oldCountable' => $this->isCountable(),
- 'tags' => ( $tags !== null ) ? (array)$tags : []
+ 'tags' => ( $tags !== null ) ? (array)$tags : [],
+ 'undidRevId' => $undidRevId
];
// Actually create the revision and create/update the page
);
// Trigger post-save hook
$params = [ &$this, &$user, $content, $summary, $flags & EDIT_MINOR,
- null, null, &$flags, $revision, &$status, $meta['baseRevId'] ];
+ null, null, &$flags, $revision, &$status, $meta['baseRevId'],
+ $meta['undidRevId'] ];
ContentHandler::runLegacyHooks( 'ArticleSaveComplete', $params );
Hooks::run( 'PageContentSaveComplete', $params );
}