From: Andrew Garrett Date: Wed, 4 Jun 2008 06:04:13 +0000 (+0000) Subject: Add GetAutoPromoteGroups hook, which was in my working copy but not committed yet... X-Git-Tag: 1.31.0-rc.0~47179 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=e25009cae177568b6fddb58255f46d679fa73aa9;p=lhc%2Fweb%2Fwiklou.git Add GetAutoPromoteGroups hook, which was in my working copy but not committed yet (core change for TorBlock extension) --- 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; }