X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FAutopromote.php;h=a4130371b8469f608b4a19ffc956f4d59ecea5e4;hb=bac0e0160f4d94fd783fcf6fb2e87b4af43ff2b0;hp=a01465e9aeacd3c88ebe1cec3b6bc9d890cc78ed;hpb=6c9a2923fe1ee3a65cb027be5e781772f2b12fbd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Autopromote.php b/includes/Autopromote.php index a01465e9ae..a4130371b8 100644 --- a/includes/Autopromote.php +++ b/includes/Autopromote.php @@ -89,12 +89,12 @@ class Autopromote { /** * Recursively check a condition. Conditions are in the form - * array( '&' or '|' or '^' or '!', cond1, cond2, ... ) + * [ '&' or '|' or '^' or '!', cond1, cond2, ... ] * where cond1, cond2, ... are themselves conditions; *OR* * APCOND_EMAILCONFIRMED, *OR* - * array( APCOND_EMAILCONFIRMED ), *OR* - * array( APCOND_EDITCOUNT, number of edits ), *OR* - * array( APCOND_AGE, seconds since registration ), *OR* + * [ APCOND_EMAILCONFIRMED ], *OR* + * [ APCOND_EDITCOUNT, number of edits ], *OR* + * [ APCOND_AGE, seconds since registration ], *OR* * similar constructs defined by extensions. * This function evaluates the former type recursively, and passes off to * self::checkCondition for evaluation of the latter type. @@ -198,7 +198,8 @@ class Autopromote { case APCOND_IPINRANGE: return IP::isInRange( $user->getRequest()->getIP(), $cond[1] ); case APCOND_BLOCKED: - return $user->isBlocked(); + // @TODO Should partial blocks prevent auto promote? + return (bool)$user->getBlock(); case APCOND_ISBOT: return in_array( 'bot', User::getGroupPermissions( $user->getGroups() ) ); default: