jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343929 )

Change subject: Make log type gblblock a user log type
......................................................................


Make log type gblblock a user log type

Call hook GetLogTypesOnUser and add gblblock as type for user logs. This
allows you to input the target on Special:Log without the User:
namespace

Change-Id: I52227dae51a75981c266424f07ed0ccbe569bc1d
---
M extension.json
M includes/GlobalBlockingHooks.php
2 files changed, 13 insertions(+), 1 deletion(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index e18f99a..d5b16fd 100644
--- a/extension.json
+++ b/extension.json
@@ -103,7 +103,8 @@
                "OtherBlockLogLink": "GlobalBlockingHooks::onOtherBlockLogLink",
                "SpecialContributionsBeforeMainOutput": 
"GlobalBlockingHooks::onSpecialContributionsBeforeMainOutput",
                "UserMergeAccountFields": 
"GlobalBlockingHooks::onUserMergeAccountFields",
-               "LoadExtensionSchemaUpdates": 
"GlobalBlockingHooks::onLoadExtensionSchemaUpdates"
+               "LoadExtensionSchemaUpdates": 
"GlobalBlockingHooks::onLoadExtensionSchemaUpdates",
+               "GetLogTypesOnUser": "GlobalBlockingHooks::onGetLogTypesOnUser"
        },
        "config": {
                "GlobalBlockingDatabase": {
diff --git a/includes/GlobalBlockingHooks.php b/includes/GlobalBlockingHooks.php
index 52e39f6..e2c012d 100644
--- a/includes/GlobalBlockingHooks.php
+++ b/includes/GlobalBlockingHooks.php
@@ -181,4 +181,15 @@
 
                return true;
        }
+
+       /**
+        * So users can just type in a username for target and it'll work
+        * @param array $types
+        * @return bool
+        */
+       public static function onGetLogTypesOnUser( array &$types ) {
+               $types[] = 'gblblock';
+
+               return true;
+       }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/343929
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I52227dae51a75981c266424f07ed0ccbe569bc1d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalBlocking
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to