Add GetAutoPromoteGroups hook, which was in my working copy but not committed yet...
authorAndrew Garrett <werdna@users.mediawiki.org>
Wed, 4 Jun 2008 06:04:13 +0000 (06:04 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Wed, 4 Jun 2008 06:04:13 +0000 (06:04 +0000)
docs/hooks.txt
includes/Autopromote.php

index 2f9291c..3d60990 100644 (file)
@@ -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
 
index b446647..4b1c6fa 100644 (file)
@@ -18,6 +18,9 @@ class Autopromote {
                        if( self::recCheckCondition( $cond, $user ) )
                                $promote[] = $group;
                }
+               
+               wfRunHooks( 'GetAutoPromoteGroups', array($user, &$promote) );
+               
                return $promote;
        }