Ladsgroup has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/400239 )
Change subject: Rename foreignRepositories config in client to repositories
......................................................................
Rename foreignRepositories config in client to repositories
All repositories are foreign to client
Bug: T153767
Change-Id: Ib13e48e8230790393d72d3454fe473169c81b392
---
M client/config/WikibaseClient.default.php
M client/includes/WikibaseClient.php
M docs/federation.wiki
M docs/options.wiki
4 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/39/400239/1
diff --git a/client/config/WikibaseClient.default.php
b/client/config/WikibaseClient.default.php
index 312edac..2fff44d 100644
--- a/client/config/WikibaseClient.default.php
+++ b/client/config/WikibaseClient.default.php
@@ -90,7 +90,7 @@
// repo and clients for multiwiki setups.
'sharedCacheType' => $GLOBALS['wgMainCacheType'],
- 'foreignRepositories' => [],
+ 'repositories' => [],
// Enable writing of term_full_entity_id column in wb_terms
table.
'writeFullEntityIdColumn' => function ( SettingsArray $settings
) {
diff --git a/client/includes/WikibaseClient.php
b/client/includes/WikibaseClient.php
index 3d9748b..e28594c 100644
--- a/client/includes/WikibaseClient.php
+++ b/client/includes/WikibaseClient.php
@@ -671,8 +671,8 @@
* @return RepositoryDefinitions
*/
private static function getRepositoryDefinitionsFromSettings(
SettingsArray $settings ) {
- // FIXME: It might no longer be needed to check different
settings (repoDatabase vs foreignRepositories)
- // once repository settings are unified, see: T153767.
+ // FIXME: It might no longer be needed to check different
settings (repoDatabase vs
+ // repositories) once repository settings are unified, see:
T153767.
$definitions = [ '' => [
'database' => $settings->getSetting( 'repoDatabase' ),
'base-uri' => $settings->getSetting(
'repoConceptBaseUri' ),
@@ -680,7 +680,7 @@
'entity-namespaces' => $settings->getSetting(
'entityNamespaces' ),
] ];
- foreach ( $settings->getSetting( 'foreignRepositories' ) as
$repository => $repositorySettings ) {
+ foreach ( $settings->getSetting( 'repositories' ) as
$repository => $repositorySettings ) {
$definitions[$repository] = [
'database' =>
$repositorySettings['repoDatabase'],
'base-uri' => $repositorySettings['baseUri'],
diff --git a/docs/federation.wiki b/docs/federation.wiki
index 240e1f6..decfb0c 100644
--- a/docs/federation.wiki
+++ b/docs/federation.wiki
@@ -5,7 +5,7 @@
As of March 2017, in order to enable access to entities from federated
repositories both Repo and Client components must be enabled. Also as of March
2017, accessing data of foreign entities relies on the shared database access
(databases of federated repositories must be in the same database cluster).
* Local repository is configured as documented in docs/options.wiki.
-* Configuration of foreign repositories is done using the
''foreignRepositories'' setting in $wgWBRepoSettings or $wgWBClientSettings, as
documented in the file docs/options.wiki.
+* Configuration of foreign repositories is done using the
''foreignRepositories'' setting in $wgWBRepoSettings or ''repositories'' in
$wgWBClientSettings, as documented in the file docs/options.wiki.
* In order to correctly link entities from foreign repositories, the local
wiki must have MediaWiki interwiki prefixes configured for each foreign
repository. As of March 2017, the interwiki prefix must be the same as the name
used for the foreign repository. If there is no interwiki prefix configured for
the wiki containing the foreign repository, it can be added e.g. by adding a
row to the <code>interwiki</code> database table, or by using
[[Special:Interwiki]] if the Interwiki extension is enabled on the local wiki.
Note that as of March 2017 it is only possible for Wikibase to use entities
from a single repository, either local or foreign. For instance, it is not
possible to use both local and foreign items in statements.
diff --git a/docs/options.wiki b/docs/options.wiki
index fee5d1e..7a03ada 100644
--- a/docs/options.wiki
+++ b/docs/options.wiki
@@ -13,7 +13,7 @@
;siteLinkGroups: The site groups to use in sitelinks. Must correspond to a
value used to give the site group in the MediaWiki <code>sites</code> table.
Default is <code>array( 'wikipedia' )</code>. This defines which groups of
sites can be linked to Wikibase items.
:'''Note''' that this setting replaces the old ''siteLinkGroup'' setting,
which only allowed for a single group.
;specialSiteLinkGroups: This maps one or more site groups into a single
"special" group. This is useful if sites from multiple site groups should be
shown in a single "special" section on item pages, instead of one section per
site group. To show these site-groups you have to add the group "special" to
the '''siteLinkGroups''' setting (see above).
-;foreignRepositories: An associative array mapping foreign repository names to
settings relevant to the particular repository. Each repository's settings are
an associative array containing the following keys:
+;foreignRepositories: (In client, it's named ''repositories'') An associative
array mapping foreign repository names to settings relevant to the particular
repository. Each repository's settings are an associative array containing the
following keys:
:;'entityNamespaces': A map of entity type identifiers (strings) that the
local wiki supports from the foreign repository to namespaces identifiers
(numbers) related to pages of entities of the given type on foreign
repository's wiki..
:;'repoDatabase': A symbolic database identifier (string) that MediaWiki's
LBFactory class understands.
:;'baseUri': A base URI (string) for concept URIs. It should contain scheme
and authority part of the URI.
--
To view, visit https://gerrit.wikimedia.org/r/400239
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib13e48e8230790393d72d3454fe473169c81b392
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits