From: Victor Vasiliev Date: Sun, 23 Dec 2007 18:33:46 +0000 (+0000) Subject: Add user parameter to AutopromoteCondition hook. Document it X-Git-Tag: 1.31.0-rc.0~50288 X-Git-Url: http://git.cyclocoop.org//%22%22.str_replace%28%27%22%27%2C?a=commitdiff_plain;h=b503237a8b81d85949c8ccc3d9f72e6037de969a;p=lhc%2Fweb%2Fwiklou.git Add user parameter to AutopromoteCondition hook. Document it --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 853833a6aa..b2c610d30c 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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" diff --git a/includes/Autopromote.php b/includes/Autopromote.php index 35f27ba950..6b4d976404 100644 --- a/includes/Autopromote.php +++ b/includes/Autopromote.php @@ -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; } }