From b503237a8b81d85949c8ccc3d9f72e6037de969a Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Sun, 23 Dec 2007 18:33:46 +0000 Subject: [PATCH] Add user parameter to AutopromoteCondition hook. Document it --- docs/hooks.txt | 6 ++++++ includes/Autopromote.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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; } } -- 2.20.1