From 455133258656fa598b1765f24fce888b6b6b0976 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Wed, 13 May 2020 14:55:37 -0700 Subject: [PATCH] Replace use of old $wgVersion constant with MW_VERSION Change-Id: I31e524694ca2e7399b235b89aeeb779a4d13811d --- extension.json | 2 +- includes/WikiEditorHooks.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extension.json b/extension.json index c8c2ea15..12ba9d1b 100644 --- a/extension.json +++ b/extension.json @@ -13,7 +13,7 @@ "license-name": "GPL-2.0-or-later", "type": "editor", "requires": { - "MediaWiki": ">= 1.34.0" + "MediaWiki": ">= 1.34.1" }, "MessagesDirs": { "WikiEditor": [ diff --git a/includes/WikiEditorHooks.php b/includes/WikiEditorHooks.php index cd7e5a1f..ceeb0d06 100644 --- a/includes/WikiEditorHooks.php +++ b/includes/WikiEditorHooks.php @@ -26,7 +26,7 @@ class WikiEditorHooks { * @return bool Whether the event was logged or not. */ public static function doEventLogging( $action, $article, $data = [] ) { - global $wgVersion, $wgWMESchemaEditAttemptStepSamplingRate; + global $wgWMESchemaEditAttemptStepSamplingRate; $extensionRegistry = ExtensionRegistry::getInstance(); if ( !$extensionRegistry->isLoaded( 'EventLogging' ) ) { return false; @@ -59,7 +59,7 @@ class WikiEditorHooks { 'revision_id' => $page->getRevision() ? $page->getRevision()->getId() : 0, 'user_id' => $user->getId(), 'user_editcount' => $user->getEditCount() ?: 0, - 'mw_version' => $wgVersion, + 'mw_version' => MW_VERSION, ] + $data; if ( $user->isAnon() ) {