X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/ec0bc46d1275fc39a116736fc40372b0f6784fd0..28326173066466bb20f54bad702b2885b64f925c:/cookbooks/wiki/templates/default/mw-ext-Wikibase.inc.php.erb diff --git a/cookbooks/wiki/templates/default/mw-ext-Wikibase.inc.php.erb b/cookbooks/wiki/templates/default/mw-ext-Wikibase.inc.php.erb index e12205b77..6f7e8d6eb 100644 --- a/cookbooks/wiki/templates/default/mw-ext-Wikibase.inc.php.erb +++ b/cookbooks/wiki/templates/default/mw-ext-Wikibase.inc.php.erb @@ -1,11 +1,14 @@ WB_NS_ITEM, + 'property' => WB_NS_PROPERTY, + ]; + + $hookContainer = MediaWikiServices::getInstance()->getHookContainer(); + $hookContainer->run( 'WikibaseRepoEntityNamespaces', [ &$entityNamespaces ] ); + + return [ + $settings->getSetting( 'localEntitySourceName' ) => [ + 'entityNamespaces' => $entityNamespaces, + 'repoDatabase' => false, + 'baseUri' => $wgServer . '/entity/', + 'rdfNodeNamespacePrefix' => 'wd', + 'rdfPredicateNamespacePrefix' => '', + 'interwikiPrefix' => '', + ], + ]; + }; // Make sure we use the same keys on repo and clients, so we can share cached objects. - $wgWBRepoSettings['sharedCacheKeyPrefix'] = $wgDBname; + $wgWBRepoSettings['sharedCacheKeyPrefix'] = $wgDBname . ':WBL'; + $wgWBRepoSettings['sharedCacheKeyGroup'] = $wgDBname; // Include Wikibase items in the regular search result by default $wgNamespacesToBeSearchedDefault[WB_NS_ITEM] = true; @@ -91,7 +112,7 @@ define( 'WB_REPO_NS_PROPERTY', $baseRepoNs + 2 ); $wgWBClientSettings['entitySources'] = [ 'local' => [ - 'repoDatabase' => 'repo', + 'repoDatabase' => $wgDBname, 'baseUri' => $wgWBClientSettings['repoUrl'] . '/entity', 'entityNamespaces' => [ 'item' => WB_REPO_NS_ITEM, @@ -104,6 +125,7 @@ $wgWBClientSettings['entitySources'] = [ ]; $wgWBClientSettings['namespaces'] = [ NS_MAIN ]; +$wgWBClientSettings['repoSiteName'] = 'Data Items'; // Avoid complaints that nobody seems to know the cause off... $wgWBClientSettings['entityUsagePerPageLimit'] = 500;