EventDispatcher: Remove reference to $wgWMESchemaEditAttemptStepOversample

At the time of writing, $wgWMESchemaEditAttemptStepOversample is not a
global variable in PHP [0].

[0] https://codesearch.wmcloud.org/search/?q=WMESchemaEditAttemptStepOversample

Bug: T312016
Change-Id: I6a8abceddc9fce2f28f7a154fa2fc566538ed5e8
This commit is contained in:
Sam Smith 2022-07-27 12:39:50 +01:00
parent 2f6305b7b5
commit 50853a3db6

View file

@ -406,7 +406,7 @@ class EventDispatcher {
PageIdentity $title,
UserIdentity $identity
): bool {
global $wgDTSchemaEditAttemptStepOversample, $wgWMESchemaEditAttemptStepOversample, $wgDBname;
global $wgDTSchemaEditAttemptStepOversample, $wgDBname;
$context = RequestContext::getMain();
$request = $context->getRequest();
// We've reached here through Echo's post-save deferredupdate, which
@ -424,8 +424,7 @@ class EventDispatcher {
return false;
}
$inSample = static::inEventSample( $editingStatsId );
$shouldOversample = $wgWMESchemaEditAttemptStepOversample ||
( $isDiscussionTools && $wgDTSchemaEditAttemptStepOversample ) || (
$shouldOversample = ( $isDiscussionTools && $wgDTSchemaEditAttemptStepOversample ) || (
$extensionRegistry->isLoaded( 'WikimediaEvents' ) &&
// @phan-suppress-next-line PhanUndeclaredClassMethod
\WikimediaEvents\WikimediaEventsHooks::shouldSchemaEditAttemptStepOversample( $context )