]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/wiki/templates/default/mw-ext-Wikibase.inc.php.erb
Added support for enableEntitySearchUI
[chef.git] / cookbooks / wiki / templates / default / mw-ext-Wikibase.inc.php.erb
index dc1188c4baeccec96537b0c36c9d97fa89618db7..52930f7504622885a087a9dc9311d974159a7cee 100644 (file)
@@ -40,8 +40,8 @@ call_user_func( function() {
     // Make sure we use the same keys on repo and clients, so we can share cached objects.
     $wgWBRepoSettings['sharedCacheKeyPrefix'] = $wgDBname . ':WBL/' . rawurlencode( WBL_VERSION );
 
-    // Tell MediaWiki to search the item namespace
-    // $wgNamespacesToBeSearchedDefault[WB_NS_ITEM] = true;
+    // Include Wikibase items in the regular search result by default
+    $wgNamespacesToBeSearchedDefault[WB_NS_ITEM] = true;
 
     // the special group includes all the sites in the specialSiteLinkGroups,
     // grouped together in a 'Pages linked to other sites' section.
@@ -49,6 +49,11 @@ call_user_func( function() {
 
     // these are the site_group codes as listed in the sites table
     $wgWBRepoSettings['specialSiteLinkGroups'] = ['osm'];
+
+    // This option will start working in Wikibase v1.33 release. Noop until then.
+    // https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/469872/
+    $wgWBRepoSettings['enableEntitySearchUI'] = false;
+
 } );
 
 // Adapted from "$IP/extensions/Wikibase/client/ExampleSettings.php";
@@ -84,6 +89,7 @@ $wgGroupPermissions['data-admin']['property-create'] = true;
 // See https://www.mediawiki.org/wiki/Wikibase/Installation/Advanced_configuration#Define_links_for_external_identifiers
 $wgWBRepoSettings['formatterUrlProperty'] = 'P8';
 
-// ---- This should be removed once all needed initial items and properties are set up
-$wgNamespaceProtection[WB_NS_ITEM] = [ 'create-wb-items' ];
-$wgGroupPermissions['data-admin']['create-wb-items'] = true;
+// Disable Wikibase searchbox with this hack (hopefully Wikibase will implement support for it soon)
+// See https://phabricator.wikimedia.org/T205560
+// After upgrading to Wikibase 1.33, this line can be deleted. The 'enableEntitySearchUI' above will do the same thing.
+$wgResourceModules['wikibase.ui.entitysearch']['scripts'] = [];