jenkins-bot has submitted this change and it was merged. Change subject: Simplify construction of SkinVector ......................................................................
Simplify construction of SkinVector * Don't require a Config instance to be passed in the constructor, as that breaks skins that extend it. * Don't manually register the skin with SkinFactory, use $wgValidSkinNames Change-Id: Ie8539027c17caff35c1fc52a56676763df667fd9 (cherry picked from commit 85d097ba4ca6bf1a3ae15b21ca884cf4ed38907c) --- M SkinVector.php M Vector.php 2 files changed, 3 insertions(+), 6 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/SkinVector.php b/SkinVector.php index 8f7056d..565c64b 100644 --- a/SkinVector.php +++ b/SkinVector.php @@ -35,8 +35,8 @@ */ private $vectorConfig; - public function __construct( Config $config ) { - $this->vectorConfig = $config; + public function __construct() { + $this->vectorConfig = ConfigFactory::getDefaultInstance()->makeConfig( 'vector' ); } protected static $bodyClasses = array( 'vector-animateLayout' ); diff --git a/Vector.php b/Vector.php index 16bec17..7893f9c 100644 --- a/Vector.php +++ b/Vector.php @@ -38,10 +38,7 @@ $GLOBALS['wgMessagesDirs']['Vector'] = __DIR__ . '/i18n'; // Register skin -SkinFactory::getDefaultInstance()->register( 'vector', 'Vector', function(){ - $config = ConfigFactory::getDefaultInstance()->makeConfig( 'vector' ); - return new SkinVector( $config ); -} ); +$GLOBALS['wgValidSkinNames']['vector'] = 'Vector'; // Register config $GLOBALS['wgConfigRegistry']['vector'] = 'GlobalVarConfig::newInstance'; -- To view, visit https://gerrit.wikimedia.org/r/185782 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie8539027c17caff35c1fc52a56676763df667fd9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Vector Gerrit-Branch: REL1_24 Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits