X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fauth%2FThrottler.php;h=3125bd3fd8e8da37939336bbb642ce6e2f93715e;hp=6d3b2f46e64a2e9c2e1992c4faa3cf4494836b12;hb=f7e1770fb832aa77bf4e16ce8cc815f2b24dd10d;hpb=2c0db8f5e8593a51ae0acc8285fd40b7743b0fce diff --git a/includes/auth/Throttler.php b/includes/auth/Throttler.php index 6d3b2f46e6..3125bd3fd8 100644 --- a/includes/auth/Throttler.php +++ b/includes/auth/Throttler.php @@ -127,10 +127,10 @@ class Throttler implements LoggerAwareInterface { continue; } - $throttleKey = wfGlobalCacheKey( 'throttler', $this->type, $index, $ipKey, $userKey ); + $throttleKey = $this->cache->makeGlobalKey( 'throttler', $this->type, $index, $ipKey, $userKey ); $throttleCount = $this->cache->get( $throttleKey ); - if ( !$throttleCount ) { // counter not started yet + if ( !$throttleCount ) { // counter not started yet $this->cache->add( $throttleKey, 1, $expiry ); } elseif ( $throttleCount < $count ) { // throttle limited not yet reached $this->cache->incr( $throttleKey ); @@ -170,7 +170,7 @@ class Throttler implements LoggerAwareInterface { $userKey = $username ? md5( $username ) : null; foreach ( $this->conditions as $index => $specificThrottle ) { $ipKey = isset( $specificThrottle['allIPs'] ) ? null : $ip; - $throttleKey = wfGlobalCacheKey( 'throttler', $this->type, $index, $ipKey, $userKey ); + $throttleKey = $this->cache->makeGlobalKey( 'throttler', $this->type, $index, $ipKey, $userKey ); $this->cache->delete( $throttleKey ); } }