X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fuser%2FUser.php;h=aa211841f8836f93745f8cc141c695f7b2f8ef40;hb=44686573c91c00212702c115c0131ab1f496aae2;hp=3e6b212097b3794bdc3375c99a36fff1b4ba528f;hpb=79aa5a3fe4946959a03f931451f80a629ef94bbd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/user/User.php b/includes/user/User.php index 3e6b212097..aa211841f8 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -2108,10 +2108,6 @@ class User implements IDBAccessObject, UserIdentity { if ( isset( $limits['user'] ) ) { $userLimit = $limits['user']; } - // limits for newbie logged-in users - if ( $isNewbie && isset( $limits['newbie'] ) ) { - $keys[$cache->makeKey( 'limiter', $action, 'user', $id )] = $limits['newbie']; - } } // limits for anons and for newbie logged-in users @@ -2143,6 +2139,11 @@ class User implements IDBAccessObject, UserIdentity { } } + // limits for newbie logged-in users (override all the normal user limits) + if ( $id !== 0 && $isNewbie && isset( $limits['newbie'] ) ) { + $userLimit = $limits['newbie']; + } + // Set the user limit key if ( $userLimit !== false ) { list( $max, $period ) = $userLimit; @@ -3084,7 +3085,7 @@ class User implements IDBAccessObject, UserIdentity { * Get the user's current setting for a given option. * * @param string $oname The option to check - * @param string $defaultOverride A default value returned if the option does not exist + * @param string|array $defaultOverride A default value returned if the option does not exist * @param bool $ignoreHidden Whether to ignore the effects of $wgHiddenPrefs * @return string|array|int|null User's current value for the option * @see getBoolOption()