-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathLocalSettings.php
423 lines (356 loc) · 13.5 KB
/
LocalSettings.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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
<?php
# This file was automatically generated by the MediaWiki 1.39.0-alpha
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See docs/Configuration.md for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
## Include platform/distribution defaults
require_once "$IP/includes/PlatformSettings.php";
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
$wgSitename = "mediawiki";
$wgMetaNamespace = "Mediawiki";
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = getenv('PIXEL_MW_SCRIPT_PATH');
## The protocol and server name to use in fully-qualified URLs
$wgServer = getenv('PIXEL_MW_SERVER');
## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath;
## The URL paths to the logo. Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogos = [
'1x' => "$wgResourceBasePath/resources/assets/change-your-logo.svg",
'icon' => "$wgResourceBasePath/resources/assets/change-your-logo-icon.svg",
];
## UPO means: this is also a user preference option
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "apache@localhost";
$wgPasswordSender = "apache@localhost";
$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;
## Database settings
$wgDBtype = "mysql";
$wgDBserver = "database";
$wgDBname = "my_wiki";
$wgDBuser = "root";
$wgDBpassword = "";
# MySQL specific settings
$wgDBprefix = "";
# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
# Shared database table
# This has no effect unless $wgSharedDB is also set.
$wgSharedTables[] = "actor";
## Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = [];
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = false;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = true;
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
# about this MediaWiki instance. The Wikimedia Foundation shares this data
# with MediaWiki developers to help guide future development efforts.
$wgPingback = false;
# Site language code, should be one of the list in ./languages/data/Names.php
$wgLanguageCode = "en";
# Time zone
$wgLocaltimezone = "UTC";
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publicly accessible from the web.
#$wgCacheDirectory = "$IP/cache";
$wgSecretKey = "101e9701ee95eb75c39ef96751bf33cb6606618027cb38d5a1bcc0fc7aa4e3fc";
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "c45b66eebd1ce91d";
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";
## Default skin: you can change the default skin. Use the internal symbolic
## names, e.g. 'vector' or 'monobook':
$wgDefaultSkin = "vector-2022";
# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'MinervaNeue' );
wfLoadSkin( 'Vector' );
wfLoadSkin( 'Modern' );
wfLoadSkin( 'CologneBlue' );
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Timeless' );
# Enabled extensions. Most of the extensions are enabled by adding
# wfLoadExtension( 'ExtensionName' );
# to LocalSettings.php. Check specific extension documentation for more details.
# The following extensions were automatically enabled:
wfLoadExtension( 'BetaFeatures' );
wfLoadExtension( 'CampaignEvents' );
wfLoadExtension( 'Cite' );
wfLoadExtension( 'Echo' );
wfLoadExtension( 'Gadgets' );
wfLoadExtension( 'GlobalPreferences' );
wfLoadExtension( 'QuickSurveys' );
wfLoadExtension( 'Linter' );
wfLoadExtension( 'DiscussionTools' );
wfLoadExtension( 'Math');
wfLoadExtension( 'MobileFrontend' );
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
wfLoadExtension( 'NearbyPages' );
wfLoadExtension( 'Popups' );
wfLoadExtension( 'RelatedArticles' );
wfLoadExtension( 'SandboxLink' );
wfLoadExtension( 'Thanks' );
wfLoadExtension( 'UniversalLanguageSelector' );
wfLoadExtension( 'VisualEditor' );
wfLoadExtension( 'CommunityConfiguration' );
wfLoadExtension( 'VueTest' );
if ( getenv('ENABLE_WIKILAMBDA') == 'true' ) {
wfLoadExtension( 'WikiLambda' );
}
wfLoadExtension( 'WikimediaMessages' );
// Make extended cookies (e.g. when logging in with "Keep me logged in" option)
// last indefinitely.
$wgExtendedLoginCookieExpiration = 0;
$wgMaxArticleSize = 80;
$wgAPIMaxResultSize = $wgMaxArticleSize * 4096;
// Use same localisation cache settings as production. This also seems to get
// rid of localisation errors associated with the `array` store (set by
// PlatformSettings.php) when checking out patches/release branches.
$wgLocalisationCacheConf = [
'class' => LocalisationCache::class,
'store' => 'detect',
'storeClass' => false,
'storeDirectory' => false,
'storeServer' => [],
'forceRecache' => false,
'manualRecache' => false,
];
// Shortcut for thanking.
$wgThanksSendToBots = true;
# Content Provider used to show articles from enwiki. Can be helpful when trying to see how
# production articles look locally, but be aware that there are some gotchas
# with using this that don't perfectly match the production environment. Use at
# your own discretion!
// $wgMFContentProviderClass = "MobileFrontendContentProviders\\MwApiContentProvider";
// wfLoadExtension( 'MobileFrontendContentProvider' );
# Show the enwiki logo.
$wgLogos = [
'icon' => 'https://en.wikipedia.org/static/images/icons/wikipedia.png',
'tagline' => [
'src' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-tagline-en.svg',
'width' => 117,
'height' => 13,
],
'1x' => 'https://en.wikipedia.org/static/images/project-logos/enwiki.png',
'2x' => 'https://en.wikipedia.org/static/images/project-logos/enwiki-2x.png',
'wordmark' => [
'src' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg',
'width' => 119,
'height' => 18,
],
];
// T152540: Dictates how the parser escapes section ids. Mirrors how it works
// on enwiki.
$wgFragmentMode = [ 'html5', 'legacy' ];
# Popups
$wgPopupsGateway = 'restbaseHTML';
$wgPopupsRestGatewayEndpoint = 'https://en.wikipedia.org/api/rest_v1/page/summary/';
$wgArticlePath = "/wiki/$1";
# Universal Language Selector
$wgULSPosition = 'interlanguage';
$wgULSCompactLanguageLinksBetaFeature = false;
# Useful when testing language variants
$wgUsePigLatinVariant = true;
# GlobalPreferences
$wgSharedTables = [ 'user' ]; // Note that 'user_properties' is not included.
# Visual Editor
$PARSOID_INSTALL_DIR = 'vendor/wikimedia/parsoid'; # bundled copy
// For developers: ensure Parsoid is executed from $PARSOID_INSTALL_DIR,
// (not the version included in mediawiki-core by default)
// Must occur *before* wfLoadExtension()
if ( $PARSOID_INSTALL_DIR !== 'vendor/wikimedia/parsoid' ) {
AutoLoader::$psr4Namespaces += [
// Keep this in sync with the "autoload" clause in
// $PARSOID_INSTALL_DIR/composer.json
'Wikimedia\\Parsoid\\' => "$PARSOID_INSTALL_DIR/src",
];
}
wfLoadExtension( 'Parsoid', "$PARSOID_INSTALL_DIR/extension.json" );
# Manually configure Parsoid
$wgVisualEditorParsoidAutoConfig = false;
$wgParsoidSettings = [
'useSelser' => true,
'rtTestMode' => false,
'linting' => false,
];
$wgVirtualRestConfig['modules']['parsoid'] = [
'url' => "http://mediawiki-web:8080" . $wgScriptPath . '/rest.php',
];
$wgVectorAppearance = [
'logged_in' => true,
'logged_out' => true,
'beta' => true
];
// For origin/wmf/1.39.0-wmf.14 against master.
// https://phabricator.wikimedia.org/T308675
// Can be removed when comparing wmf.15
$wgMinervaOverflowInPageActions = [
"base" => false,
"beta" => false,
"amc" => true,
"loggedin" => true
];
// Disable ULS IME keyboard tool.
// This leads to false positives in tests and is not a feature maintained by web team.
$wgULSIMEEnabled = false;
const QS_ANSWERS_MULTI_CHOICE = [
[
'label' => 'ext-quicksurveys-example-internal-survey-answer-positive',
'freeformTextLabel' => 'ext-quicksurveys-example-internal-survey-freeform-text-label',
],
[
'label' => 'ext-quicksurveys-example-internal-survey-answer-neutral',
'freeformTextLabel' => 'ext-quicksurveys-example-internal-survey-freeform-text-label',
],
[
'label' => 'ext-quicksurveys-example-internal-survey-answer-negative',
'freeformTextLabel' => 'ext-quicksurveys-example-internal-survey-freeform-text-label',
],
];
// Applies to all surveys
const QS_DEFAULTS = [
// Who is the survey for? All fields are optional.
'audience' => [
'minEdits' => 0,
'anons' => false,
'maxEdits' => 500,
'registrationStart' => '2018-01-01',
'registrationEnd' => '2080-01-31',
// You must have CentralNotice extension installed in order to limit audience by country
// 'countries' => [ 'US', 'UK' ]
],
// The i18n key of the privacy policy text
'privacyPolicy' => 'ext-quicksurveys-example-external-survey-privacy-policy',
// Whether the survey is enabled
'enabled' => true,
'shuffleAnswersDisplay' => false,
// Percentage of users that will see the survey
'coverage' => 0,
// For each platform (desktop, mobile), which version of it is targeted
'platforms' => [
'desktop' => [ 'stable' ],
'mobile' => [ 'stable' ]
],
];
$wgQuickSurveysConfig = [
// Example of an internal survey
[
// Survey name
'name' => 'internal example survey',
// Internal or external link survey?
'type' => 'internal',
// Survey question message key
'questions' => [
[
'name' => 'q1',
'question' => 'ext-quicksurveys-example-internal-survey-question',
// The respondent can choose one answer from a list.
'layout' => 'single-answer',
// The message key of the description of the survey. Displayed immediately below the survey question.
//'description' => 'ext-quicksurveys-example-internal-survey-description',
// Possible answer message keys for positive, neutral, and negative
'answers' => QS_ANSWERS_MULTI_CHOICE,
]
],
] + QS_DEFAULTS,
[
// Survey name
'name' => 'internal multi answer example survey',
// Internal or external link survey?
'type' => 'internal',
// Survey question message key
'questions' => [
[
'name' => 'q1',
'layout' => 'multiple-answer',
'question' => 'ext-quicksurveys-example-internal-survey-question',
'answers' => QS_ANSWERS_MULTI_CHOICE,
]
],
] + QS_DEFAULTS,
// Example of an external survey
[
'name' => 'external example survey',
// Internal or external link survey
'type' => 'external',
// Survey question message key
'questions' => [
[
'name' => 'q1',
'question' => 'ext-quicksurveys-example-external-survey-question',
'description' => 'ext-quicksurveys-example-external-survey-description',
'link' => 'ext-quicksurveys-example-external-survey-link',
'instanceTokenParameterName' => 'parameterName',
]
],
] + QS_DEFAULTS,
];
// The following CSS overrides can be used to "vet" changes by forcing Pixel to
// apply additional styles to match expectations.
$wgHooks['BeforePageDisplay'][] = function ( $out ) {
$css = <<<HTML
<style type="text/css">
/* Popup notifications are hidden in visual regression suite as they can appear unpredictably. */
.vector-popup-notification { display: none !important; }
</style>
HTML;
$out->addHTML( $css );
};
// Use production bundle of Vue to silence noisy warnings in console.
$wgVueDevelopmentMode = false;
$wgVectorLanguageAlertInSidebar = [
"logged_in" => true,
"logged_out" => true
];
$wgMFAmcOutreachMinEditCount = 0;
$wgMFAmcOutreach = true;
// Add CSS from the WikimediaMessages repo to the following skins.
$wgWikimediaStylesSkins = [ "vector-2022", "minerva" ];
$wgParserEnableLegacyHeadingDOM = false;
// Campaign events settings
$wgCampaignEventsEnableEventInvitation = true;
$wgCampaignEventsShowEventInvitationSpecialPages = true;
$wgGroupPermissions['user']['campaignevents-enable-registration'] = true;
$wgGroupPermissions['user']['campaignevents-delete-registration'] = true;
$wgGroupPermissions['user']['campaignevents-organize-events'] = true;
$wgGroupPermissions['user']['campaignevents-send-email'] = true;
$wgGroupPermissions['organizer']['campaignevents-enable-registration'] = true;
$wgGroupPermissions['organizer']['campaignevents-delete-registration'] = true;
$wgGroupPermissions['organizer']['campaignevents-organize-events'] = true;
$wgGroupPermissions['organizer']['campaignevents-send-email'] = true;
$wgCampaignEventsEnableEventWikis = true;