r28803 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r28802‎ | r28803 | r28804 >
Date:18:33, 23 December 2007
Author:vasilievvv
Status:old
Tags:
Comment:
Add user parameter to AutopromoteCondition hook. Document it
Modified paths:
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/Autopromote.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -397,6 +397,12 @@
398398 'AutoAuthenticate': called to authenticate users on external/environmental means
399399 $user: writes user object to this parameter
400400
 401+'AutopromoteCondition': check autopromote condition for user.
 402+$type: condition type
 403+$args: arguments
 404+$user: user
 405+$result: result of checking autopromote condition
 406+
401407 'BadImage': When checking against the bad image list
402408 $name: Image name being checked
403409 &$bad: Whether or not the image is "bad"
Index: trunk/phase3/includes/Autopromote.php
@@ -63,7 +63,7 @@
6464 case APCOND_INGROUPS:
6565 default:
6666 $result = false;
67 - wfRunHooks( 'AutopromoteCondition', array( $cond[0], array_slice( $cond, 1 ), &$result ) );
 67+ wfRunHooks( 'AutopromoteCondition', array( $cond[0], array_slice( $cond, 1 ), $user, &$result ) );
6868 return $result;
6969 }
7070 }

Status & tagging log