From bf5464614b52fe38688e1e541f40bb6ef9eb4931 Mon Sep 17 00:00:00 2001 From: Thalia Date: Fri, 6 Sep 2019 13:19:14 +0100 Subject: [PATCH] Deprecate the GetBlockedStatus hook This was replaced by GetUserBlock in 7a5508573a. Handlers in production were updated to use GetUserBlock in I952aa7d40 and Ibbcd3a239. Bug: T229035 Change-Id: I95f9fabc6e795243cfe0a1e8737ca6abfb865538 --- RELEASE-NOTES-1.34 | 2 ++ docs/hooks.txt | 3 ++- includes/user/User.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index 2e220afa3c..c095697d38 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -532,6 +532,8 @@ because of Phabricator reports. be used instead. * The UserIsHidden hook is deprecated. Use GetUserBlock instead, and add a system block that hides the user. +* The GetBlockedStatus hook is deprecated. Use GetUserBlock instead, to add or + remove a block. === Other changes in 1.34 === * … diff --git a/docs/hooks.txt b/docs/hooks.txt index 43234c6590..43bfd8d4b4 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1585,7 +1585,8 @@ entitled to be in. $user: user to promote. &$promote: groups that will be added. -'GetBlockedStatus': after loading blocking status of an user from the database +'GetBlockedStatus': DEPRECATED since 1.34 - use GetUserBlock instead. After +loading blocking status of a user from the database &$user: user (object) being checked 'GetCacheVaryCookies': Get cookies that should vary cache options. diff --git a/includes/user/User.php b/includes/user/User.php index 6893bf48fa..7ec3ff5136 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -1741,7 +1741,7 @@ class User implements IDBAccessObject, UserIdentity { // Avoid PHP 7.1 warning of passing $this by reference $thisUser = $this; // Extensions - Hooks::run( 'GetBlockedStatus', [ &$thisUser ] ); + Hooks::run( 'GetBlockedStatus', [ &$thisUser ], '1.34' ); } /** -- 2.20.1