From e25009cae177568b6fddb58255f46d679fa73aa9 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Wed, 4 Jun 2008 06:04:13 +0000 Subject: [PATCH] Add GetAutoPromoteGroups hook, which was in my working copy but not committed yet (core change for TorBlock extension) --- docs/hooks.txt | 4 ++++ includes/Autopromote.php | 3 +++ 2 files changed, 7 insertions(+) diff --git a/docs/hooks.txt b/docs/hooks.txt index 2f9291c718..3d609903d3 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -618,6 +618,10 @@ $fileVersions: array of undeleted versions. Empty if all versions were restored $user: user who performed the undeletion $reason: reason +'GetAutoPromoteGroups': When determining which autopromote groups a user is 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 $user: user (object) being checked diff --git a/includes/Autopromote.php b/includes/Autopromote.php index b446647f79..4b1c6fa76e 100644 --- a/includes/Autopromote.php +++ b/includes/Autopromote.php @@ -18,6 +18,9 @@ class Autopromote { if( self::recCheckCondition( $cond, $user ) ) $promote[] = $group; } + + wfRunHooks( 'GetAutoPromoteGroups', array($user, &$promote) ); + return $promote; } -- 2.20.1