dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Do not split parser cache if limitation is reached."
[lhc/web/wiklou.git]
/
includes
/
Autopromote.php
diff --git
a/includes/Autopromote.php
b/includes/Autopromote.php
index
ec9dcf5
..
d492d19
100644
(file)
--- a/
includes/Autopromote.php
+++ b/
includes/Autopromote.php
@@
-29,7
+29,7
@@
class Autopromote {
/**
* Get the groups for the given user based on $wgAutopromote.
*
/**
* Get the groups for the given user based on $wgAutopromote.
*
- * @param
$user U
ser The user to get the groups for
+ * @param
User $u
ser The user to get the groups for
* @return array Array of groups to promote to.
*/
public static function getAutopromoteGroups( User $user ) {
* @return array Array of groups to promote to.
*/
public static function getAutopromoteGroups( User $user ) {
@@
-43,7
+43,7
@@
class Autopromote {
}
}
}
}
-
wfRunHooks
( 'GetAutoPromoteGroups', array( $user, &$promote ) );
+
Hooks::run
( 'GetAutoPromoteGroups', array( $user, &$promote ) );
return $promote;
}
return $promote;
}
@@
-53,8
+53,8
@@
class Autopromote {
*
* Does not return groups the user already belongs to or has once belonged.
*
*
* Does not return groups the user already belongs to or has once belonged.
*
- * @param
$user U
ser The user to get the groups for
- * @param string $event
k
ey in $wgAutopromoteOnce (each one has groups/criteria)
+ * @param
User $u
ser The user to get the groups for
+ * @param string $event
K
ey in $wgAutopromoteOnce (each one has groups/criteria)
*
* @return array Groups the user should be promoted to.
*
*
* @return array Groups the user should be promoted to.
*
@@
-99,8
+99,8
@@
class Autopromote {
* This function evaluates the former type recursively, and passes off to
* self::checkCondition for evaluation of the latter type.
*
* This function evaluates the former type recursively, and passes off to
* self::checkCondition for evaluation of the latter type.
*
- * @param
$cond Mixed: a
condition, possibly containing other conditions
- * @param
$user U
ser The user to check the conditions against
+ * @param
mixed $cond A
condition, possibly containing other conditions
+ * @param
User $u
ser The user to check the conditions against
* @return bool Whether the condition is true
*/
private static function recCheckCondition( $cond, User $user ) {
* @return bool Whether the condition is true
*/
private static function recCheckCondition( $cond, User $user ) {
@@
-126,7
+126,8
@@
class Autopromote {
return false;
} elseif ( $cond[0] == '^' ) { // XOR (exactly one cond passes)
if ( count( $cond ) > 3 ) {
return false;
} elseif ( $cond[0] == '^' ) { // XOR (exactly one cond passes)
if ( count( $cond ) > 3 ) {
- wfWarn( 'recCheckCondition() given XOR ("^") condition on three or more conditions. Check your $wgAutopromote and $wgAutopromoteOnce settings.' );
+ wfWarn( 'recCheckCondition() given XOR ("^") condition on three or more conditions.' .
+ ' Check your $wgAutopromote and $wgAutopromoteOnce settings.' );
}
return self::recCheckCondition( $cond[1], $user )
xor self::recCheckCondition( $cond[2], $user );
}
return self::recCheckCondition( $cond[1], $user )
xor self::recCheckCondition( $cond[2], $user );
@@
-155,7
+156,7
@@
class Autopromote {
* APCOND_AGE. Other types will throw an exception if no extension evaluates them.
*
* @param array $cond A condition, which must not contain other conditions
* APCOND_AGE. Other types will throw an exception if no extension evaluates them.
*
* @param array $cond A condition, which must not contain other conditions
- * @param
$user U
ser The user to check the condition against
+ * @param
User $u
ser The user to check the condition against
* @throws MWException
* @return bool Whether the condition is true for the user
*/
* @throws MWException
* @return bool Whether the condition is true for the user
*/
@@
-196,7
+197,8
@@
class Autopromote {
return in_array( 'bot', User::getGroupPermissions( $user->getGroups() ) );
default:
$result = null;
return in_array( 'bot', User::getGroupPermissions( $user->getGroups() ) );
default:
$result = null;
- wfRunHooks( 'AutopromoteCondition', array( $cond[0], array_slice( $cond, 1 ), $user, &$result ) );
+ Hooks::run( 'AutopromoteCondition', array( $cond[0],
+ array_slice( $cond, 1 ), $user, &$result ) );
if ( $result === null ) {
throw new MWException( "Unrecognized condition {$cond[0]} for autopromotion!" );
}
if ( $result === null ) {
throw new MWException( "Unrecognized condition {$cond[0]} for autopromotion!" );
}