-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathWikibase.php
More file actions
executable file
·89 lines (73 loc) · 2.93 KB
/
Copy pathWikibase.php
File metadata and controls
executable file
·89 lines (73 loc) · 2.93 KB
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
82
83
84
85
86
87
88
89
<?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.
$entitySources = [
'local' => [
'entityNamespaces' => [
'item' => $wmgWikibaseRepoItemNamespaceID,
'property' => $wmgWikibaseRepoPropertyNamespaceID,
],
'repoDatabase' => $wmgWikibaseRepoDatabase,
'baseUri' => $wmgWikibaseRepoUrl . '/entity/',
'interwikiPrefix' => '',
'rdfNodeNamespacePrefix' => 'wd',
'rdfPredicateNamespacePrefix' => '',
'type' => 'db'
],
];
$wgWBClientSettings['tmpUnconnectedPagePagePropMigrationStage'] = MIGRATION_NEW;
if ( $wi->isExtensionActive( 'WikibaseLexeme' ) ) {
$entitySources['local']['entityNamespaces']['lexeme'] = 146;
$wgWBRepoSettings['entityNamespaces']['lexeme'] = 146;
}
$wgWBRepoSettings['entitySources'] = $entitySources;
$wgWBRepoSettings['localEntitySourceName'] = 'local';
$wgWBRepoSettings['entityNamespaces']['item'] = $wmgWikibaseRepoItemNamespaceID;
$wgWBRepoSettings['entityNamespaces']['property'] = $wmgWikibaseRepoPropertyNamespaceID;
$wgWBRepoSettings['allowEntityImport'] = $wmgAllowEntityImport;
$wgWBRepoSettings['enableEntitySearchUI'] = $wmgEnableEntitySearchUI;
$wgWBRepoSettings['federatedPropertiesEnabled'] = $wmgFederatedPropertiesEnabled;
$wgWBRepoSettings['formatterUrlProperty'] = $wmgFormatterUrlProperty ?: null;
$wgWBRepoSettings['canonicalUriProperty'] = $wmgCanonicalUriProperty ?: null;
$wgWBRepoSettings['dataRightsUrl'] = 'https://creativecommons.org/publicdomain/zero/1.0/';
$wgWBRepoSettings['siteGlobalID'] = $wgDBname;
$wgWBRepoSettings['siteLinkGroups'] = [
'wikioasis'
];
$wgWBRepoSettings['specialSiteLinkGroups'] = [];
$wgWBClientSettings['entitySources'] = $entitySources;
$wgWBClientSettings['itemAndPropertySourceName'] = 'local';
$wgWBClientSettings['repoUrl'] = $wmgWikibaseRepoUrl;
$wgWBClientSettings['repoDatabase'] = $wmgWikibaseRepoDatabase;
$wgWBClientSettings['changesDatabase'] = $wmgWikibaseRepoDatabase;
$wgWBClientSettings['repositories'] = [
'' => [
'repoDatabase' => $wmgWikibaseRepoDatabase,
'baseUri' => $wmgWikibaseRepoUrl . '/entity/',
'entityNamespaces' => [
'item' => $wmgWikibaseItemNamespaceID,
'property' => $wmgWikibasePropertyNamespaceID
],
'prefixMapping' => [
'' => ''
]
]
];
$wgWBClientSettings['siteGlobalID'] = $wgDBname;
$wgWBClientSettings['repoScriptPath'] = '';
$wgWBClientSettings['repoArticlePath'] = '/wiki/$1';
$wgWBClientSettings['siteGroup'] = 'wikioasis';
$wgWBClientSettings['repoNamespaces'] = [
'wikibase-item' => 'Item',
'wikibase-property' => 'Property'
];
$wgWBClientSettings['siteLinksGroups'] = [
'wikioasis'
];
$wgWBClientSettings['purgeCacheBatchSize'] = 100;
$wgWBClientSettings['recentChangesBatchSize'] = 100;
$wgMFUseWikibase = true;
// Per-wiki
// don't need these to be a global
unset( $entitySources );