X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fuser%2FUser.php;h=aaa7663948f3490046e9d271123c0953115db386;hp=d61c29d6b4a67efd16576f7a229d3cd5d813bb84;hb=6f3d5a5204770b7e9076ec0c956631c32a9e1114;hpb=65f714e1e679127c4d38a40e7b23da8cee2195d6 diff --git a/includes/user/User.php b/includes/user/User.php index d61c29d6b4..aaa7663948 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -1011,10 +1011,10 @@ class User implements IDBAccessObject, UserIdentity { // Should these be merged into the title char list? $unicodeBlacklist = '/[' . '\x{0080}-\x{009f}' . # iso-8859-1 control chars - '\x{00a0}' . # non-breaking space + '\x{00a0}' . # non-breaking space '\x{2000}-\x{200f}' . # various whitespace '\x{2028}-\x{202f}' . # breaks and control chars - '\x{3000}' . # ideographic space + '\x{3000}' . # ideographic space '\x{e000}-\x{f8ff}' . # private use ']/u'; if ( preg_match( $unicodeBlacklist, $name ) ) { @@ -2166,10 +2166,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 @@ -2201,6 +2197,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;