forked from miraheze/mw-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Wikibase.php
38 lines (29 loc) · 1.38 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
<?php
call_user_func( function() {
global $wgContentHandlerUseDB, $wgExtraNamespaces, $wgWBRepoSettings;
global $wgDBname, $wgNamespacesToBeSearchedDefault;
$wgContentHandlerUseDB = true;
$baseNs = 860;
// Define custom namespaces. Use these exact constant names.
define( 'WB_NS_ITEM', $baseNs );
define( 'WB_NS_ITEM_TALK', $baseNs + 1 );
define( 'WB_NS_PROPERTY', $baseNs + 2 );
define( 'WB_NS_PROPERTY_TALK', $baseNs + 3 );
$wgExtraNamespaces[WB_NS_ITEM] = 'Item';
$wgExtraNamespaces[WB_NS_ITEM_TALK] = 'Item_talk';
$wgExtraNamespaces[WB_NS_PROPERTY] = 'Property';
$wgExtraNamespaces[WB_NS_PROPERTY_TALK] = 'Property_talk';
$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_ITEM] = WB_NS_ITEM;
$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_PROPERTY] = WB_NS_PROPERTY;
$wgWBRepoSettings['sharedCacheKeyPrefix'] = $wgDBname . ':WBL/' . rawurlencode( WBL_VERSION );
$wgNamespacesToBeSearchedDefault[WB_NS_ITEM] = true;
$wgWBRepoSettings['siteLinkGroups'] = array(
'wikipedia',
'wikinews',
'wikiquote',
'wikisource',
'wikivoyage',
'special'
);
$wgWBRepoSettings['specialSiteLinkGroups'] = array( 'commons', 'wikidata' );
} );