Daniel Kinzler has submitted this change and it was merged. Change subject: Remove usage of LibRegistry in WBR SpecialPages ......................................................................
Remove usage of LibRegistry in WBR SpecialPages Change-Id: I8496808a5b6ed54d8a071794c0844599977b3a04 --- M repo/includes/specials/SpecialNewProperty.php 1 file changed, 6 insertions(+), 5 deletions(-) Approvals: Daniel Kinzler: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/repo/includes/specials/SpecialNewProperty.php b/repo/includes/specials/SpecialNewProperty.php index ede9789..bc1e159 100644 --- a/repo/includes/specials/SpecialNewProperty.php +++ b/repo/includes/specials/SpecialNewProperty.php @@ -1,7 +1,9 @@ <?php +use Wikibase\DataTypeSelector; use Wikibase\PropertyContent; use Wikibase\EntityContent; +use Wikibase\Repo\WikibaseRepo; /** * Page for creating new Wikibase properties. @@ -85,9 +87,9 @@ $status = parent::modifyEntity( $propertyContent ); if ( $this->dataType !== '' ) { - $libRegistry = new \Wikibase\LibRegistry( \Wikibase\Settings::singleton() ); + $dataTypeFactory = WikibaseRepo::getDefaultInstance()->getDataTypeFactory(); - $dataType = $libRegistry->getDataTypeFactory()->getType( $this->dataType ); + $dataType = $dataTypeFactory->getType( $this->dataType ); if ( $dataType === null ) { $status->fatal( 'wikibase-newproperty-invalid-datatype' ); @@ -104,10 +106,9 @@ * @see SpecialNewEntity::additionalFormElements() */ protected function additionalFormElements() { - $libRegistry = new \Wikibase\LibRegistry( \Wikibase\Settings::singleton() ); - $dataTypeFactory = $libRegistry->getDataTypeFactory(); + $dataTypeFactory = WikibaseRepo::getDefaultInstance()->getDataTypeFactory(); - $selector = new \Wikibase\DataTypeSelector( $dataTypeFactory->getTypes(), $this->getLanguage()->getCode() ); + $selector = new DataTypeSelector( $dataTypeFactory->getTypes(), $this->getLanguage()->getCode() ); return parent::additionalFormElements() . Html::element( -- To view, visit https://gerrit.wikimedia.org/r/60216 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8496808a5b6ed54d8a071794c0844599977b3a04 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com> Gerrit-Reviewer: Daniel Kinzler <daniel.kinz...@wikimedia.de> Gerrit-Reviewer: Daniel Werner <daniel.wer...@wikimedia.de> Gerrit-Reviewer: Tobias Gritschacher <tobias.gritschac...@wikimedia.de> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits