* (bug 12536) User should be able to get MediaWiki version from any page
* (bug 12622) A JavaScript constant to declare whether api.php is available
* Add caching to the AJAX search
+* Added APCOND_INGROUPS
=== Bug fixes in 1.12 ===
if( self::recCheckCondition( $cond, $user ) )
$promote[] = $group;
}
- return array_unique( $promote );
+ return $promote;
}
/**
case APCOND_AGE:
$age = time() - wfTimestampOrNull( TS_UNIX, $user->getRegistration() );
return $age >= $cond[1];
+ case APCOND_INGROUPS:
+ $groups = array_slice( $cond, 1 );
+ return count( array_intersect( $groups, $user->getGroups() ) ) == count( $groups );
default:
$result = null;
wfRunHooks( 'AutopromoteCondition', array( $cond[0], array_slice( $cond, 1 ), $user, &$result ) );
define( 'APCOND_EDITCOUNT', 1 );
define( 'APCOND_AGE', 2 );
define( 'APCOND_EMAILCONFIRMED', 3 );
+define( 'APCOND_INGROUPS', 4 );
\ No newline at end of file
/**
* Get the list of implicit group memberships this user has.
- * This includes all explicit groups, plus 'user' if logged in
- * and '*' for all accounts.
+ * This includes all explicit groups, plus 'user' if logged in,
+ * '*' for all accounts and autopromoted groups
* @param boolean $recache Don't use the cache
* @return array of strings
*/