From 614f15682c35dd08dc9e0dbfc629b317075558e6 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Fri, 21 Jun 2019 14:07:43 -0700 Subject: [PATCH] Drop the UserRights hook, deprecated in 1.26 Change-Id: Ib4dc6f495c0d1d2aa1f41c1f61e09437f33c9077 --- RELEASE-NOTES-1.34 | 2 ++ docs/hooks.txt | 6 ------ includes/specials/SpecialUserrights.php | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index f8aafd964e..05c43cdc0d 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -234,6 +234,8 @@ because of Phabricator reports. deprecated in 1.20. * PrefixSearch::titleSearch(), deprecated in 1.23, has been removed. Use the TitlePrefixSearch or StringPrefixSearch classes instead. +* The UserRights hook, deprecated in 1.26, has been removed. Instead, use the + UserGroupsChanged hook. * … === Deprecations in 1.34 === diff --git a/docs/hooks.txt b/docs/hooks.txt index b275adc29c..e3ea66ecea 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -3832,12 +3832,6 @@ message(s). &$user: user retrieving new talks messages &$talks: array of new talks page(s) -'UserRights': DEPRECATED since 1.26! Use UserGroupsChanged instead. -After a user's group memberships are changed. -&$user: User object that was changed -$add: Array of strings corresponding to groups added -$remove: Array of strings corresponding to groups removed - 'UserSaveOptions': Called just before saving user preferences. Hook handlers can either add or manipulate options, or reset one back to it's default to block changing it. Hook handlers are also allowed to abort the process by returning diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index fc54890563..1c87f7a395 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -405,8 +405,6 @@ class UserrightsPage extends SpecialPage { wfDebug( 'newGroups: ' . print_r( $newGroups, true ) . "\n" ); wfDebug( 'oldUGMs: ' . print_r( $oldUGMs, true ) . "\n" ); wfDebug( 'newUGMs: ' . print_r( $newUGMs, true ) . "\n" ); - // Deprecated in favor of UserGroupsChanged hook - Hooks::run( 'UserRights', [ &$user, $add, $remove ], '1.26' ); // Only add a log entry if something actually changed if ( $newGroups != $oldGroups || $newUGMs != $oldUGMs ) { -- 2.20.1