Thiemo Mättig (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315694

Change subject: Remove hard-coded 
supportedEntityTypesForEntitiesWithoutTermListings default
......................................................................

Remove hard-coded supportedEntityTypesForEntitiesWithoutTermListings default

Bug: T140891
Change-Id: I2c0e918a5c175237e3cc46fba300a4ece7405026
---
M repo/config/Wikibase.default.php
M repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php
2 files changed, 9 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/94/315694/1

diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php
index f3967ff..478eecf 100644
--- a/repo/config/Wikibase.default.php
+++ b/repo/config/Wikibase.default.php
@@ -195,8 +195,6 @@
                'wb-claims' => [ 'name' => 'statements', 'type' => 'integer' ],
        ],
 
-       'supportedEntityTypesForEntitiesWithoutTermListings' => [
-               'item',
-               'property'
-       ]
+       // List of entity types for Special:EntitiesWithoutLabel and 
…Description, or null for all.
+       'supportedEntityTypesForEntitiesWithoutTermListings' => null,
 ];
diff --git a/repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php 
b/repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php
index 29e6d06..e2dc69f 100644
--- a/repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php
+++ b/repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php
@@ -20,7 +20,13 @@
 
        private static function newFromGlobalState() {
                $wikibaseRepo = WikibaseRepo::getDefaultInstance();
-               $entityTypes = $wikibaseRepo->getSettings()->getSetting( 
'supportedEntityTypesForEntitiesWithoutTermListings' );
+               $entityTypes = $wikibaseRepo->getSettings()->getSetting(
+                       'supportedEntityTypesForEntitiesWithoutTermListings'
+               );
+
+               if ( $entityTypes === null ) {
+                       $entityTypes = $wikibaseRepo->getEnabledEntityTypes();
+               }
 
                return new self(
                        
$wikibaseRepo->getStore()->newEntitiesWithoutTermFinder(),

-- 
To view, visit https://gerrit.wikimedia.org/r/315694
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c0e918a5c175237e3cc46fba300a4ece7405026
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to