From 8a8a44ca001850321ecc7b6b75a5318b2d645d12 Mon Sep 17 00:00:00 2001 From: Piotr Miazga Date: Mon, 18 Nov 2019 15:41:37 -0500 Subject: [PATCH] Hygiene: remove SkinVector::setupSkinUserCss Tthe SkinVector::steupSkinUserCss is deprecated and we should use the ::getDefaultModules instead. Change-Id: I359049d0f159a0dfc374d1c0124e8989aeb4182d --- includes/SkinVector.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/includes/SkinVector.php b/includes/SkinVector.php index 0ee7e73c1..7eedb928f 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -70,21 +70,20 @@ class SkinVector extends SkinTemplate { if ( $this->vectorConfig->get( 'VectorResponsive' ) ) { $this->enableResponsiveMode(); } - - $out->addModules( 'skins.vector.js' ); } /** - * Loads skin and user CSS files. - * @param OutputPage $out + * @inheritDoc + * @return array */ - public function setupSkinUserCss( OutputPage $out ) { - parent::setupSkinUserCss( $out ); + public function getDefaultModules() { + $modules = parent::getDefaultModules(); + // add vector skin styles and vector module + $modules['styles']['skin'][] = 'mediawiki.skinning.interface'; + $modules['styles']['skin'][] = 'skins.vector.styles'; + $modules['core'][] = 'skins.vector.js'; - $out->addModuleStyles( [ - 'mediawiki.skinning.interface', - 'skins.vector.styles', - ] ); + return $modules; } /**