Merge "Hygiene: remove vectorConfig and use the getConfig"

This commit is contained in:
jenkins-bot 2020-01-13 22:43:12 +00:00 committed by Gerrit Code Review
commit 9cf4eb0e7e
2 changed files with 2 additions and 25 deletions

View File

@ -30,17 +30,8 @@ class SkinVector extends SkinTemplate {
public $skinname = 'vector';
public $stylename = 'Vector';
public $template = 'VectorTemplate';
/**
* @var Config
*/
private $vectorConfig;
private $responsiveMode = false;
public function __construct() {
parent::__construct( ...func_get_args() );
$this->vectorConfig = \MediaWiki\MediaWikiServices::getInstance()->getConfigFactory()
->makeConfig( 'vector' );
}
private $responsiveMode = false;
/**
* Enables the responsive mode
@ -61,7 +52,7 @@ class SkinVector extends SkinTemplate {
public function initPage( OutputPage $out ) {
parent::initPage( $out );
if ( $this->vectorConfig->get( 'VectorResponsive' ) ) {
if ( $this->getConfig()->get( 'VectorResponsive' ) ) {
$this->enableResponsiveMode();
}
}
@ -80,17 +71,6 @@ class SkinVector extends SkinTemplate {
return $modules;
}
/**
* Override to pass our Config instance to it
* @param string $classname
* @param bool|string $repository
* @param bool|string $cache_dir
* @return QuickTemplate
*/
public function setupTemplate( $classname, $repository = false, $cache_dir = false ) {
return new $classname( $this->vectorConfig );
}
/**
* Whether the logo should be preloaded with an HTTP link header or not
* @since 1.29

View File

@ -13,9 +13,6 @@
"requires": {
"MediaWiki": ">= 1.29.0"
},
"ConfigRegistry": {
"vector": "GlobalVarConfig::newInstance"
},
"ValidSkinNames": {
"vector": "Vector"
},