X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiBase.php;h=9b3d11664df93b243c913ae9134b6e8cd9f6fc70;hb=044d888c41427967cd6f14303d300ceefa54d0c5;hp=2ec4570069cf9023450ed4b36268b8295e3e343f;hpb=56755808641887a79f9caf28024c17e1b389d17a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 2ec4570069..9b3d11664d 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -2225,6 +2225,15 @@ abstract class ApiBase extends ContextSource { * @param string $feature Feature being used. */ public function logFeatureUsage( $feature ) { + static $loggedFeatures = []; + + // Only log each feature once per request. We can get multiple calls from calls to + // extractRequestParams() with different values for 'parseLimit', for example. + if ( isset( $loggedFeatures[$feature] ) ) { + return; + } + $loggedFeatures[$feature] = true; + $request = $this->getRequest(); $ctx = [ 'feature' => $feature,