$promote = array();
foreach ( $wgAutopromote as $group => $cond ) {
- if ( self::recCheckCondition( $cond, $user ) )
+ if ( self::recCheckCondition( $cond, $user ) ) {
$promote[] = $group;
+ }
}
wfRunHooks( 'GetAutoPromoteGroups', array( $user, &$promote ) );
}
return $res;
- } elseif ( $cond[0] = '!' ) {
+ } elseif ( $cond[0] == '!' ) {
foreach ( array_slice( $cond, 1 ) as $subcond ) {
if ( self::recCheckCondition( $subcond, $user ) ) {
return false;
throw new MWException( "Unrecognized condition {$cond[0]} for autopromotion!" );
}
- return $result ? true : false;
+ return (bool)$result;
}
}
}