Replace ArticleRollbackComplete hook with RollbackComplete

Bug: T250543
Change-Id: I5fcb4b2adad8f16811bf9c76b95378f0f0f1e6a6
This commit is contained in:
DannyS712 2020-04-18 04:50:26 +00:00
parent 965466a053
commit 1519cefbc4
3 changed files with 13 additions and 1 deletions

View file

@ -657,6 +657,8 @@ because of Phabricator reports.
changed from public to protected:
- mTables
* The UndeleteShowRevision hook has been deprecated.
* The ArticleRollbackComplete hook has been deprecated. Please use the new
RollbackComplete hook instead.
* The ArticleEditUpdatesDeleteFromRecentchanges hook has been deprecated. Please
use the RecentChange_save hook or similar instead.
* The ArticleEditUpdates hook has been deprecated. Please

View file

@ -700,7 +700,8 @@ $visibilityChangeMap: Map of revision id to oldBits and newBits. This array can
revision. This array is of the form
[id => ['oldBits' => $oldBits, 'newBits' => $newBits], ... ]
'ArticleRollbackComplete': After an article rollback is completed.
'ArticleRollbackComplete': DEPRECATED since 1.35! Use RollbackComplete instead.
After an article rollback is completed.
$wikiPage: the WikiPage that was edited
$user: the user who did the rollback
$revision: the revision the page was reverted back to
@ -2914,6 +2915,12 @@ $flags: DEPRECATED! Always null!
$revisionRecord: the RevisionRecord that was restored
$oldPageID: the page ID of the revision when archived (may be null)
'RollbackComplete': After an article rollback is completed.
$wikiPage: the WikiPage that was edited
$user: UserIdentity for the user who did the rollback
$revision: RevisionRecord for the revision the page was reverted back to
$current: RevisionRecord for the reverted revision
'SearchableNamespaces': An option to modify which namespaces are searchable.
&$arr: Array of namespaces ($nsId => $name) which will be used.

View file

@ -3423,8 +3423,11 @@ class WikiPage implements Page, IDBAccessObject {
$revId = $rev->getId();
// Soft deprecated in 1.35
Hooks::run( 'ArticleRollbackComplete', [ $this, $guser, $legacyTarget, $legacyCurrent ] );
Hooks::run( 'RollbackComplete', [ $this, $guser, $target, $current ] );
$resultDetails = [
'summary' => $summary,
'current' => $legacyCurrent,