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
This commit is contained in:
parent
0bd8ffdd6d
commit
269da58dc3
|
@ -723,25 +723,6 @@ class Hooks {
|
||||||
Constants::CONFIG_KEY_DISABLE_SIDEBAR_PERSISTENCE
|
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';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -115,7 +115,6 @@
|
||||||
"vector": "GlobalVarConfig::newInstance"
|
"vector": "GlobalVarConfig::newInstance"
|
||||||
},
|
},
|
||||||
"Hooks": {
|
"Hooks": {
|
||||||
"ResourceLoaderGetConfigVars": "Vector\\Hooks::onResourceLoaderGetConfigVars",
|
|
||||||
"ResourceLoaderSiteModulePages": "Vector\\Hooks::onResourceLoaderSiteModulePages",
|
"ResourceLoaderSiteModulePages": "Vector\\Hooks::onResourceLoaderSiteModulePages",
|
||||||
"ResourceLoaderSiteStylesModulePages": "Vector\\Hooks::onResourceLoaderSiteStylesModulePages",
|
"ResourceLoaderSiteStylesModulePages": "Vector\\Hooks::onResourceLoaderSiteStylesModulePages",
|
||||||
"SkinPageReadyConfig": "Vector\\Hooks::onSkinPageReadyConfig",
|
"SkinPageReadyConfig": "Vector\\Hooks::onSkinPageReadyConfig",
|
||||||
|
|
Loading…
Reference in New Issue