jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/315694 )
Change subject: Remove hard-coded
supportedEntityTypesForEntitiesWithoutTermListings default
..
Remove hard-coded supportedEntityTypesForEntitiesWithoutTermListings default
Bug: T140891
Change-Id: I2c0e918a5c175237e3cc46fba300a4ece7405026
---
M docs/options.wiki
M repo/config/Wikibase.default.php
M repo/includes/Specials/SpecialEntitiesWithoutPageFactory.php
3 files changed, 10 insertions(+), 6 deletions(-)
Approvals:
jenkins-bot: Verified
Thiemo Mättig (WMDE): Looks good to me, approved
diff --git a/docs/options.wiki b/docs/options.wiki
index fbae67f..c3390f8 100644
--- a/docs/options.wiki
+++ b/docs/options.wiki
@@ -50,7 +50,7 @@
;allowEntityImport: Allow importing entities via Special:Import and
importDump.php. Per default, imports are forbidden, since entities defined in
another wiki would have or use IDs that conflict with entities defined locally.
;pagePropertiesRdf: Array that maps between page properties and Wikibase
predicates for RDF dumps. Maps from database property name to an array that
contains a key 'name' (RDF property name, which will be prefixed
by wikibase:) and an optional key 'type'.
;unitStorage: Definition for unit conversion storage. Should be in in the
format ObjectFactory understands, example: array( 'class' =>
'Wikibase\\Lib\\JsonUnitStorage', 'args' => array( 'myUnits.json' ) ).
-;supportedEntityTypesForEntitiesWithoutTermListings: Array of entity types
that are supported on Special:EntitiesWithoutLabel and on
Special:EntitiesWithoutDescription. Can contain either "item" or "property" (or
both).
+;supportedEntityTypesForEntitiesWithoutTermListings: Array of entity types
that are supported on Special:EntitiesWithoutLabel and …Description, typically
'item' and 'property'. Defaults to null,
which enables all numeric entity types.
== Client Settings ==
diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php
index 9c40d62..b190977 100644
--- a/repo/config/Wikibase.default.php
+++ b/repo/config/Wikibase.default.php
@@ -198,8 +198,6 @@
// Map of foreign repository names to repository-specific settings such
as "supportedEntityTypes"
'foreignRepositories' => [],
- '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..7a7e0c0 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->getLocalEntityTypes();
+ }
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: merged
Gerrit-Change-Id: I2c0e918a5c175237e3cc46fba300a4ece7405026
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE)
Gerrit-Reviewer: Addshore
Gerrit-Reviewer: Daniel Kinzler
Gerrit-Reviewer: Hoo man
Gerrit-Reviewer: Thiemo Mättig (WMDE)
Gerrit-Reviewer: jenkins-bot <>
___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits