installer: Replace Vector dependency in WebInstallerOutput with fallback skin
Rather than hardcode a Vector module, the installer should use the fallback skin. This leaves it mostly unstyled, which will be restored in a separate change that adds a minimal stylesheet for the web installer (see Ibdb0a7208). Bug: T248133 Change-Id: I5c7f16ec9efda35b94355b6c81ec78d9bdfb574b
This commit is contained in:
parent
92df2fea88
commit
00e8bde685
1 changed files with 2 additions and 19 deletions
|
|
@ -131,31 +131,13 @@ class WebInstallerOutput {
|
|||
* @return string
|
||||
*/
|
||||
public function getCSS() {
|
||||
global $wgStyleDirectory;
|
||||
|
||||
$moduleNames = [
|
||||
// Based on Vector::setupSkinUserCss
|
||||
'mediawiki.skinning.interface',
|
||||
'mediawiki.legacy.config'
|
||||
];
|
||||
|
||||
$resourceLoader = MediaWikiServices::getInstance()->getResourceLoader();
|
||||
|
||||
if ( file_exists( "$wgStyleDirectory/Vector/skin.json" ) ) {
|
||||
// Force loading Vector skin if available as a fallback skin
|
||||
// for whatever ResourceLoader wants to have as the default.
|
||||
$registry = new ExtensionRegistry();
|
||||
$data = $registry->readFromQueue( [
|
||||
"$wgStyleDirectory/Vector/skin.json" => 1,
|
||||
] );
|
||||
if ( isset( $data['attributes']['ResourceModules'] ) ) {
|
||||
$resourceLoader->register( $data['attributes']['ResourceModules'] );
|
||||
}
|
||||
|
||||
$moduleNames[] = 'skins.vector.styles';
|
||||
}
|
||||
|
||||
$moduleNames[] = 'mediawiki.legacy.config';
|
||||
|
||||
$rlContext = new ResourceLoaderContext( $resourceLoader, new FauxRequest( [
|
||||
'debug' => 'true',
|
||||
'lang' => $this->getLanguage()->getCode(),
|
||||
|
|
@ -260,6 +242,7 @@ class WebInstallerOutput {
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<?php echo Html::htmlHeader( $this->getHeadAttribs() ); ?>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue