Merge "Add 3D filetype for STL files"
[lhc/web/wiklou.git] / includes / auth / Throttler.php
index 6d3b2f4..3125bd3 100644 (file)
@@ -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 );
                }
        }