diff options
-rw-r--r-- | RELEASE-NOTES-1.35 | 2 | ||||
-rw-r--r-- | docs/hooks.txt | 9 | ||||
-rw-r--r-- | includes/page/WikiPage.php | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/RELEASE-NOTES-1.35 b/RELEASE-NOTES-1.35 index fb1141ad15f4..8cba39b0366d 100644 --- a/RELEASE-NOTES-1.35 +++ b/RELEASE-NOTES-1.35 @@ -658,6 +658,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 diff --git a/docs/hooks.txt b/docs/hooks.txt index cbc95259ed8d..9e2a46601371 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 @@ -2919,6 +2920,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. diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 4dafc65e3191..1e72591cceb5 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -3425,8 +3425,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, |