Merge "Hygiene: remove vectorConfig and use the getConfig"
This commit is contained in:
commit
9cf4eb0e7e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue