X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/c545095e765f5194c97275443cf73083a98690e2..1bc8da5f3a3bfd6c3f0ba374f12d489d13831460:/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 efb01cf77..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,6 +1,9 @@ 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;