Add user parameter to AutopromoteCondition hook. Document it
authorVictor Vasiliev <vasilievvv@users.mediawiki.org>
Sun, 23 Dec 2007 18:33:46 +0000 (18:33 +0000)
committerVictor Vasiliev <vasilievvv@users.mediawiki.org>
Sun, 23 Dec 2007 18:33:46 +0000 (18:33 +0000)
docs/hooks.txt
includes/Autopromote.php

index 853833a..b2c610d 100644 (file)
@@ -397,6 +397,12 @@ Gives a chance for an extension to set it programattically to a variable class.
 'AutoAuthenticate': called to authenticate users on external/environmental means
 $user: writes user object to this parameter
 
+'AutopromoteCondition': check autopromote condition for user.
+$type: condition type
+$args: arguments
+$user: user
+$result: result of checking autopromote condition
+
 'BadImage': When checking against the bad image list
 $name: Image name being checked
 &$bad: Whether or not the image is "bad"
index 35f27ba..6b4d976 100644 (file)
@@ -63,7 +63,7 @@ class Autopromote {
                        case APCOND_INGROUPS:
                        default:
                                $result = false;
-                               wfRunHooks( 'AutopromoteCondition', array( $cond[0], array_slice( $cond, 1 ), &$result ) );
+                               wfRunHooks( 'AutopromoteCondition', array( $cond[0], array_slice( $cond, 1 ), $user, &$result ) );
                                return $result;
                }
        }