From b0df6367c26d3aee454d0fa1a76ca32244697bcb Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Fri, 30 Jun 2017 11:32:39 -0700 Subject: [PATCH] Give MinervaNeue control of the minerva skin name Change-Id: I7f004b43e11d88492b205a3584c29f72d26bad57 Depends-On: I985c4e3a88b59461d471945ccf74cd291db45a61 Bug: T166748 --- includes/Minerva.hooks.php | 6 ++++-- skin.json | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/includes/Minerva.hooks.php b/includes/Minerva.hooks.php index ea58ee75d..dcb2894a8 100644 --- a/includes/Minerva.hooks.php +++ b/includes/Minerva.hooks.php @@ -11,6 +11,7 @@ * Hook handler method names should be in the form of: * on() */ +use MediaWiki\MediaWikiServices; class MinervaHooks { /** @@ -22,8 +23,9 @@ class MinervaHooks { * @param array &$lessVars Variables already added */ public static function onResourceLoaderGetLessVars( &$lessVars ) { - // FIXME: Load from Minerva.Config when MobileFrontend and Minerva are separated - $config = MobileContext::singleton()->getMFConfig(); + $config = MediaWikiServices::getInstance()->getService( 'ConfigFactory' ) + ->makeConfig( 'minerva' ); + $lessVars = array_merge( $lessVars, [ 'wgMinervaApplyKnownTemplateHacks' => "{$config->get( 'MinervaApplyKnownTemplateHacks' )}", diff --git a/skin.json b/skin.json index c08d45088..addfeff92 100644 --- a/skin.json +++ b/skin.json @@ -507,7 +507,9 @@ } }, "ValidSkinNames": { - "minerva-neue": "MinervaNeue" + "minervaneue": "MinervaNeue", + "minerva-neue": "MinervaNeue", + "minerva": "Minerva" }, "author": [], "config": {