Deprecate the GetBlockedStatus hook
authorThalia <thalia.e.chan@googlemail.com>
Fri, 6 Sep 2019 12:19:14 +0000 (13:19 +0100)
committerThalia <thalia.e.chan@googlemail.com>
Mon, 9 Sep 2019 22:29:25 +0000 (23:29 +0100)
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
docs/hooks.txt
includes/user/User.php

index 2e220af..c095697 100644 (file)
@@ -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 ===
 * …
index 43234c6..43bfd8d 100644 (file)
@@ -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.
index 6893bf4..7ec3ff5 100644 (file)
@@ -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' );
        }
 
        /**