]> git.openstreetmap.org Git - chef.git/commitdiff
Added support for enableEntitySearchUI
authorYuri Astrakhan <YuriAstrakhan@gmail.com>
Sun, 28 Oct 2018 14:27:39 +0000 (10:27 -0400)
committerYuri Astrakhan <YuriAstrakhan@gmail.com>
Sun, 28 Oct 2018 14:27:39 +0000 (10:27 -0400)
This feature will become available in v1.33. For now,
we continue using a nasty hack that should be removed as soon as
we migrate.

The current nasty hack:
  $wgResourceModules['wikibase.ui.entitysearch']['scripts'] = [];

Until then, it's a noop.

cookbooks/wiki/templates/default/mw-ext-Wikibase.inc.php.erb

index 1ec5b1b9e2877aeeb69e93e80f0d609e1253e6a9..52930f7504622885a087a9dc9311d974159a7cee 100644 (file)
@@ -49,6 +49,11 @@ call_user_func( function() {
 
     // these are the site_group codes as listed in the sites table
     $wgWBRepoSettings['specialSiteLinkGroups'] = ['osm'];
 
     // 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";
 } );
 
 // Adapted from "$IP/extensions/Wikibase/client/ExampleSettings.php";
@@ -86,4 +91,5 @@ $wgWBRepoSettings['formatterUrlProperty'] = 'P8';
 
 // Disable Wikibase searchbox with this hack (hopefully Wikibase will implement support for it soon)
 // See https://phabricator.wikimedia.org/T205560
 
 // 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'] = [];
 $wgResourceModules['wikibase.ui.entitysearch']['scripts'] = [];