From 4e4e6ba8bb632f01b53f0ed03d6cd57f21446f50 Mon Sep 17 00:00:00 2001 From: Alexander Vorwerk Date: Fri, 13 Aug 2021 02:59:38 +0200 Subject: [PATCH] Use constant MW_VERSION instead of deprecated global $wgVersion Change-Id: I612dcdd63f4908cc2b3a6123191a16f4bd7c4452 --- includes/SkinTimeless.php | 3 +-- includes/TimelessVariablesModule.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/SkinTimeless.php b/includes/SkinTimeless.php index 1f94b05..4e6b3ad 100644 --- a/includes/SkinTimeless.php +++ b/includes/SkinTimeless.php @@ -12,11 +12,10 @@ class SkinTimeless extends SkinTemplate { public function __construct( array $options = [] ) { - global $wgVersion; $out = $this->getOutput(); // This code block can be removed when 1.35 is no longer supported. - if ( version_compare( $wgVersion, '1.36', '<' ) ) { + if ( version_compare( MW_VERSION, '1.36', '<' ) ) { // Add external links - this is replaced by `content-links` feature in 1.36 $out->addModuleStyles( [ 'mediawiki.skinning.content.externallinks' diff --git a/includes/TimelessVariablesModule.php b/includes/TimelessVariablesModule.php index a6ce3be..6855a5b 100644 --- a/includes/TimelessVariablesModule.php +++ b/includes/TimelessVariablesModule.php @@ -12,8 +12,7 @@ class TimelessVariablesModule extends ResourceLoaderSkinModule { $localBasePath = null, $remoteBasePath = null ) { - global $wgVersion; - if ( version_compare( $wgVersion, '1.36', '<' ) ) { + if ( version_compare( MW_VERSION, '1.36', '<' ) ) { $options['features'] = [ "logo", "legacy" ]; }