Use constant MW_VERSION instead of deprecated global $wgVersion

Change-Id: I612dcdd63f4908cc2b3a6123191a16f4bd7c4452
isekai
Alexander Vorwerk 4 years ago
parent e2e8372d3a
commit 4e4e6ba8bb

@ -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'

@ -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" ];
}

Loading…
Cancel
Save