From e888061ca91fbc414fa29c75d224276e16bedd45 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Wed, 10 Oct 2018 15:28:34 -0700 Subject: [PATCH] Drop UserGetImplictGroups, deprecated since 1.25 Change-Id: Iffe29131fcc85d3477fe93508902d8ea982289f5 --- RELEASE-NOTES-1.32 | 1 + docs/hooks.txt | 4 ---- includes/user/User.php | 9 +++------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index ba05a4fd42..fe1c7d4d11 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -342,6 +342,7 @@ because of Phabricator reports. * File / MediaHandler::getStreamHeaders(), deprecated since 1.30, was removed. * The hook 'DoEditSectionLink', deprecated since 1.25, has been removed. Use the hook 'SkinEditSectionLinks' instead. +* The hook 'UserGetImplicitGroups', deprecated since 1.25, has been removed. === Deprecations in 1.32 === * HTMLForm::setSubmitProgressive() is deprecated. No need to call it. Submit diff --git a/docs/hooks.txt b/docs/hooks.txt index e80e179990..9757a7ed9c 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -3724,10 +3724,6 @@ $user: User object &$timestamp: timestamp, change this to override local email authentication timestamp -'UserGetImplicitGroups': DEPRECATED since 1.25! -Called in User::getImplicitGroups(). -&$groups: List of implicit (automatically-assigned) groups - 'UserGetLanguageObject': Called when getting user's interface language object. $user: User object &$code: Language code that will be used to create the object diff --git a/includes/user/User.php b/includes/user/User.php index 12623e89fa..7787901341 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -5113,16 +5113,13 @@ class User implements IDBAccessObject, UserIdentity { /** * Get a list of implicit groups + * TODO: Should we deprecate this? It's trivial, but we don't want to encourage use of globals. + * * @return array Array of Strings Array of internal group names */ public static function getImplicitGroups() { global $wgImplicitGroups; - - $groups = $wgImplicitGroups; - # Deprecated, use $wgImplicitGroups instead - Hooks::run( 'UserGetImplicitGroups', [ &$groups ], '1.25' ); - - return $groups; + return $wgImplicitGroups; } /** -- 2.20.1