This repository was archived by the owner on Feb 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSharedExtensions.php
More file actions
148 lines (129 loc) · 4.05 KB
/
SharedExtensions.php
File metadata and controls
148 lines (129 loc) · 4.05 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?php
# These extensions are always loaded on all projects
$wgRegistrationExtensions = [
'AntiSpoof',
'cldr',
'CategoryTree',
'CheckUser',
'CirrusSearch',
'Cite',
'CiteThisPage',
'Elastica', // CirrusSearch dependency
'GlobalBlocking',
'GlobalCssJs',
'GlobalPreferences',
'GlobalUserrights',
'InputBox',
'Interwiki',
'LocalisationUpdate',
'Maintenance',
'Math',
'MessageCommons',
'Nuke',
'OAuth',
'ParserFunctions',
'PdfHandler',
'Poem',
'RefreshSpecial',
'Renameuser',
'SiteMatrix',
// On Linux, set chmod a+x/path/to/extensions/SyntaxHighlight_GeSHi/pygments/pygmentize
// to allow the library to execute
'SyntaxHighlight_GeSHi',
'SpamBlacklist',
'Tabber',
'TitleBlacklist',
'UserMerge'
];
wfLoadExtensions( $wgRegistrationExtensions );
# Force loading so the settings can be correctly overridden
ExtensionRegistry::getInstance()->loadFromQueue();
require_once "$IP/extensions/Scribunto/Scribunto.php";
# Configuration
$wgScribuntoDefaultEngine = 'luastandalone';
# AntiSpoof
$wgSharedTables[] = 'spoofuser';
# CirrusSearch
$wgSearchType = 'CirrusSearch';
$wgCirrusSearchServers = [ 'localhost' ];
## Turn off leading wildcard matches, they are a very slow and inefficient query
$wgCirrusSearchAllowLeadingWildcard = false;
# GlobalBlocking
// Don't apply a global block on the central wiki, so it can be used to contest a global block
$wgApplyGlobalBlocks = $wgDBname !== $wgSharedDB;
$wgGlobalBlockingDatabase = $wgSharedDB;
# GlobalCssJs
$wgResourceLoaderSources['metawiki'] = [
'apiScript' => '//meta.example.org/w/api.php',
'loadScript' => '//meta.example.org/w/load.php',
];
$wgGlobalCssJsConfig = [
'wiki' => 'metawiki', // database name
'source' => 'metawiki', // ResourceLoader source name
];
# GlobalPreferences
$wgGlobalPreferencesDB = $wgSharedDB;
# GlobalUserrights
$wgSharedTables[] = 'global_user_groups';
$wgGroupPermissions['steward']['userrights-global'] = true;
# Unset staff as this not an existing group
unset( $wgGroupPermissions['staff'] );
# InterWiki
$wgInterwikiCentralDB = $wgSharedDB;
$wgGroupPermissions['sysop']['interwiki'] = true;
$wgGroupPermissions['steward']['interwiki'] = true;
# Maintenance
$wgGroupPermissions['steward']['maintenance'] = true;
# MessageCommons
$wgMessageCommonsLang = 'en';
$wgMessageCommonsDatabase = $wgSharedDB;
$wgMessageCommonsIsCommons = $wgDBname === $wgSharedDB;
# Nuke
$wgGroupPermissions['steward']['nuke'] = true;
# OAuth
$wgMWOAuthCentralWiki = $wgSharedDB;
$wgMWOAuthSecureTokenTransfer = true; // If the wikis do not use https, set this to false
$wgGroupPermissions['autoconfirmed']['mwoauthproposeconsumer'] = true;
$wgGroupPermissions['autoconfirmed']['mwoauthupdateownconsumer'] = true;
$wgGroupPermissions['steward']['mwoauthmanageconsumer'] = true;
$wgGroupPermissions['steward']['mwoauthsuppress'] = true;
$wgGroupPermissions['steward']['mwoauthviewsuppressed'] = true;
$wgGroupPermissions['steward']['mwoauthviewprivate'] = true;
# PdfHandler
$wgPdfProcessor = '/usr/bin/gs';
$wgPdfPostProcessor = $wgImageMagickConvertCommand;
$wgPdfInfo = '/usr/bin/pdfinfo';
$wgPdftoText = '/usr/bin/pdftotext';
# RenameUser
$wgGroupPermissions['bureaucrat']['renameuser'] = false;
# RefreshSpecial
$wgGroupPermissions['bureaucrat']['refreshspecial'] = false;
# SpamBlacklist
$wgSpamBlacklistFiles = [
'[[m:Spam blacklist]]', // Wikimedia's list
// Spam black list from the central wiki
// database title
"DB: $wgSharedDB MediaWiki:Global-spam-blacklist",
];
# SiteMatrix
$wgSiteMatrixFile = "$configDir/langlist";
$wgSiteMatrixPrivateSites = "$configDir/dblists/tags/private.dblist";
$wgSiteMatrixFishbowlSites = "$configDir/dblists/tags/restricted.dblist";
$wgSiteMatrixClosedSites = "$configDir/dblists/tags/closed.dblist";
$wgSiteMatrixSites = [
'wiki' => [
'name' => 'Example',
'host' => 'www.example.org',
'prefix' => 'w',
]
];
# TitleBlackList
$wgTitleBlackListSources = [
[
'type' => 'url',
'src' => 'https://meta.example.org/w/index.php?title=MediaWiki:Global-title-blacklist'
]
];
# UserMerge
$wgGroupPermissions['steward']['usermerge'] = true;
$wgUserMergeProtectedGroups = [ 'steward' ];