From 269da58dc3fe947f8ba992839b2d3d7983dbd789 Mon Sep 17 00:00:00 2001 From: Jon Robson Date: Thu, 3 Feb 2022 08:37:05 -0800 Subject: [PATCH] Drop skin override This is often used by gadgets/scripts to request information from the API. Given `vector` means old Vector now that leads to styling issues. The unfortunate side effect of this is that any code checking mw.config('skin') === 'vector' will no longer work and we'll likely need to patch various gadgets accordingly. Bug: T300814 Change-Id: Ic920e91960cf81790096395256b75f8ed0dc4173 --- includes/Hooks.php | 19 ------------------- skin.json | 1 - 2 files changed, 20 deletions(-) diff --git a/includes/Hooks.php b/includes/Hooks.php index 71b80eda..1280e495 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -723,25 +723,6 @@ class Hooks { Constants::CONFIG_KEY_DISABLE_SIDEBAR_PERSISTENCE ); } - - // [[phab:T297758]] ensure old Vector is the same as new Vector - // from a user script / gadget point of view. - if ( self::isSkinVersionLegacy( $skinName ) ) { - $vars[ 'skin' ] = 'vector'; - } - } - - /** - * @param array &$vars Array of variables to be added into the output. - * @param string $skin - * @param Config $config - */ - public static function onResourceLoaderGetConfigVars( array &$vars, string $skin, Config $config ) { - // [[phab:T297758]] ensure old Vector is the same as new Vector - // from a user script / gadget point of view. - if ( self::isVectorSkin( $skin ) ) { - $vars['skin'] = 'vector'; - } } /** diff --git a/skin.json b/skin.json index 3f0b2db6..3bb7fb41 100644 --- a/skin.json +++ b/skin.json @@ -115,7 +115,6 @@ "vector": "GlobalVarConfig::newInstance" }, "Hooks": { - "ResourceLoaderGetConfigVars": "Vector\\Hooks::onResourceLoaderGetConfigVars", "ResourceLoaderSiteModulePages": "Vector\\Hooks::onResourceLoaderSiteModulePages", "ResourceLoaderSiteStylesModulePages": "Vector\\Hooks::onResourceLoaderSiteStylesModulePages", "SkinPageReadyConfig": "Vector\\Hooks::onSkinPageReadyConfig",