Deprecates $wgRateLimitLog in favor of debug log
[lhc/web/wiklou.git] / includes / User.php
index 0b28f66..e728323 100644 (file)
@@ -1602,7 +1602,7 @@ class User {
                        return false;
                }
 
-               global $wgMemc, $wgRateLimitLog;
+               global $wgMemc;
                wfProfileIn( __METHOD__ );
 
                $limits = $wgRateLimits[$action];
@@ -1665,12 +1665,7 @@ class User {
                        // Already pinged?
                        if ( $count ) {
                                if ( $count >= $max ) {
-                                       wfDebug( __METHOD__ . ": tripped! $key at $count $summary\n" );
-                                       if ( $wgRateLimitLog ) {
-                                               wfSuppressWarnings();
-                                               file_put_contents( $wgRateLimitLog, wfTimestamp( TS_MW ) . ' ' . wfWikiID() . ': ' . $this->getName() . " tripped $key at $count $summary\n", FILE_APPEND );
-                                               wfRestoreWarnings();
-                                       }
+                                       wfDebugLog( 'ratelimit', $this->getName() . " tripped! $key at $count $summary");
                                        $triggered = true;
                                } else {
                                        wfDebug( __METHOD__ . ": ok. $key at $count $summary\n" );