forked from miraheze/mw-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWikibase.php
81 lines (73 loc) · 2.61 KB
/
Wikibase.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
// Documentation for Wikibase: https://www.mediawiki.org/wiki/Wikibase/Installation/Advanced_configuration#Configuration
// You should only need to set $wgWBClientSettings['repoUrl'], $wgWBClientSettings['repoDatabase'] and $wgWBClientSettings['changesDatabase']
// on the wiki.
$wgWBRepoSettings['entityNamespaces']['item'] = $wmgWikibaseRepoItemNamespaceID;
$wgWBRepoSettings['entityNamespaces']['property'] = $wmgWikibaseRepoPropertyNamespaceID;
$wgWBRepoSettings['sharedCacheKeyPrefix'] = $wi->dbname . ':WBL/' . rawurlencode( $wgVersion );
$wgWBRepoSettings['allowEntityImport'] = $wmgAllowEntityImport;
$wgWBRepoSettings['enableEntitySearchUI'] = $wmgEnableEntitySearchUI;
$wgWBRepoSettings['federatedPropertiesEnabled'] = $wmgFederatedPropertiesEnabled;
$wgWBRepoSettings['formatterUrlProperty'] = $wmgFormatterUrlProperty ? $wmgFormatterUrlProperty : null;
$wgWBRepoSettings['canonicalUriProperty'] = $wmgCanonicalUriProperty ? $wmgCanonicalUriProperty : null;
$wgWBRepoSettings['siteLinkGroups'] = [
'miraheze'
];
$wgWBRepoSettings['specialSiteLinkGroups'] = [];
$wgWBClientSettings['repoUrl'] = $wmgWikibaseRepoUrl;
$wgWBClientSettings['repoDatabase'] = $wmgWikibaseRepoDatabase;
$wgWBClientSettings['changesDatabase'] = $wmgWikibaseRepoDatabase;
$wgWBClientSettings['repositories'] = [
'' => [
'repoDatabase' => $wmgWikibaseRepoDatabase,
'baseUri' => $wmgWikibaseRepoUrl . '/entity/',
'entityNamespaces' => [
'item' => $wmgWikibaseItemNamespaceID,
'property' => $wmgWikibasePropertyNamespaceID
],
'prefixMapping' => [
'' => ''
]
]
];
$wgWBClientSettings['siteGlobalID'] = $wi->dbname;
$wgWBClientSettings['repoScriptPath'] = '/w';
$wgWBClientSettings['repoArticlePath'] = '/wiki/$1';
$wgWBClientSettings['siteGroup'] = 'miraheze';
$wgWBClientSettings['repoNamespaces'] = [
'wikibase-item' => 'Item',
'wikibase-property' => 'Property'
];
$wgWBClientSettings['siteLinksGroups'] = [
'miraheze'
];
$wgWBClientSettings['purgeCacheBatchSize'] = 100;
$wgWBClientSettings['recentChangesBatchSize'] = 100;
// Per-wiki
if ( $wgDBname === 'famedatawiki' ) {
$wgWBRepoSettings['statementSections'] = [
'item' => [
'statements' => null,
'identifiers' => [
'type' => 'dataType',
'dataTypes' => [
'external-id',
],
],
],
'property' => [
'statements' => null,
'constraints' => [
'type' => 'propertySet',
'propertyIds' => [
'P142',
],
],
],
];
}
if ( $wgDBname === 'famepediawiki' ) {
$wgWBRepoSettings['useKartographerGlobeCoordinateFormatter'] = true;
$wgWBClientSettings['useKartographerMaplinkInWikitext'] = true;
$wgWBClientSettings['repoSiteName'] = 'FAMEData';
}