Merge "Show password policy flags on Special:PasswordPolicies"
[lhc/web/wiklou.git] / includes / DefaultSettings.php
1 <?php
2 /**
3 * Default values for MediaWiki configuration settings.
4 *
5 *
6 * NEVER EDIT THIS FILE
7 *
8 *
9 * To customize your installation, edit "LocalSettings.php". If you make
10 * changes here, they will be lost on next upgrade of MediaWiki!
11 *
12 * In this file, variables whose default values depend on other
13 * variables are set to false. The actual default value of these variables
14 * will only be set in Setup.php, taking into account any custom settings
15 * performed in LocalSettings.php.
16 *
17 * Documentation is in the source and on:
18 * https://www.mediawiki.org/wiki/Manual:Configuration_settings
19 *
20 * @warning Note: this (and other things) will break if the autoloader is not
21 * enabled. Please include includes/AutoLoader.php before including this file.
22 *
23 * This program is free software; you can redistribute it and/or modify
24 * it under the terms of the GNU General Public License as published by
25 * the Free Software Foundation; either version 2 of the License, or
26 * (at your option) any later version.
27 *
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
32 *
33 * You should have received a copy of the GNU General Public License along
34 * with this program; if not, write to the Free Software Foundation, Inc.,
35 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
36 * http://www.gnu.org/copyleft/gpl.html
37 *
38 * @file
39 */
40 use MediaWiki\MediaWikiServices;
41
42 /**
43 * @cond file_level_code
44 * This is not a valid entry point, perform no further processing unless
45 * MEDIAWIKI is defined
46 */
47 if ( !defined( 'MEDIAWIKI' ) ) {
48 echo "This file is part of MediaWiki and is not a valid entry point\n";
49 die( 1 );
50 }
51
52 /** @endcond */
53
54 /**
55 * wgConf hold the site configuration.
56 * Not used for much in a default install.
57 * @since 1.5
58 */
59 $wgConf = new SiteConfiguration;
60
61 /**
62 * Registry of factory functions to create config objects:
63 * The 'main' key must be set, and the value should be a valid
64 * callable.
65 * @since 1.23
66 */
67 $wgConfigRegistry = [
68 'main' => 'GlobalVarConfig::newInstance'
69 ];
70
71 /**
72 * MediaWiki version number
73 * @since 1.2
74 */
75 $wgVersion = '1.33.0-alpha';
76
77 /**
78 * Name of the site. It must be changed in LocalSettings.php
79 */
80 $wgSitename = 'MediaWiki';
81
82 /**
83 * When the wiki is running behind a proxy and this is set to true, assumes that the proxy exposes
84 * the wiki on the standard ports (443 for https and 80 for http).
85 * @var bool
86 * @since 1.26
87 */
88 $wgAssumeProxiesUseDefaultProtocolPorts = true;
89
90 /**
91 * URL of the server.
92 *
93 * @par Example:
94 * @code
95 * $wgServer = 'http://example.com';
96 * @endcode
97 *
98 * This is usually detected correctly by MediaWiki. If MediaWiki detects the
99 * wrong server, it will redirect incorrectly after you save a page. In that
100 * case, set this variable to fix it.
101 *
102 * If you want to use protocol-relative URLs on your wiki, set this to a
103 * protocol-relative URL like '//example.com' and set $wgCanonicalServer
104 * to a fully qualified URL.
105 */
106 $wgServer = WebRequest::detectServer();
107
108 /**
109 * Canonical URL of the server, to use in IRC feeds and notification e-mails.
110 * Must be fully qualified, even if $wgServer is protocol-relative.
111 *
112 * Defaults to $wgServer, expanded to a fully qualified http:// URL if needed.
113 * @since 1.18
114 */
115 $wgCanonicalServer = false;
116
117 /**
118 * Server name. This is automatically computed by parsing the bare
119 * hostname out of $wgCanonicalServer. It should not be customized.
120 * @since 1.24
121 */
122 $wgServerName = false;
123
124 /************************************************************************//**
125 * @name Script path settings
126 * @{
127 */
128
129 /**
130 * The path we should point to.
131 * It might be a virtual path in case with use apache mod_rewrite for example.
132 *
133 * This *needs* to be set correctly.
134 *
135 * Other paths will be set to defaults based on it unless they are directly
136 * set in LocalSettings.php
137 */
138 $wgScriptPath = '/wiki';
139
140 /**
141 * Whether to support URLs like index.php/Page_title These often break when PHP
142 * is set up in CGI mode. PATH_INFO *may* be correct if cgi.fix_pathinfo is set,
143 * but then again it may not; lighttpd converts incoming path data to lowercase
144 * on systems with case-insensitive filesystems, and there have been reports of
145 * problems on Apache as well.
146 *
147 * To be safe we'll continue to keep it off by default.
148 *
149 * Override this to false if $_SERVER['PATH_INFO'] contains unexpectedly
150 * incorrect garbage, or to true if it is really correct.
151 *
152 * The default $wgArticlePath will be set based on this value at runtime, but if
153 * you have customized it, having this incorrectly set to true can cause
154 * redirect loops when "pretty URLs" are used.
155 * @since 1.2.1
156 */
157 $wgUsePathInfo = ( strpos( PHP_SAPI, 'cgi' ) === false ) &&
158 ( strpos( PHP_SAPI, 'apache2filter' ) === false ) &&
159 ( strpos( PHP_SAPI, 'isapi' ) === false );
160
161 /**@}*/
162
163 /************************************************************************//**
164 * @name URLs and file paths
165 *
166 * These various web and file path variables are set to their defaults
167 * in Setup.php if they are not explicitly set from LocalSettings.php.
168 *
169 * These will relatively rarely need to be set manually, unless you are
170 * splitting style sheets or images outside the main document root.
171 *
172 * In this section, a "path" is usually a host-relative URL, i.e. a URL without
173 * the host part, that starts with a slash. In most cases a full URL is also
174 * acceptable. A "directory" is a local file path.
175 *
176 * In both paths and directories, trailing slashes should not be included.
177 *
178 * @{
179 */
180
181 /**
182 * The URL path to index.php.
183 *
184 * Defaults to "{$wgScriptPath}/index.php".
185 */
186 $wgScript = false;
187
188 /**
189 * The URL path to load.php.
190 *
191 * Defaults to "{$wgScriptPath}/load.php".
192 * @since 1.17
193 */
194 $wgLoadScript = false;
195
196 /**
197 * The URL path of the skins directory.
198 * Defaults to "{$wgResourceBasePath}/skins".
199 * @since 1.3
200 */
201 $wgStylePath = false;
202 $wgStyleSheetPath = &$wgStylePath;
203
204 /**
205 * The URL path of the skins directory. Should not point to an external domain.
206 * Defaults to "{$wgScriptPath}/skins".
207 * @since 1.17
208 */
209 $wgLocalStylePath = false;
210
211 /**
212 * The URL path of the extensions directory.
213 * Defaults to "{$wgResourceBasePath}/extensions".
214 * @since 1.16
215 */
216 $wgExtensionAssetsPath = false;
217
218 /**
219 * Filesystem extensions directory.
220 * Defaults to "{$IP}/extensions".
221 * @since 1.25
222 */
223 $wgExtensionDirectory = "{$IP}/extensions";
224
225 /**
226 * Filesystem stylesheets directory.
227 * Defaults to "{$IP}/skins".
228 * @since 1.3
229 */
230 $wgStyleDirectory = "{$IP}/skins";
231
232 /**
233 * The URL path for primary article page views. This path should contain $1,
234 * which is replaced by the article title.
235 *
236 * Defaults to "{$wgScript}/$1" or "{$wgScript}?title=$1",
237 * depending on $wgUsePathInfo.
238 */
239 $wgArticlePath = false;
240
241 /**
242 * The URL path for the images directory.
243 * Defaults to "{$wgScriptPath}/images".
244 */
245 $wgUploadPath = false;
246
247 /**
248 * The filesystem path of the images directory. Defaults to "{$IP}/images".
249 */
250 $wgUploadDirectory = false;
251
252 /**
253 * Directory where the cached page will be saved.
254 * Defaults to "{$wgUploadDirectory}/cache".
255 */
256 $wgFileCacheDirectory = false;
257
258 /**
259 * The URL path of the wiki logo. The logo size should be 135x135 pixels.
260 * Defaults to "$wgResourceBasePath/resources/assets/wiki.png".
261 */
262 $wgLogo = false;
263
264 /**
265 * Array with URL paths to HD versions of the wiki logo. The scaled logo size
266 * should be under 135x155 pixels.
267 * Only 1.5x and 2x versions are supported.
268 *
269 * @par Example:
270 * @code
271 * $wgLogoHD = [
272 * "1.5x" => "path/to/1.5x_version.png",
273 * "2x" => "path/to/2x_version.png"
274 * ];
275 * @endcode
276 *
277 * SVG is also supported but when enabled, it
278 * disables 1.5x and 2x as svg will already
279 * be optimised for screen resolution.
280 *
281 * @par Example:
282 * @code
283 * $wgLogoHD = [
284 * "svg" => "path/to/svg_version.svg",
285 * ];
286 * @endcode
287 *
288 * @since 1.25
289 */
290 $wgLogoHD = false;
291
292 /**
293 * The URL path of the shortcut icon.
294 * @since 1.6
295 */
296 $wgFavicon = '/favicon.ico';
297
298 /**
299 * The URL path of the icon for iPhone and iPod Touch web app bookmarks.
300 * Defaults to no icon.
301 * @since 1.12
302 */
303 $wgAppleTouchIcon = false;
304
305 /**
306 * Value for the referrer policy meta tag.
307 * One or more of the values defined in the Referrer Policy specification:
308 * https://w3c.github.io/webappsec-referrer-policy/
309 * ('no-referrer', 'no-referrer-when-downgrade', 'same-origin',
310 * 'origin', 'strict-origin', 'origin-when-cross-origin',
311 * 'strict-origin-when-cross-origin', or 'unsafe-url')
312 * Setting it to false prevents the meta tag from being output
313 * (which results in falling back to the Referrer-Policy header,
314 * or 'no-referrer-when-downgrade' if that's not set either.)
315 * Setting it to an array (supported since 1.31) will create a meta tag for
316 * each value, in the reverse of the order (meaning that the first array element
317 * will be the default and the others used as fallbacks for browsers which do not
318 * understand it).
319 *
320 * @var array|string|bool
321 * @since 1.25
322 */
323 $wgReferrerPolicy = false;
324
325 /**
326 * The local filesystem path to a temporary directory. This is not required to
327 * be web accessible.
328 *
329 * When this setting is set to false, its value will be set through a call
330 * to wfTempDir(). See that methods implementation for the actual detection
331 * logic.
332 *
333 * Developers should use the global function wfTempDir() instead of this
334 * variable.
335 *
336 * @see wfTempDir()
337 * @note Default changed to false in MediaWiki 1.20.
338 */
339 $wgTmpDirectory = false;
340
341 /**
342 * If set, this URL is added to the start of $wgUploadPath to form a complete
343 * upload URL.
344 * @since 1.4
345 */
346 $wgUploadBaseUrl = '';
347
348 /**
349 * To enable remote on-demand scaling, set this to the thumbnail base URL.
350 * Full thumbnail URL will be like $wgUploadStashScalerBaseUrl/e/e6/Foo.jpg/123px-Foo.jpg
351 * where 'e6' are the first two characters of the MD5 hash of the file name.
352 * If $wgUploadStashScalerBaseUrl is set to false, thumbs are rendered locally as needed.
353 * @since 1.17
354 */
355 $wgUploadStashScalerBaseUrl = false;
356
357 /**
358 * To set 'pretty' URL paths for actions other than
359 * plain page views, add to this array.
360 *
361 * @par Example:
362 * Set pretty URL for the edit action:
363 * @code
364 * 'edit' => "$wgScriptPath/edit/$1"
365 * @endcode
366 *
367 * There must be an appropriate script or rewrite rule in place to handle these
368 * URLs.
369 * @since 1.5
370 */
371 $wgActionPaths = [];
372
373 /**@}*/
374
375 /************************************************************************//**
376 * @name Files and file uploads
377 * @{
378 */
379
380 /**
381 * Allow users to upload files.
382 *
383 * Use $wgLocalFileRepo to control how and where uploads are stored.
384 * Disabled by default as for security reasons.
385 * See <https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads>.
386 *
387 * @since 1.5
388 */
389 $wgEnableUploads = false;
390
391 /**
392 * The maximum age of temporary (incomplete) uploaded files
393 */
394 $wgUploadStashMaxAge = 6 * 3600; // 6 hours
395
396 /**
397 * Allows to move images and other media files
398 */
399 $wgAllowImageMoving = true;
400
401 /**
402 * Enable deferred upload tasks that use the job queue.
403 * Only enable this if job runners are set up for both the
404 * 'AssembleUploadChunks' and 'PublishStashedFile' job types.
405 *
406 * @note If you use suhosin, this setting is incompatible with
407 * suhosin.session.encrypt.
408 */
409 $wgEnableAsyncUploads = false;
410
411 /**
412 * Additional characters that are not allowed in filenames. They are replaced with '-' when
413 * uploading. Like $wgLegalTitleChars, this is a regexp character class.
414 *
415 * Slashes and backslashes are disallowed regardless of this setting, but included here for
416 * completeness.
417 */
418 $wgIllegalFileChars = ":\\/\\\\";
419
420 /**
421 * What directory to place deleted uploads in.
422 * Defaults to "{$wgUploadDirectory}/deleted".
423 */
424 $wgDeletedDirectory = false;
425
426 /**
427 * Set this to true if you use img_auth and want the user to see details on why access failed.
428 */
429 $wgImgAuthDetails = false;
430
431 /**
432 * Map of relative URL directories to match to internal mwstore:// base storage paths.
433 * For img_auth.php requests, everything after "img_auth.php/" is checked to see
434 * if starts with any of the prefixes defined here. The prefixes should not overlap.
435 * The prefix that matches has a corresponding storage path, which the rest of the URL
436 * is assumed to be relative to. The file at that path (or a 404) is send to the client.
437 *
438 * Example:
439 * $wgImgAuthUrlPathMap['/timeline/'] = 'mwstore://local-fs/timeline-render/';
440 * The above maps ".../img_auth.php/timeline/X" to "mwstore://local-fs/timeline-render/".
441 * The name "local-fs" should correspond by name to an entry in $wgFileBackends.
442 *
443 * @see $wgFileBackends
444 */
445 $wgImgAuthUrlPathMap = [];
446
447 /**
448 * File repository structures
449 *
450 * $wgLocalFileRepo is a single repository structure, and $wgForeignFileRepos is
451 * an array of such structures. Each repository structure is an associative
452 * array of properties configuring the repository.
453 *
454 * Properties required for all repos:
455 * - class The class name for the repository. May come from the core or an extension.
456 * The core repository classes are FileRepo, LocalRepo, ForeignDBRepo.
457 *
458 * - name A unique name for the repository (but $wgLocalFileRepo should be 'local').
459 * The name should consist of alpha-numeric characters.
460 * - backend A file backend name (see $wgFileBackends).
461 *
462 * For most core repos:
463 * - zones Associative array of zone names that each map to an array with:
464 * container : backend container name the zone is in
465 * directory : root path within container for the zone
466 * url : base URL to the root of the zone
467 * urlsByExt : map of file extension types to base URLs
468 * (useful for using a different cache for videos)
469 * Zones default to using "<repo name>-<zone name>" as the container name
470 * and default to using the container root as the zone's root directory.
471 * Nesting of zone locations within other zones should be avoided.
472 * - url Public zone URL. The 'zones' settings take precedence.
473 * - hashLevels The number of directory levels for hash-based division of files
474 * - thumbScriptUrl The URL for thumb.php (optional, not recommended)
475 * - transformVia404 Whether to skip media file transformation on parse and rely on a 404
476 * handler instead.
477 * - initialCapital Equivalent to $wgCapitalLinks (or $wgCapitalLinkOverrides[NS_FILE],
478 * determines whether filenames implicitly start with a capital letter.
479 * The current implementation may give incorrect description page links
480 * when the local $wgCapitalLinks and initialCapital are mismatched.
481 * - pathDisclosureProtection
482 * May be 'paranoid' to remove all parameters from error messages, 'none' to
483 * leave the paths in unchanged, or 'simple' to replace paths with
484 * placeholders. Default for LocalRepo is 'simple'.
485 * - fileMode This allows wikis to set the file mode when uploading/moving files. Default
486 * is 0644.
487 * - directory The local filesystem directory where public files are stored. Not used for
488 * some remote repos.
489 * - thumbDir The base thumbnail directory. Defaults to "<directory>/thumb".
490 * - thumbUrl The base thumbnail URL. Defaults to "<url>/thumb".
491 * - isPrivate Set this if measures should always be taken to keep the files private.
492 * One should not trust this to assure that the files are not web readable;
493 * the server configuration should be done manually depending on the backend.
494 *
495 * These settings describe a foreign MediaWiki installation. They are optional, and will be ignored
496 * for local repositories:
497 * - descBaseUrl URL of image description pages, e.g. https://en.wikipedia.org/wiki/File:
498 * - scriptDirUrl URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g.
499 * https://en.wikipedia.org/w
500 * - articleUrl Equivalent to $wgArticlePath, e.g. https://en.wikipedia.org/wiki/$1
501 * - fetchDescription Fetch the text of the remote file description page and display them
502 * on the local wiki.
503 * - abbrvThreshold File names over this size will use the short form of thumbnail names.
504 * Short thumbnail names only have the width, parameters, and the extension.
505 *
506 * ForeignDBRepo:
507 * - dbType, dbServer, dbUser, dbPassword, dbName, dbFlags
508 * equivalent to the corresponding member of $wgDBservers
509 * - tablePrefix Table prefix, the foreign wiki's $wgDBprefix
510 * - hasSharedCache Set to true if the foreign wiki's $wgMainCacheType is identical to,
511 * and accesible from, this wiki.
512 *
513 * ForeignAPIRepo:
514 * - apibase Use for the foreign API's URL
515 * - apiThumbCacheExpiry How long to locally cache thumbs for
516 *
517 * If you leave $wgLocalFileRepo set to false, Setup will fill in appropriate values.
518 * Otherwise, set $wgLocalFileRepo to a repository structure as described above.
519 * If you set $wgUseInstantCommons to true, it will add an entry for Commons.
520 * If you set $wgForeignFileRepos to an array of repository structures, those will
521 * be searched after the local file repo.
522 * Otherwise, you will only have access to local media files.
523 *
524 * @see Setup.php for an example usage and default initialization.
525 */
526 $wgLocalFileRepo = false;
527
528 /**
529 * Enable the use of files from one or more other wikis.
530 *
531 * If you operate multiple wikis, you can declare a shared upload path here.
532 * Uploads to the local wiki will NOT be stored here - See $wgLocalFileRepo
533 * and $wgUploadDirectory for that.
534 *
535 * The wiki will only consider the foreign repository if no file of the given name
536 * is found in the local repository (e.g. via `[[File:..]]` syntax).
537 *
538 * @since 1.11
539 * @see $wgLocalFileRepo
540 */
541 $wgForeignFileRepos = [];
542
543 /**
544 * Use Wikimedia Commons as a foreign file repository.
545 *
546 * This is a shortcut for adding an entry to to $wgForeignFileRepos
547 * for https://commons.wikimedia.org, using ForeignAPIRepo with the
548 * default settings.
549 *
550 * @since 1.16
551 */
552 $wgUseInstantCommons = false;
553
554 /**
555 * Shortcut for adding an entry to $wgForeignFileRepos.
556 *
557 * Uses the folowing variables:
558 *
559 * - directory: $wgSharedUploadDirectory.
560 * - url: $wgSharedUploadPath.
561 * - hashLevels: Based on $wgHashedSharedUploadDirectory.
562 * - thumbScriptUrl: $wgSharedThumbnailScriptPath.
563 * - transformVia404: Based on $wgGenerateThumbnailOnParse.
564 * - descBaseUrl: $wgRepositoryBaseUrl.
565 * - fetchDescription: $wgFetchCommonsDescriptions.
566 *
567 * If $wgSharedUploadDBname is set, it uses the ForeignDBRepo
568 * class, with also the following variables:
569 *
570 * - dbName: $wgSharedUploadDBname.
571 * - dbType: $wgDBtype.
572 * - dbServer: $wgDBserver.
573 * - dbUser: $wgDBuser.
574 * - dbPassword: $wgDBpassword.
575 * - dbFlags: Based on $wgDebugDumpSql.
576 * - tablePrefix: $wgSharedUploadDBprefix,
577 * - hasSharedCache: $wgCacheSharedUploads.
578 *
579 * @var bool
580 * @since 1.3
581 */
582 $wgUseSharedUploads = false;
583
584 /**
585 * Shortcut for the 'directory' setting of $wgForeignFileRepos.
586 * Only used if $wgUseSharedUploads is enabled.
587 *
588 * @var string
589 * @since 1.3
590 */
591 $wgSharedUploadDirectory = null;
592
593 /**
594 * Shortcut for the 'url' setting of $wgForeignFileRepos.
595 * Only used if $wgUseSharedUploads is enabled.
596 *
597 * @var string
598 * @since 1.3
599 */
600 $wgSharedUploadPath = null;
601
602 /**
603 * Shortcut for the 'hashLevels' setting of $wgForeignFileRepos.
604 * Only used if $wgUseSharedUploads is enabled.
605 *
606 * @var bool
607 * @since 1.3
608 */
609 $wgHashedSharedUploadDirectory = true;
610
611 /**
612 * Shortcut for the 'descBaseUrl' setting of $wgForeignFileRepos.
613 * Only used if $wgUseSharedUploads is enabled.
614 *
615 * @since 1.5
616 */
617 $wgRepositoryBaseUrl = 'https://commons.wikimedia.org/wiki/File:';
618
619 /**
620 * Shortcut for the 'fetchDescription' setting of $wgForeignFileRepos.
621 * Only used if $wgUseSharedUploads is enabled.
622 *
623 * @var bool
624 * @since 1.5
625 */
626 $wgFetchCommonsDescriptions = false;
627
628 /**
629 * Shortcut for the ForeignDBRepo 'dbName' setting in $wgForeignFileRepos.
630 * Set this to false if the uploads do not come from a wiki.
631 * Only used if $wgUseSharedUploads is enabled.
632 *
633 * @var bool|string
634 * @since 1.4
635 */
636 $wgSharedUploadDBname = false;
637
638 /**
639 * Shortcut for the ForeignDBRepo 'tablePrefix' setting in $wgForeignFileRepos.
640 * Only used if $wgUseSharedUploads is enabled.
641 *
642 * @var string
643 * @since 1.5
644 */
645 $wgSharedUploadDBprefix = '';
646
647 /**
648 * Shortcut for the ForeignDBRepo 'hasSharedCache' setting in $wgForeignFileRepos.
649 * Only used if $wgUseSharedUploads is enabled.
650 *
651 * @var bool
652 * @since 1.5
653 */
654 $wgCacheSharedUploads = true;
655
656 /**
657 * Array of foreign file repo names (set in $wgForeignFileRepos above) that
658 * are allowable upload targets. These wikis must have some method of
659 * authentication (i.e. CentralAuth), and be CORS-enabled for this wiki.
660 * The string 'local' signifies the default local file repository.
661 *
662 * Example:
663 * $wgForeignUploadTargets = [ 'shared' ];
664 */
665 $wgForeignUploadTargets = [ 'local' ];
666
667 /**
668 * Configuration for file uploads using the embeddable upload dialog
669 * (https://www.mediawiki.org/wiki/Upload_dialog).
670 *
671 * This applies also to foreign uploads to this wiki (the configuration is loaded by remote wikis
672 * using the action=query&meta=siteinfo API).
673 *
674 * See below for documentation of each property. None of the properties may be omitted.
675 */
676 $wgUploadDialog = [
677 // Fields to make available in the dialog. `true` means that this field is visible, `false` means
678 // that it is hidden. The "Name" field can't be hidden. Note that you also have to add the
679 // matching replacement to the 'filepage' format key below to make use of these.
680 'fields' => [
681 'description' => true,
682 'date' => false,
683 'categories' => false,
684 ],
685 // Suffix of localisation messages used to describe the license under which the uploaded file will
686 // be released. The same value may be set for both 'local' and 'foreign' uploads.
687 'licensemessages' => [
688 // The 'local' messages are used for local uploads on this wiki:
689 // * upload-form-label-own-work-message-generic-local
690 // * upload-form-label-not-own-work-message-generic-local
691 // * upload-form-label-not-own-work-local-generic-local
692 'local' => 'generic-local',
693 // The 'foreign' messages are used for cross-wiki uploads from other wikis to this wiki:
694 // * upload-form-label-own-work-message-generic-foreign
695 // * upload-form-label-not-own-work-message-generic-foreign
696 // * upload-form-label-not-own-work-local-generic-foreign
697 'foreign' => 'generic-foreign',
698 ],
699 // Upload comments to use for 'local' and 'foreign' uploads. This can also be set to a single
700 // string value, in which case it is used for both kinds of uploads. Available replacements:
701 // * $HOST - domain name from which a cross-wiki upload originates
702 // * $PAGENAME - wiki page name from which an upload originates
703 'comment' => [
704 'local' => '',
705 'foreign' => '',
706 ],
707 // Format of the file page wikitext to be generated from the fields input by the user.
708 'format' => [
709 // Wrapper for the whole page. Available replacements:
710 // * $DESCRIPTION - file description, as input by the user (only if the 'description' field is
711 // enabled), wrapped as defined below in the 'description' key
712 // * $DATE - file creation date, as input by the user (only if the 'date' field is enabled)
713 // * $SOURCE - as defined below in the 'ownwork' key, may be extended in the future
714 // * $AUTHOR - linked user name, may be extended in the future
715 // * $LICENSE - as defined below in the 'license' key, may be extended in the future
716 // * $CATEGORIES - file categories wikitext, as input by the user (only if the 'categories'
717 // field is enabled), or if no input, as defined below in the 'uncategorized' key
718 'filepage' => '$DESCRIPTION',
719 // Wrapped for file description. Available replacements:
720 // * $LANGUAGE - source wiki's content language
721 // * $TEXT - input by the user
722 'description' => '$TEXT',
723 'ownwork' => '',
724 'license' => '',
725 'uncategorized' => '',
726 ],
727 ];
728
729 /**
730 * File backend structure configuration.
731 *
732 * This is an array of file backend configuration arrays.
733 * Each backend configuration has the following parameters:
734 * - 'name' : A unique name for the backend
735 * - 'class' : The file backend class to use
736 * - 'wikiId' : A unique string that identifies the wiki (container prefix)
737 * - 'lockManager' : The name of a lock manager (see $wgLockManagers)
738 *
739 * See FileBackend::__construct() for more details.
740 * Additional parameters are specific to the file backend class used.
741 * These settings should be global to all wikis when possible.
742 *
743 * FileBackendMultiWrite::__construct() is augmented with a 'template' option that
744 * can be used in any of the values of the 'backends' array. Its value is the name of
745 * another backend in $wgFileBackends. When set, it pre-fills the array with all of the
746 * configuration of the named backend. Explicitly set values in the array take precedence.
747 *
748 * There are two particularly important aspects about each backend:
749 * - a) Whether it is fully qualified or wiki-relative.
750 * By default, the paths of files are relative to the current wiki,
751 * which works via prefixing them with the current wiki ID when accessed.
752 * Setting 'wikiId' forces the backend to be fully qualified by prefixing
753 * all paths with the specified value instead. This can be useful if
754 * multiple wikis need to share the same data. Note that 'name' is *not*
755 * part of any prefix and thus should not be relied upon for namespacing.
756 * - b) Whether it is only defined for some wikis or is defined on all
757 * wikis in the wiki farm. Defining a backend globally is useful
758 * if multiple wikis need to share the same data.
759 * One should be aware of these aspects when configuring a backend for use with
760 * any basic feature or plugin. For example, suppose an extension stores data for
761 * different wikis in different directories and sometimes needs to access data from
762 * a foreign wiki's directory in order to render a page on given wiki. The extension
763 * would need a fully qualified backend that is defined on all wikis in the wiki farm.
764 */
765 $wgFileBackends = [];
766
767 /**
768 * Array of configuration arrays for each lock manager.
769 * Each backend configuration has the following parameters:
770 * - 'name' : A unique name for the lock manager
771 * - 'class' : The lock manger class to use
772 *
773 * See LockManager::__construct() for more details.
774 * Additional parameters are specific to the lock manager class used.
775 * These settings should be global to all wikis.
776 *
777 * When using DBLockManager, the 'dbsByBucket' map can reference 'localDBMaster' as
778 * a peer database in each bucket. This will result in an extra connection to the domain
779 * that the LockManager services, which must also be a valid wiki ID.
780 */
781 $wgLockManagers = [];
782
783 /**
784 * Show Exif data, on by default if available.
785 * Requires PHP's Exif extension: https://secure.php.net/manual/en/ref.exif.php
786 *
787 * @note FOR WINDOWS USERS:
788 * To enable Exif functions, add the following line to the "Windows
789 * extensions" section of php.ini:
790 * @code{.ini}
791 * extension=extensions/php_exif.dll
792 * @endcode
793 */
794 $wgShowEXIF = function_exists( 'exif_read_data' );
795
796 /**
797 * If to automatically update the img_metadata field
798 * if the metadata field is outdated but compatible with the current version.
799 * Defaults to false.
800 */
801 $wgUpdateCompatibleMetadata = false;
802
803 /**
804 * Allow for upload to be copied from an URL.
805 * The timeout for copy uploads is set by $wgCopyUploadTimeout.
806 * You have to assign the user right 'upload_by_url' to a user group, to use this.
807 */
808 $wgAllowCopyUploads = false;
809
810 /**
811 * A list of domains copy uploads can come from
812 *
813 * @since 1.20
814 */
815 $wgCopyUploadsDomains = [];
816
817 /**
818 * Enable copy uploads from Special:Upload. $wgAllowCopyUploads must also be
819 * true. If $wgAllowCopyUploads is true, but this is false, you will only be
820 * able to perform copy uploads from the API or extensions (e.g. UploadWizard).
821 */
822 $wgCopyUploadsFromSpecialUpload = false;
823
824 /**
825 * Proxy to use for copy upload requests.
826 * @since 1.20
827 */
828 $wgCopyUploadProxy = false;
829
830 /**
831 * Different timeout for upload by url
832 * This could be useful since when fetching large files, you may want a
833 * timeout longer than the default $wgHTTPTimeout. False means fallback
834 * to default.
835 *
836 * @var int|bool
837 *
838 * @since 1.22
839 */
840 $wgCopyUploadTimeout = false;
841
842 /**
843 * Max size for uploads, in bytes. If not set to an array, applies to all
844 * uploads. If set to an array, per upload type maximums can be set, using the
845 * file and url keys. If the * key is set this value will be used as maximum
846 * for non-specified types.
847 *
848 * @par Example:
849 * @code
850 * $wgMaxUploadSize = [
851 * '*' => 250 * 1024,
852 * 'url' => 500 * 1024,
853 * ];
854 * @endcode
855 * Sets the maximum for all uploads to 250 kB except for upload-by-url, which
856 * will have a maximum of 500 kB.
857 */
858 $wgMaxUploadSize = 1024 * 1024 * 100; # 100MB
859
860 /**
861 * Minimum upload chunk size, in bytes. When using chunked upload, non-final
862 * chunks smaller than this will be rejected. May be reduced based on the
863 * 'upload_max_filesize' or 'post_max_size' PHP settings.
864 * @since 1.26
865 */
866 $wgMinUploadChunkSize = 1024; # 1KB
867
868 /**
869 * Point the upload navigation link to an external URL
870 * Useful if you want to use a shared repository by default
871 * without disabling local uploads (use $wgEnableUploads = false for that).
872 *
873 * @par Example:
874 * @code
875 * $wgUploadNavigationUrl = 'https://commons.wikimedia.org/wiki/Special:Upload';
876 * @endcode
877 */
878 $wgUploadNavigationUrl = false;
879
880 /**
881 * Point the upload link for missing files to an external URL, as with
882 * $wgUploadNavigationUrl. The URL will get "(?|&)wpDestFile=<filename>"
883 * appended to it as appropriate.
884 */
885 $wgUploadMissingFileUrl = false;
886
887 /**
888 * Give a path here to use thumb.php for thumbnail generation on client
889 * request, instead of generating them on render and outputting a static URL.
890 * This is necessary if some of your apache servers don't have read/write
891 * access to the thumbnail path.
892 *
893 * @par Example:
894 * @code
895 * $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
896 * @endcode
897 */
898 $wgThumbnailScriptPath = false;
899
900 /**
901 * Shortcut for the 'thumbScriptUrl' setting of $wgForeignFileRepos.
902 * Only used if $wgUseSharedUploads is enabled.
903 *
904 * @var string
905 * @since 1.3
906 */
907 $wgSharedThumbnailScriptPath = false;
908
909 /**
910 * Set this to false if you do not want MediaWiki to divide your images
911 * directory into many subdirectories, for improved performance.
912 *
913 * It's almost always good to leave this enabled. In previous versions of
914 * MediaWiki, some users set this to false to allow images to be added to the
915 * wiki by simply copying them into $wgUploadDirectory and then running
916 * maintenance/rebuildImages.php to register them in the database. This is no
917 * longer recommended, use maintenance/importImages.php instead.
918 *
919 * @note That this variable may be ignored if $wgLocalFileRepo is set.
920 * @todo Deprecate the setting and ultimately remove it from Core.
921 */
922 $wgHashedUploadDirectory = true;
923
924 /**
925 * This is the list of preferred extensions for uploading files. Uploading files
926 * with extensions not in this list will trigger a warning.
927 *
928 * @warning If you add any OpenOffice or Microsoft Office file formats here,
929 * such as odt or doc, and untrusted users are allowed to upload files, then
930 * your wiki will be vulnerable to cross-site request forgery (CSRF).
931 */
932 $wgFileExtensions = [ 'png', 'gif', 'jpg', 'jpeg', 'webp' ];
933
934 /**
935 * Files with these extensions will never be allowed as uploads.
936 * An array of file extensions to blacklist. You should append to this array
937 * if you want to blacklist additional files.
938 */
939 $wgFileBlacklist = [
940 # HTML may contain cookie-stealing JavaScript and web bugs
941 'html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht',
942 # PHP scripts may execute arbitrary code on the server
943 'php', 'phtml', 'php3', 'php4', 'php5', 'phps', 'phar',
944 # Other types that may be interpreted by some servers
945 'shtml', 'jhtml', 'pl', 'py', 'cgi',
946 # May contain harmful executables for Windows victims
947 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' ];
948
949 /**
950 * Files with these MIME types will never be allowed as uploads
951 * if $wgVerifyMimeType is enabled.
952 */
953 $wgMimeTypeBlacklist = [
954 # HTML may contain cookie-stealing JavaScript and web bugs
955 'text/html', 'text/javascript', 'text/x-javascript', 'application/x-shellscript',
956 # PHP scripts may execute arbitrary code on the server
957 'application/x-php', 'text/x-php',
958 # Other types that may be interpreted by some servers
959 'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh',
960 # Client-side hazards on Internet Explorer
961 'text/scriptlet', 'application/x-msdownload',
962 # Windows metafile, client-side vulnerability on some systems
963 'application/x-msmetafile',
964 ];
965
966 /**
967 * Allow Java archive uploads.
968 * This is not recommended for public wikis since a maliciously-constructed
969 * applet running on the same domain as the wiki can steal the user's cookies.
970 */
971 $wgAllowJavaUploads = false;
972
973 /**
974 * This is a flag to determine whether or not to check file extensions on upload.
975 *
976 * @warning Setting this to false is insecure for public wikis.
977 */
978 $wgCheckFileExtensions = true;
979
980 /**
981 * If this is turned off, users may override the warning for files not covered
982 * by $wgFileExtensions.
983 *
984 * @warning Setting this to false is insecure for public wikis.
985 */
986 $wgStrictFileExtensions = true;
987
988 /**
989 * Setting this to true will disable the upload system's checks for HTML/JavaScript.
990 *
991 * @warning THIS IS VERY DANGEROUS on a publicly editable site, so USE
992 * $wgGroupPermissions TO RESTRICT UPLOADING to only those that you trust
993 */
994 $wgDisableUploadScriptChecks = false;
995
996 /**
997 * Warn if uploaded files are larger than this (in bytes), or false to disable
998 */
999 $wgUploadSizeWarning = false;
1000
1001 /**
1002 * list of trusted media-types and MIME types.
1003 * Use the MEDIATYPE_xxx constants to represent media types.
1004 * This list is used by File::isSafeFile
1005 *
1006 * Types not listed here will have a warning about unsafe content
1007 * displayed on the images description page. It would also be possible
1008 * to use this for further restrictions, like disabling direct
1009 * [[media:...]] links for non-trusted formats.
1010 */
1011 $wgTrustedMediaFormats = [
1012 MEDIATYPE_BITMAP, // all bitmap formats
1013 MEDIATYPE_AUDIO, // all audio formats
1014 MEDIATYPE_VIDEO, // all plain video formats
1015 "image/svg+xml", // svg (only needed if inline rendering of svg is not supported)
1016 "application/pdf", // PDF files
1017 # "application/x-shockwave-flash", //flash/shockwave movie
1018 ];
1019
1020 /**
1021 * Plugins for media file type handling.
1022 * Each entry in the array maps a MIME type to a class name
1023 *
1024 * Core media handlers are listed in MediaHandlerFactory,
1025 * and extensions should use extension.json.
1026 */
1027 $wgMediaHandlers = [];
1028
1029 /**
1030 * Media handler overrides for parser tests (they don't need to generate actual
1031 * thumbnails, so a mock will do)
1032 */
1033 $wgParserTestMediaHandlers = [
1034 'image/jpeg' => 'MockBitmapHandler',
1035 'image/png' => 'MockBitmapHandler',
1036 'image/gif' => 'MockBitmapHandler',
1037 'image/tiff' => 'MockBitmapHandler',
1038 'image/webp' => 'MockBitmapHandler',
1039 'image/x-ms-bmp' => 'MockBitmapHandler',
1040 'image/x-bmp' => 'MockBitmapHandler',
1041 'image/x-xcf' => 'MockBitmapHandler',
1042 'image/svg+xml' => 'MockSvgHandler',
1043 'image/vnd.djvu' => 'MockDjVuHandler',
1044 ];
1045
1046 /**
1047 * Plugins for page content model handling.
1048 * Each entry in the array maps a model id to a class name or callback
1049 * that creates an instance of the appropriate ContentHandler subclass.
1050 *
1051 * @since 1.21
1052 */
1053 $wgContentHandlers = [
1054 // the usual case
1055 CONTENT_MODEL_WIKITEXT => WikitextContentHandler::class,
1056 // dumb version, no syntax highlighting
1057 CONTENT_MODEL_JAVASCRIPT => JavaScriptContentHandler::class,
1058 // simple implementation, for use by extensions, etc.
1059 CONTENT_MODEL_JSON => JsonContentHandler::class,
1060 // dumb version, no syntax highlighting
1061 CONTENT_MODEL_CSS => CssContentHandler::class,
1062 // plain text, for use by extensions, etc.
1063 CONTENT_MODEL_TEXT => TextContentHandler::class,
1064 ];
1065
1066 /**
1067 * Whether to enable server-side image thumbnailing. If false, images will
1068 * always be sent to the client in full resolution, with appropriate width= and
1069 * height= attributes on the <img> tag for the client to do its own scaling.
1070 */
1071 $wgUseImageResize = true;
1072
1073 /**
1074 * Resizing can be done using PHP's internal image libraries or using
1075 * ImageMagick or another third-party converter, e.g. GraphicMagick.
1076 * These support more file formats than PHP, which only supports PNG,
1077 * GIF, JPG, XBM and WBMP.
1078 *
1079 * Use Image Magick instead of PHP builtin functions.
1080 */
1081 $wgUseImageMagick = false;
1082
1083 /**
1084 * The convert command shipped with ImageMagick
1085 */
1086 $wgImageMagickConvertCommand = '/usr/bin/convert';
1087
1088 /**
1089 * Array of max pixel areas for interlacing per MIME type
1090 * @since 1.27
1091 */
1092 $wgMaxInterlacingAreas = [];
1093
1094 /**
1095 * Sharpening parameter to ImageMagick
1096 */
1097 $wgSharpenParameter = '0x0.4';
1098
1099 /**
1100 * Reduction in linear dimensions below which sharpening will be enabled
1101 */
1102 $wgSharpenReductionThreshold = 0.85;
1103
1104 /**
1105 * Temporary directory used for ImageMagick. The directory must exist. Leave
1106 * this set to false to let ImageMagick decide for itself.
1107 */
1108 $wgImageMagickTempDir = false;
1109
1110 /**
1111 * Use another resizing converter, e.g. GraphicMagick
1112 * %s will be replaced with the source path, %d with the destination
1113 * %w and %h will be replaced with the width and height.
1114 *
1115 * @par Example for GraphicMagick:
1116 * @code
1117 * $wgCustomConvertCommand = "gm convert %s -resize %wx%h %d"
1118 * @endcode
1119 *
1120 * Leave as false to skip this.
1121 */
1122 $wgCustomConvertCommand = false;
1123
1124 /**
1125 * used for lossless jpeg rotation
1126 *
1127 * @since 1.21
1128 */
1129 $wgJpegTran = '/usr/bin/jpegtran';
1130
1131 /**
1132 * At default setting of 'yuv420', JPEG thumbnails will use 4:2:0 chroma
1133 * subsampling to reduce file size, at the cost of possible color fringing
1134 * at sharp edges.
1135 *
1136 * See https://en.wikipedia.org/wiki/Chroma_subsampling
1137 *
1138 * Supported values:
1139 * false - use scaling system's default (same as pre-1.27 behavior)
1140 * 'yuv444' - luma and chroma at same resolution
1141 * 'yuv422' - chroma at 1/2 resolution horizontally, full vertically
1142 * 'yuv420' - chroma at 1/2 resolution in both dimensions
1143 *
1144 * This setting is currently supported only for the ImageMagick backend;
1145 * others may default to 4:2:0 or 4:4:4 or maintaining the source file's
1146 * sampling in the thumbnail.
1147 *
1148 * @since 1.27
1149 */
1150 $wgJpegPixelFormat = 'yuv420';
1151
1152 /**
1153 * When scaling a JPEG thumbnail, this is the quality we request
1154 * from the backend. It should be an int between 1 and 100,
1155 * with 100 indicating 100% quality.
1156 *
1157 * @since 1.32
1158 */
1159 $wgJpegQuality = 80;
1160
1161 /**
1162 * Some tests and extensions use exiv2 to manipulate the Exif metadata in some
1163 * image formats.
1164 */
1165 $wgExiv2Command = '/usr/bin/exiv2';
1166
1167 /**
1168 * Path to exiftool binary. Used for lossless ICC profile swapping.
1169 *
1170 * @since 1.26
1171 */
1172 $wgExiftool = '/usr/bin/exiftool';
1173
1174 /**
1175 * Scalable Vector Graphics (SVG) may be uploaded as images.
1176 * Since SVG support is not yet standard in browsers, it is
1177 * necessary to rasterize SVGs to PNG as a fallback format.
1178 *
1179 * An external program is required to perform this conversion.
1180 * If set to an array, the first item is a PHP callable and any further items
1181 * are passed as parameters after $srcPath, $dstPath, $width, $height
1182 */
1183 $wgSVGConverters = [
1184 'ImageMagick' =>
1185 '$path/convert -background "#ffffff00" -thumbnail $widthx$height\! $input PNG:$output',
1186 'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
1187 'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
1188 'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d '
1189 . '$output $input',
1190 'rsvg' => '$path/rsvg-convert -w $width -h $height -o $output $input',
1191 'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
1192 'ImagickExt' => [ 'SvgHandler::rasterizeImagickExt' ],
1193 ];
1194
1195 /**
1196 * Pick a converter defined in $wgSVGConverters
1197 */
1198 $wgSVGConverter = 'ImageMagick';
1199
1200 /**
1201 * If not in the executable PATH, specify the SVG converter path.
1202 */
1203 $wgSVGConverterPath = '';
1204
1205 /**
1206 * Don't scale a SVG larger than this
1207 */
1208 $wgSVGMaxSize = 5120;
1209
1210 /**
1211 * Don't read SVG metadata beyond this point.
1212 * Default is 1024*256 bytes
1213 */
1214 $wgSVGMetadataCutoff = 262144;
1215
1216 /**
1217 * Disallow <title> element in SVG files.
1218 *
1219 * MediaWiki will reject HTMLesque tags in uploaded files due to idiotic
1220 * browsers which can not perform basic stuff like MIME detection and which are
1221 * vulnerable to further idiots uploading crap files as images.
1222 *
1223 * When this directive is on, "<title>" will be allowed in files with an
1224 * "image/svg+xml" MIME type. You should leave this disabled if your web server
1225 * is misconfigured and doesn't send appropriate MIME types for SVG images.
1226 */
1227 $wgAllowTitlesInSVG = false;
1228
1229 /**
1230 * Whether thumbnails should be generated in target language (usually, same as
1231 * page language), if available.
1232 * Currently, applies only to SVG images that use the systemLanguage attribute
1233 * to specify text language.
1234 *
1235 * @since 1.33
1236 */
1237 $wgMediaInTargetLanguage = true;
1238
1239 /**
1240 * The maximum number of pixels a source image can have if it is to be scaled
1241 * down by a scaler that requires the full source image to be decompressed
1242 * and stored in decompressed form, before the thumbnail is generated.
1243 *
1244 * This provides a limit on memory usage for the decompression side of the
1245 * image scaler. The limit is used when scaling PNGs with any of the
1246 * built-in image scalers, such as ImageMagick or GD. It is ignored for
1247 * JPEGs with ImageMagick, and when using the VipsScaler extension.
1248 *
1249 * The default is 50 MB if decompressed to RGBA form, which corresponds to
1250 * 12.5 million pixels or 3500x3500.
1251 */
1252 $wgMaxImageArea = 1.25e7;
1253
1254 /**
1255 * Force thumbnailing of animated GIFs above this size to a single
1256 * frame instead of an animated thumbnail. As of MW 1.17 this limit
1257 * is checked against the total size of all frames in the animation.
1258 * It probably makes sense to keep this equal to $wgMaxImageArea.
1259 */
1260 $wgMaxAnimatedGifArea = 1.25e7;
1261
1262 /**
1263 * Browsers don't support TIFF inline generally...
1264 * For inline display, we need to convert to PNG or JPEG.
1265 * Note scaling should work with ImageMagick, but may not with GD scaling.
1266 *
1267 * @par Example:
1268 * @code
1269 * // PNG is lossless, but inefficient for photos
1270 * $wgTiffThumbnailType = [ 'png', 'image/png' ];
1271 * // JPEG is good for photos, but has no transparency support. Bad for diagrams.
1272 * $wgTiffThumbnailType = [ 'jpg', 'image/jpeg' ];
1273 * @endcode
1274 */
1275 $wgTiffThumbnailType = false;
1276
1277 /**
1278 * If rendered thumbnail files are older than this timestamp, they
1279 * will be rerendered on demand as if the file didn't already exist.
1280 * Update if there is some need to force thumbs and SVG rasterizations
1281 * to rerender, such as fixes to rendering bugs.
1282 */
1283 $wgThumbnailEpoch = '20030516000000';
1284
1285 /**
1286 * Certain operations are avoided if there were too many recent failures,
1287 * for example, thumbnail generation. Bump this value to invalidate all
1288 * memory of failed operations and thus allow further attempts to resume.
1289 * This is useful when a cause for the failures has been found and fixed.
1290 */
1291 $wgAttemptFailureEpoch = 1;
1292
1293 /**
1294 * If set, inline scaled images will still produce "<img>" tags ready for
1295 * output instead of showing an error message.
1296 *
1297 * This may be useful if errors are transitory, especially if the site
1298 * is configured to automatically render thumbnails on request.
1299 *
1300 * On the other hand, it may obscure error conditions from debugging.
1301 * Enable the debug log or the 'thumbnail' log group to make sure errors
1302 * are logged to a file for review.
1303 */
1304 $wgIgnoreImageErrors = false;
1305
1306 /**
1307 * Allow thumbnail rendering on page view. If this is false, a valid
1308 * thumbnail URL is still output, but no file will be created at
1309 * the target location. This may save some time if you have a
1310 * thumb.php or 404 handler set up which is faster than the regular
1311 * webserver(s).
1312 */
1313 $wgGenerateThumbnailOnParse = true;
1314
1315 /**
1316 * Show thumbnails for old images on the image description page
1317 */
1318 $wgShowArchiveThumbnails = true;
1319
1320 /**
1321 * If set to true, images that contain certain the exif orientation tag will
1322 * be rotated accordingly. If set to null, try to auto-detect whether a scaler
1323 * is available that can rotate.
1324 */
1325 $wgEnableAutoRotation = null;
1326
1327 /**
1328 * Internal name of virus scanner. This serves as a key to the
1329 * $wgAntivirusSetup array. Set this to NULL to disable virus scanning. If not
1330 * null, every file uploaded will be scanned for viruses.
1331 */
1332 $wgAntivirus = null;
1333
1334 /**
1335 * Configuration for different virus scanners. This an associative array of
1336 * associative arrays. It contains one setup array per known scanner type.
1337 * The entry is selected by $wgAntivirus, i.e.
1338 * valid values for $wgAntivirus are the keys defined in this array.
1339 *
1340 * The configuration array for each scanner contains the following keys:
1341 * "command", "codemap", "messagepattern":
1342 *
1343 * "command" is the full command to call the virus scanner - %f will be
1344 * replaced with the name of the file to scan. If not present, the filename
1345 * will be appended to the command. Note that this must be overwritten if the
1346 * scanner is not in the system path; in that case, please set
1347 * $wgAntivirusSetup[$wgAntivirus]['command'] to the desired command with full
1348 * path.
1349 *
1350 * "codemap" is a mapping of exit code to return codes of the detectVirus
1351 * function in SpecialUpload.
1352 * - An exit code mapped to AV_SCAN_FAILED causes the function to consider
1353 * the scan to be failed. This will pass the file if $wgAntivirusRequired
1354 * is not set.
1355 * - An exit code mapped to AV_SCAN_ABORTED causes the function to consider
1356 * the file to have an unsupported format, which is probably immune to
1357 * viruses. This causes the file to pass.
1358 * - An exit code mapped to AV_NO_VIRUS will cause the file to pass, meaning
1359 * no virus was found.
1360 * - All other codes (like AV_VIRUS_FOUND) will cause the function to report
1361 * a virus.
1362 * - You may use "*" as a key in the array to catch all exit codes not mapped otherwise.
1363 *
1364 * "messagepattern" is a perl regular expression to extract the meaningful part of the scanners
1365 * output. The relevant part should be matched as group one (\1).
1366 * If not defined or the pattern does not match, the full message is shown to the user.
1367 */
1368 $wgAntivirusSetup = [
1369
1370 # setup for clamav
1371 'clamav' => [
1372 'command' => 'clamscan --no-summary ',
1373 'codemap' => [
1374 "0" => AV_NO_VIRUS, # no virus
1375 "1" => AV_VIRUS_FOUND, # virus found
1376 "52" => AV_SCAN_ABORTED, # unsupported file format (probably immune)
1377 "*" => AV_SCAN_FAILED, # else scan failed
1378 ],
1379 'messagepattern' => '/.*?:(.*)/sim',
1380 ],
1381 ];
1382
1383 /**
1384 * Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected.
1385 */
1386 $wgAntivirusRequired = true;
1387
1388 /**
1389 * Determines if the MIME type of uploaded files should be checked
1390 */
1391 $wgVerifyMimeType = true;
1392
1393 /**
1394 * Sets the MIME type definition file to use by includes/libs/mime/MimeAnalyzer.php.
1395 * Set to null, to use built-in defaults only.
1396 * example: $wgMimeTypeFile = '/etc/mime.types';
1397 */
1398 $wgMimeTypeFile = 'includes/mime.types';
1399
1400 /**
1401 * Sets the MIME type info file to use by includes/libs/mime/MimeAnalyzer.php.
1402 * Set to null, to use built-in defaults only.
1403 */
1404 $wgMimeInfoFile = 'includes/mime.info';
1405
1406 /**
1407 * Sets an external MIME detector program. The command must print only
1408 * the MIME type to standard output.
1409 * The name of the file to process will be appended to the command given here.
1410 * If not set or NULL, PHP's mime_content_type function will be used.
1411 *
1412 * @par Example:
1413 * @code
1414 * #$wgMimeDetectorCommand = "file -bi"; # use external MIME detector (Linux)
1415 * @endcode
1416 */
1417 $wgMimeDetectorCommand = null;
1418
1419 /**
1420 * Switch for trivial MIME detection. Used by thumb.php to disable all fancy
1421 * things, because only a few types of images are needed and file extensions
1422 * can be trusted.
1423 */
1424 $wgTrivialMimeDetection = false;
1425
1426 /**
1427 * Additional XML types we can allow via MIME-detection.
1428 * array = [ 'rootElement' => 'associatedMimeType' ]
1429 */
1430 $wgXMLMimeTypes = [
1431 'http://www.w3.org/2000/svg:svg' => 'image/svg+xml',
1432 'svg' => 'image/svg+xml',
1433 'http://www.lysator.liu.se/~alla/dia/:diagram' => 'application/x-dia-diagram',
1434 'http://www.w3.org/1999/xhtml:html' => 'text/html', // application/xhtml+xml?
1435 'html' => 'text/html', // application/xhtml+xml?
1436 ];
1437
1438 /**
1439 * Limit images on image description pages to a user-selectable limit. In order
1440 * to reduce disk usage, limits can only be selected from a list.
1441 * The user preference is saved as an array offset in the database, by default
1442 * the offset is set with $wgDefaultUserOptions['imagesize']. Make sure you
1443 * change it if you alter the array (see T10858).
1444 * This is the list of settings the user can choose from:
1445 */
1446 $wgImageLimits = [
1447 [ 320, 240 ],
1448 [ 640, 480 ],
1449 [ 800, 600 ],
1450 [ 1024, 768 ],
1451 [ 1280, 1024 ]
1452 ];
1453
1454 /**
1455 * Adjust thumbnails on image pages according to a user setting. In order to
1456 * reduce disk usage, the values can only be selected from a list. This is the
1457 * list of settings the user can choose from:
1458 */
1459 $wgThumbLimits = [
1460 120,
1461 150,
1462 180,
1463 200,
1464 250,
1465 300
1466 ];
1467
1468 /**
1469 * When defined, is an array of image widths used as buckets for thumbnail generation.
1470 * The goal is to save resources by generating thumbnails based on reference buckets instead of
1471 * always using the original. This will incur a speed gain but cause a quality loss.
1472 *
1473 * The buckets generation is chained, with each bucket generated based on the above bucket
1474 * when possible. File handlers have to opt into using that feature. For now only BitmapHandler
1475 * supports it.
1476 */
1477 $wgThumbnailBuckets = null;
1478
1479 /**
1480 * When using thumbnail buckets as defined above, this sets the minimum distance to the bucket
1481 * above the requested size. The distance represents how many extra pixels of width the bucket
1482 * needs in order to be used as the reference for a given thumbnail. For example, with the
1483 * following buckets:
1484 *
1485 * $wgThumbnailBuckets = [ 128, 256, 512 ];
1486 *
1487 * and a distance of 50:
1488 *
1489 * $wgThumbnailMinimumBucketDistance = 50;
1490 *
1491 * If we want to render a thumbnail of width 220px, the 512px bucket will be used,
1492 * because 220 + 50 = 270 and the closest bucket bigger than 270px is 512.
1493 */
1494 $wgThumbnailMinimumBucketDistance = 50;
1495
1496 /**
1497 * When defined, is an array of thumbnail widths to be rendered at upload time. The idea is to
1498 * prerender common thumbnail sizes, in order to avoid the necessity to render them on demand, which
1499 * has a performance impact for the first client to view a certain size.
1500 *
1501 * This obviously means that more disk space is needed per upload upfront.
1502 *
1503 * @since 1.25
1504 */
1505
1506 $wgUploadThumbnailRenderMap = [];
1507
1508 /**
1509 * The method through which the thumbnails will be prerendered for the entries in
1510 * $wgUploadThumbnailRenderMap
1511 *
1512 * The method can be either "http" or "jobqueue". The former uses an http request to hit the
1513 * thumbnail's URL.
1514 * This method only works if thumbnails are configured to be rendered by a 404 handler. The latter
1515 * option uses the job queue to render the thumbnail.
1516 *
1517 * @since 1.25
1518 */
1519 $wgUploadThumbnailRenderMethod = 'jobqueue';
1520
1521 /**
1522 * When using the "http" wgUploadThumbnailRenderMethod, lets one specify a custom Host HTTP header.
1523 *
1524 * @since 1.25
1525 */
1526 $wgUploadThumbnailRenderHttpCustomHost = false;
1527
1528 /**
1529 * When using the "http" wgUploadThumbnailRenderMethod, lets one specify a custom domain to send the
1530 * HTTP request to.
1531 *
1532 * @since 1.25
1533 */
1534 $wgUploadThumbnailRenderHttpCustomDomain = false;
1535
1536 /**
1537 * When this variable is true and JPGs use the sRGB ICC profile, swaps it for the more lightweight
1538 * (and free) TinyRGB profile when generating thumbnails.
1539 *
1540 * @since 1.26
1541 */
1542 $wgUseTinyRGBForJPGThumbnails = false;
1543
1544 /**
1545 * Parameters for the "<gallery>" tag.
1546 * Fields are:
1547 * - imagesPerRow: Default number of images per-row in the gallery. 0 -> Adapt to screensize
1548 * - imageWidth: Width of the cells containing images in galleries (in "px")
1549 * - imageHeight: Height of the cells containing images in galleries (in "px")
1550 * - captionLength: Length to truncate filename to in caption when using "showfilename".
1551 * A value of 'true' will truncate the filename to one line using CSS
1552 * and will be the behaviour after deprecation.
1553 * @deprecated since 1.28
1554 * - showBytes: Show the filesize in bytes in categories
1555 * - showDimensions: Show the dimensions (width x height) in categories
1556 * - mode: Gallery mode
1557 */
1558 $wgGalleryOptions = [];
1559
1560 /**
1561 * Adjust width of upright images when parameter 'upright' is used
1562 * This allows a nicer look for upright images without the need to fix the width
1563 * by hardcoded px in wiki sourcecode.
1564 */
1565 $wgThumbUpright = 0.75;
1566
1567 /**
1568 * Default value for chmoding of new directories.
1569 */
1570 $wgDirectoryMode = 0777;
1571
1572 /**
1573 * Generate and use thumbnails suitable for screens with 1.5 and 2.0 pixel densities.
1574 *
1575 * This means a 320x240 use of an image on the wiki will also generate 480x360 and 640x480
1576 * thumbnails, output via the srcset attribute.
1577 */
1578 $wgResponsiveImages = true;
1579
1580 /**
1581 * @name DJVU settings
1582 * @{
1583 */
1584
1585 /**
1586 * Path of the djvudump executable
1587 * Enable this and $wgDjvuRenderer to enable djvu rendering
1588 * example: $wgDjvuDump = 'djvudump';
1589 */
1590 $wgDjvuDump = null;
1591
1592 /**
1593 * Path of the ddjvu DJVU renderer
1594 * Enable this and $wgDjvuDump to enable djvu rendering
1595 * example: $wgDjvuRenderer = 'ddjvu';
1596 */
1597 $wgDjvuRenderer = null;
1598
1599 /**
1600 * Path of the djvutxt DJVU text extraction utility
1601 * Enable this and $wgDjvuDump to enable text layer extraction from djvu files
1602 * example: $wgDjvuTxt = 'djvutxt';
1603 */
1604 $wgDjvuTxt = null;
1605
1606 /**
1607 * Path of the djvutoxml executable
1608 * This works like djvudump except much, much slower as of version 3.5.
1609 *
1610 * For now we recommend you use djvudump instead. The djvuxml output is
1611 * probably more stable, so we'll switch back to it as soon as they fix
1612 * the efficiency problem.
1613 * https://sourceforge.net/tracker/index.php?func=detail&aid=1704049&group_id=32953&atid=406583
1614 *
1615 * @par Example:
1616 * @code
1617 * $wgDjvuToXML = 'djvutoxml';
1618 * @endcode
1619 */
1620 $wgDjvuToXML = null;
1621
1622 /**
1623 * Shell command for the DJVU post processor
1624 * Default: pnmtojpeg, since ddjvu generates ppm output
1625 * Set this to false to output the ppm file directly.
1626 */
1627 $wgDjvuPostProcessor = 'pnmtojpeg';
1628
1629 /**
1630 * File extension for the DJVU post processor output
1631 */
1632 $wgDjvuOutputExtension = 'jpg';
1633
1634 /** @} */ # end of DJvu }
1635
1636 /** @} */ # end of file uploads }
1637
1638 /************************************************************************//**
1639 * @name Email settings
1640 * @{
1641 */
1642
1643 /**
1644 * Site admin email address.
1645 *
1646 * Defaults to "wikiadmin@$wgServerName" (in Setup.php).
1647 */
1648 $wgEmergencyContact = false;
1649
1650 /**
1651 * Sender email address for e-mail notifications.
1652 *
1653 * The address we use as sender when a user requests a password reminder,
1654 * as well as other e-mail notifications.
1655 *
1656 * Defaults to "apache@$wgServerName" (in Setup.php).
1657 */
1658 $wgPasswordSender = false;
1659
1660 /**
1661 * Reply-To address for e-mail notifications.
1662 *
1663 * Defaults to $wgPasswordSender (in Setup.php).
1664 */
1665 $wgNoReplyAddress = false;
1666
1667 /**
1668 * Set to true to enable the e-mail basic features:
1669 * Password reminders, etc. If sending e-mail on your
1670 * server doesn't work, you might want to disable this.
1671 */
1672 $wgEnableEmail = true;
1673
1674 /**
1675 * Set to true to enable user-to-user e-mail.
1676 * This can potentially be abused, as it's hard to track.
1677 */
1678 $wgEnableUserEmail = true;
1679
1680 /**
1681 * Set to true to enable user-to-user e-mail blacklist.
1682 *
1683 * @since 1.30
1684 */
1685 $wgEnableUserEmailBlacklist = false;
1686
1687 /**
1688 * If true put the sending user's email in a Reply-To header
1689 * instead of From (false). ($wgPasswordSender will be used as From.)
1690 *
1691 * Some mailers (eg SMTP) set the SMTP envelope sender to the From value,
1692 * which can cause problems with SPF validation and leak recipient addresses
1693 * when bounces are sent to the sender. In addition, DMARC restrictions
1694 * can cause emails to fail to be received when false.
1695 */
1696 $wgUserEmailUseReplyTo = true;
1697
1698 /**
1699 * Minimum time, in hours, which must elapse between password reminder
1700 * emails for a given account. This is to prevent abuse by mail flooding.
1701 */
1702 $wgPasswordReminderResendTime = 24;
1703
1704 /**
1705 * The time, in seconds, when an emailed temporary password expires.
1706 */
1707 $wgNewPasswordExpiry = 3600 * 24 * 7;
1708
1709 /**
1710 * The time, in seconds, when an email confirmation email expires
1711 */
1712 $wgUserEmailConfirmationTokenExpiry = 7 * 24 * 60 * 60;
1713
1714 /**
1715 * The number of days that a user's password is good for. After this number of days, the
1716 * user will be asked to reset their password. Set to false to disable password expiration.
1717 */
1718 $wgPasswordExpirationDays = false;
1719
1720 /**
1721 * If a user's password is expired, the number of seconds when they can still login,
1722 * and cancel their password change, but are sent to the password change form on each login.
1723 */
1724 $wgPasswordExpireGrace = 3600 * 24 * 7; // 7 days
1725
1726 /**
1727 * SMTP Mode.
1728 *
1729 * For using a direct (authenticated) SMTP server connection.
1730 * Default to false or fill an array :
1731 *
1732 * @code
1733 * $wgSMTP = [
1734 * 'host' => 'SMTP domain',
1735 * 'IDHost' => 'domain for MessageID',
1736 * 'port' => '25',
1737 * 'auth' => [true|false],
1738 * 'username' => [SMTP username],
1739 * 'password' => [SMTP password],
1740 * ];
1741 * @endcode
1742 */
1743 $wgSMTP = false;
1744
1745 /**
1746 * Additional email parameters, will be passed as the last argument to mail() call.
1747 */
1748 $wgAdditionalMailParams = null;
1749
1750 /**
1751 * For parts of the system that have been updated to provide HTML email content, send
1752 * both text and HTML parts as the body of the email
1753 */
1754 $wgAllowHTMLEmail = false;
1755
1756 /**
1757 * Allow sending of e-mail notifications with the editor's address as sender.
1758 *
1759 * This setting depends on $wgEnotifRevealEditorAddress also being enabled.
1760 * If both are enabled, notifications for actions from users that have opted-in,
1761 * will be sent to other users with their address as "From" instead of "Reply-To".
1762 *
1763 * If disabled, or not opted-in, notifications come from $wgPasswordSender.
1764 *
1765 * @var bool
1766 */
1767 $wgEnotifFromEditor = false;
1768
1769 // TODO move UPO to preferences probably ?
1770 # If set to true, users get a corresponding option in their preferences and can choose to
1771 # enable or disable at their discretion
1772 # If set to false, the corresponding input form on the user preference page is suppressed
1773 # It call this to be a "user-preferences-option (UPO)"
1774
1775 /**
1776 * Require email authentication before sending mail to an email address.
1777 * This is highly recommended. It prevents MediaWiki from being used as an open
1778 * spam relay.
1779 */
1780 $wgEmailAuthentication = true;
1781
1782 /**
1783 * Allow users to enable email notification ("enotif") on watchlist changes.
1784 */
1785 $wgEnotifWatchlist = false;
1786
1787 /**
1788 * Allow users to enable email notification ("enotif") when someone edits their
1789 * user talk page.
1790 *
1791 * The owner of the user talk page must also have the 'enotifusertalkpages' user
1792 * preference set to true.
1793 */
1794 $wgEnotifUserTalk = false;
1795
1796 /**
1797 * Allow sending of e-mail notifications with the editor's address in "Reply-To".
1798 *
1799 * Note, enabling this only actually uses it in notification e-mails if the user
1800 * opted-in to this feature. This feature flag also controls visibility of the
1801 * 'enotifrevealaddr' preference, which, if users opt into, will make e-mail
1802 * notifications about their actions use their address as "Reply-To".
1803 *
1804 * To set the address as "From" instead of "Reply-To", also enable $wgEnotifFromEditor.
1805 *
1806 * If disabled, or not opted-in, notifications come from $wgPasswordSender.
1807 *
1808 * @var bool
1809 */
1810 $wgEnotifRevealEditorAddress = false;
1811
1812 /**
1813 * Potentially send notification mails on minor edits to pages. This is enabled
1814 * by default. If this is false, users will never be notified on minor edits.
1815 *
1816 * If it is true, editors with the 'nominornewtalk' right (typically bots) will still not
1817 * trigger notifications for minor edits they make (to any page, not just user talk).
1818 *
1819 * Finally, if the watcher/recipient has the 'enotifminoredits' user preference set to
1820 * false, they will not receive notifications for minor edits.
1821 *
1822 * User talk notifications are also affected by $wgEnotifMinorEdits, the above settings,
1823 * $wgEnotifUserTalk, and the preference described there.
1824 */
1825 $wgEnotifMinorEdits = true;
1826
1827 /**
1828 * Send a generic mail instead of a personalised mail for each user. This
1829 * always uses UTC as the time zone, and doesn't include the username.
1830 *
1831 * For pages with many users watching, this can significantly reduce mail load.
1832 * Has no effect when using sendmail rather than SMTP.
1833 */
1834 $wgEnotifImpersonal = false;
1835
1836 /**
1837 * Maximum number of users to mail at once when using impersonal mail. Should
1838 * match the limit on your mail server.
1839 */
1840 $wgEnotifMaxRecips = 500;
1841
1842 /**
1843 * Use real name instead of username in e-mail "from" field.
1844 */
1845 $wgEnotifUseRealName = false;
1846
1847 /**
1848 * Array of usernames who will be sent a notification email for every change
1849 * which occurs on a wiki. Users will not be notified of their own changes.
1850 */
1851 $wgUsersNotifiedOnAllChanges = [];
1852
1853 /** @} */ # end of email settings
1854
1855 /************************************************************************//**
1856 * @name Database settings
1857 * @{
1858 */
1859
1860 /**
1861 * Database host name or IP address
1862 */
1863 $wgDBserver = 'localhost';
1864
1865 /**
1866 * Database port number (for PostgreSQL and Microsoft SQL Server).
1867 */
1868 $wgDBport = 5432;
1869
1870 /**
1871 * Name of the database; this should be alphanumeric and not contain spaces nor hyphens
1872 */
1873 $wgDBname = 'my_wiki';
1874
1875 /**
1876 * Database username
1877 */
1878 $wgDBuser = 'wikiuser';
1879
1880 /**
1881 * Database user's password
1882 */
1883 $wgDBpassword = '';
1884
1885 /**
1886 * Database type
1887 */
1888 $wgDBtype = 'mysql';
1889
1890 /**
1891 * Whether to use SSL in DB connection.
1892 *
1893 * This setting is only used if $wgLBFactoryConf['class'] is set to
1894 * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
1895 * the DBO_SSL flag must be set in the 'flags' option of the database
1896 * connection to achieve the same functionality.
1897 */
1898 $wgDBssl = false;
1899
1900 /**
1901 * Whether to use compression in DB connection.
1902 *
1903 * This setting is only used $wgLBFactoryConf['class'] is set to
1904 * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
1905 * the DBO_COMPRESS flag must be set in the 'flags' option of the database
1906 * connection to achieve the same functionality.
1907 */
1908 $wgDBcompress = false;
1909
1910 /**
1911 * Separate username for maintenance tasks. Leave as null to use the default.
1912 */
1913 $wgDBadminuser = null;
1914
1915 /**
1916 * Separate password for maintenance tasks. Leave as null to use the default.
1917 */
1918 $wgDBadminpassword = null;
1919
1920 /**
1921 * Search type.
1922 * Leave as null to select the default search engine for the
1923 * selected database type (eg SearchMySQL), or set to a class
1924 * name to override to a custom search engine.
1925 */
1926 $wgSearchType = null;
1927
1928 /**
1929 * Alternative search types
1930 * Sometimes you want to support multiple search engines for testing. This
1931 * allows users to select their search engine of choice via url parameters
1932 * to Special:Search and the action=search API. If using this, there's no
1933 * need to add $wgSearchType to it, that is handled automatically.
1934 */
1935 $wgSearchTypeAlternatives = null;
1936
1937 /**
1938 * Table name prefix; this should be alphanumeric and not contain spaces nor hyphens
1939 */
1940 $wgDBprefix = '';
1941
1942 /**
1943 * MySQL table options to use during installation or update
1944 */
1945 $wgDBTableOptions = 'ENGINE=InnoDB, DEFAULT CHARSET=binary';
1946
1947 /**
1948 * SQL Mode - default is turning off all modes, including strict, if set.
1949 * null can be used to skip the setting for performance reasons and assume
1950 * DBA has done his best job.
1951 * String override can be used for some additional fun :-)
1952 */
1953 $wgSQLMode = '';
1954
1955 /**
1956 * Mediawiki schema; this should be alphanumeric and not contain spaces nor hyphens
1957 */
1958 $wgDBmwschema = null;
1959
1960 /**
1961 * Default group to use when getting database connections.
1962 * Will be used as default query group in ILoadBalancer::getConnection.
1963 * @since 1.32
1964 */
1965 $wgDBDefaultGroup = null;
1966
1967 /**
1968 * To override default SQLite data directory ($docroot/../data)
1969 */
1970 $wgSQLiteDataDir = '';
1971
1972 /**
1973 * Shared database for multiple wikis. Commonly used for storing a user table
1974 * for single sign-on. The server for this database must be the same as for the
1975 * main database.
1976 *
1977 * For backwards compatibility the shared prefix is set to the same as the local
1978 * prefix, and the user table is listed in the default list of shared tables.
1979 * The user_properties table is also added so that users will continue to have their
1980 * preferences shared (preferences were stored in the user table prior to 1.16)
1981 *
1982 * $wgSharedTables may be customized with a list of tables to share in the shared
1983 * database. However it is advised to limit what tables you do share as many of
1984 * MediaWiki's tables may have side effects if you try to share them.
1985 *
1986 * $wgSharedPrefix is the table prefix for the shared database. It defaults to
1987 * $wgDBprefix.
1988 *
1989 * $wgSharedSchema is the table schema for the shared database. It defaults to
1990 * $wgDBmwschema.
1991 *
1992 * @deprecated since 1.21 In new code, use the $wiki parameter to LBFactory::getMainLB() to
1993 * access remote databases. Using LBFactory::getMainLB() allows the shared database to
1994 * reside on separate servers to the wiki's own database, with suitable
1995 * configuration of $wgLBFactoryConf.
1996 */
1997 $wgSharedDB = null;
1998
1999 /**
2000 * @see $wgSharedDB
2001 */
2002 $wgSharedPrefix = false;
2003
2004 /**
2005 * @see $wgSharedDB
2006 */
2007 $wgSharedTables = [ 'user', 'user_properties' ];
2008
2009 /**
2010 * @see $wgSharedDB
2011 * @since 1.23
2012 */
2013 $wgSharedSchema = false;
2014
2015 /**
2016 * Database load balancer
2017 * This is a two-dimensional array, an array of server info structures
2018 * Fields are:
2019 * - host: Host name
2020 * - dbname: Default database name
2021 * - user: DB user
2022 * - password: DB password
2023 * - type: DB type
2024 * - driver: DB driver (when there are multiple drivers)
2025 *
2026 * - load: Ratio of DB_REPLICA load, must be >=0, the sum of all loads must be >0.
2027 * If this is zero for any given server, no normal query traffic will be
2028 * sent to it. It will be excluded from lag checks in maintenance scripts.
2029 * The only way it can receive traffic is if groupLoads is used.
2030 *
2031 * - groupLoads: array of load ratios, the key is the query group name. A query may belong
2032 * to several groups, the most specific group defined here is used.
2033 *
2034 * - flags: bit field
2035 * - DBO_DEFAULT -- turns on DBO_TRX only if "cliMode" is off (recommended)
2036 * - DBO_DEBUG -- equivalent of $wgDebugDumpSql
2037 * - DBO_TRX -- wrap entire request in a transaction
2038 * - DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php)
2039 * - DBO_PERSISTENT -- enables persistent database connections
2040 * - DBO_SSL -- uses SSL/TLS encryption in database connections, if available
2041 * - DBO_COMPRESS -- uses internal compression in database connections,
2042 * if available
2043 *
2044 * - max lag: (optional) Maximum replication lag before a replica DB goes out of rotation
2045 * - is static: (optional) Set to true if the dataset is static and no replication is used.
2046 * - cliMode: (optional) Connection handles will not assume that requests are short-lived
2047 * nor that INSERT..SELECT can be rewritten into a buffered SELECT and INSERT.
2048 * [Default: uses value of $wgCommandLineMode]
2049 *
2050 * These and any other user-defined properties will be assigned to the mLBInfo member
2051 * variable of the Database object.
2052 *
2053 * Leave at false to use the single-server variables above. If you set this
2054 * variable, the single-server variables will generally be ignored (except
2055 * perhaps in some command-line scripts).
2056 *
2057 * The first server listed in this array (with key 0) will be the master. The
2058 * rest of the servers will be replica DBs. To prevent writes to your replica DBs due to
2059 * accidental misconfiguration or MediaWiki bugs, set read_only=1 on all your
2060 * replica DBs in my.cnf. You can set read_only mode at runtime using:
2061 *
2062 * @code
2063 * SET @@read_only=1;
2064 * @endcode
2065 *
2066 * Since the effect of writing to a replica DB is so damaging and difficult to clean
2067 * up, we at Wikimedia set read_only=1 in my.cnf on all our DB servers, even
2068 * our masters, and then set read_only=0 on masters at runtime.
2069 */
2070 $wgDBservers = false;
2071
2072 /**
2073 * Load balancer factory configuration
2074 * To set up a multi-master wiki farm, set the class here to something that
2075 * can return a LoadBalancer with an appropriate master on a call to getMainLB().
2076 * The class identified here is responsible for reading $wgDBservers,
2077 * $wgDBserver, etc., so overriding it may cause those globals to be ignored.
2078 *
2079 * The LBFactoryMulti class is provided for this purpose, please see
2080 * includes/db/LBFactoryMulti.php for configuration information.
2081 */
2082 $wgLBFactoryConf = [ 'class' => \Wikimedia\Rdbms\LBFactorySimple::class ];
2083
2084 /**
2085 * After a state-changing request is done by a client, this determines
2086 * how many seconds that client should keep using the master datacenter.
2087 * This avoids unexpected stale or 404 responses due to replication lag.
2088 * @since 1.27
2089 */
2090 $wgDataCenterUpdateStickTTL = 10;
2091
2092 /**
2093 * File to log database errors to
2094 */
2095 $wgDBerrorLog = false;
2096
2097 /**
2098 * Timezone to use in the error log.
2099 * Defaults to the wiki timezone ($wgLocaltimezone).
2100 *
2101 * A list of usable timezones can found at:
2102 * https://secure.php.net/manual/en/timezones.php
2103 *
2104 * @par Examples:
2105 * @code
2106 * $wgDBerrorLogTZ = 'UTC';
2107 * $wgDBerrorLogTZ = 'GMT';
2108 * $wgDBerrorLogTZ = 'PST8PDT';
2109 * $wgDBerrorLogTZ = 'Europe/Sweden';
2110 * $wgDBerrorLogTZ = 'CET';
2111 * @endcode
2112 *
2113 * @since 1.20
2114 */
2115 $wgDBerrorLogTZ = false;
2116
2117 /**
2118 * Set to true to engage MySQL 4.1/5.0 charset-related features;
2119 * for now will just cause sending of 'SET NAMES=utf8' on connect.
2120 *
2121 * @warning THIS IS EXPERIMENTAL!
2122 *
2123 * May break if you're not using the table defs from mysql5/tables.sql.
2124 * May break if you're upgrading an existing wiki if set differently.
2125 * Broken symptoms likely to include incorrect behavior with page titles,
2126 * usernames, comments etc containing non-ASCII characters.
2127 * Might also cause failures on the object cache and other things.
2128 *
2129 * Even correct usage may cause failures with Unicode supplementary
2130 * characters (those not in the Basic Multilingual Plane) unless MySQL
2131 * has enhanced their Unicode support.
2132 *
2133 * @deprecated since 1.31
2134 */
2135 $wgDBmysql5 = false;
2136
2137 /**
2138 * Set true to enable Oracle DCRP (supported from 11gR1 onward)
2139 *
2140 * To use this feature set to true and use a datasource defined as
2141 * POOLED (i.e. in tnsnames definition set server=pooled in connect_data
2142 * block).
2143 *
2144 * Starting from 11gR1 you can use DCRP (Database Resident Connection
2145 * Pool) that maintains established sessions and reuses them on new
2146 * connections.
2147 *
2148 * Not completely tested, but it should fall back on normal connection
2149 * in case the pool is full or the datasource is not configured as
2150 * pooled.
2151 * And the other way around; using oci_pconnect on a non pooled
2152 * datasource should produce a normal connection.
2153 *
2154 * When it comes to frequent shortlived DB connections like with MW
2155 * Oracle tends to s***. The problem is the driver connects to the
2156 * database reasonably fast, but establishing a session takes time and
2157 * resources. MW does not rely on session state (as it does not use
2158 * features such as package variables) so establishing a valid session
2159 * is in this case an unwanted overhead that just slows things down.
2160 *
2161 * @warning EXPERIMENTAL!
2162 */
2163 $wgDBOracleDRCP = false;
2164
2165 /**
2166 * Other wikis on this site, can be administered from a single developer account.
2167 *
2168 * @var string[] List of wiki DB domain IDs; the format of each ID consist of 1-3 hyphen
2169 * delimited alphanumeric components (each with no hyphens nor spaces) of any of the forms:
2170 * - "<DB NAME>-<DB SCHEMA>-<TABLE PREFIX>"
2171 * - "<DB NAME>-<TABLE PREFIX>"
2172 * - "<DB NAME>"
2173 * If hyphens appear in any of the components, then the domain ID parsing may not work
2174 * in all cases and site functionality might be affected. If the schema ($wgDBmwschema)
2175 * is left to the default "mediawiki" for all wikis, then the schema should be omitted
2176 * from these IDs.
2177 */
2178 $wgLocalDatabases = [];
2179
2180 /**
2181 * If lag is higher than $wgSlaveLagWarning, show a warning in some special
2182 * pages (like watchlist). If the lag is higher than $wgSlaveLagCritical,
2183 * show a more obvious warning.
2184 */
2185 $wgSlaveLagWarning = 10;
2186
2187 /**
2188 * @see $wgSlaveLagWarning
2189 */
2190 $wgSlaveLagCritical = 30;
2191
2192 /**
2193 * Use Windows Authentication instead of $wgDBuser / $wgDBpassword for MS SQL Server
2194 */
2195 $wgDBWindowsAuthentication = false;
2196
2197 /**@}*/ # End of DB settings }
2198
2199 /************************************************************************//**
2200 * @name Text storage
2201 * @{
2202 */
2203
2204 /**
2205 * We can also compress text stored in the 'text' table. If this is set on, new
2206 * revisions will be compressed on page save if zlib support is available. Any
2207 * compressed revisions will be decompressed on load regardless of this setting,
2208 * but will not be readable at all* if zlib support is not available.
2209 */
2210 $wgCompressRevisions = false;
2211
2212 /**
2213 * External stores allow including content
2214 * from non database sources following URL links.
2215 *
2216 * Short names of ExternalStore classes may be specified in an array here:
2217 * @code
2218 * $wgExternalStores = [ "http","file","custom" ]...
2219 * @endcode
2220 *
2221 * CAUTION: Access to database might lead to code execution
2222 */
2223 $wgExternalStores = [];
2224
2225 /**
2226 * An array of external MySQL servers.
2227 *
2228 * @par Example:
2229 * Create a cluster named 'cluster1' containing three servers:
2230 * @code
2231 * $wgExternalServers = [
2232 * 'cluster1' => <array in the same format as $wgDBservers>
2233 * ];
2234 * @endcode
2235 *
2236 * Used by \Wikimedia\Rdbms\LBFactorySimple, may be ignored if $wgLBFactoryConf is set to
2237 * another class.
2238 */
2239 $wgExternalServers = [];
2240
2241 /**
2242 * The place to put new revisions, false to put them in the local text table.
2243 * Part of a URL, e.g. DB://cluster1
2244 *
2245 * Can be an array instead of a single string, to enable data distribution. Keys
2246 * must be consecutive integers, starting at zero.
2247 *
2248 * @par Example:
2249 * @code
2250 * $wgDefaultExternalStore = [ 'DB://cluster1', 'DB://cluster2' ];
2251 * @endcode
2252 *
2253 * @var array
2254 */
2255 $wgDefaultExternalStore = false;
2256
2257 /**
2258 * Revision text may be cached in $wgMemc to reduce load on external storage
2259 * servers and object extraction overhead for frequently-loaded revisions.
2260 *
2261 * Set to 0 to disable, or number of seconds before cache expiry.
2262 */
2263 $wgRevisionCacheExpiry = 86400 * 7;
2264
2265 /** @} */ # end text storage }
2266
2267 /************************************************************************//**
2268 * @name Performance hacks and limits
2269 * @{
2270 */
2271
2272 /**
2273 * Disable database-intensive features
2274 */
2275 $wgMiserMode = false;
2276
2277 /**
2278 * Disable all query pages if miser mode is on, not just some
2279 */
2280 $wgDisableQueryPages = false;
2281
2282 /**
2283 * Number of rows to cache in 'querycache' table when miser mode is on
2284 */
2285 $wgQueryCacheLimit = 1000;
2286
2287 /**
2288 * Number of links to a page required before it is deemed "wanted"
2289 */
2290 $wgWantedPagesThreshold = 1;
2291
2292 /**
2293 * Enable slow parser functions
2294 */
2295 $wgAllowSlowParserFunctions = false;
2296
2297 /**
2298 * Allow schema updates
2299 */
2300 $wgAllowSchemaUpdates = true;
2301
2302 /**
2303 * Maximum article size in kilobytes
2304 */
2305 $wgMaxArticleSize = 2048;
2306
2307 /**
2308 * The minimum amount of memory that MediaWiki "needs"; MediaWiki will try to
2309 * raise PHP's memory limit if it's below this amount.
2310 */
2311 $wgMemoryLimit = "50M";
2312
2313 /**
2314 * The minimum amount of time that MediaWiki needs for "slow" write request,
2315 * particularly ones with multiple non-atomic writes that *should* be as
2316 * transactional as possible; MediaWiki will call set_time_limit() if needed.
2317 * @since 1.26
2318 */
2319 $wgTransactionalTimeLimit = 120;
2320
2321 /** @} */ # end performance hacks }
2322
2323 /************************************************************************//**
2324 * @name Cache settings
2325 * @{
2326 */
2327
2328 /**
2329 * Directory for caching data in the local filesystem. Should not be accessible
2330 * from the web.
2331 *
2332 * Note: if multiple wikis share the same localisation cache directory, they
2333 * must all have the same set of extensions. You can set a directory just for
2334 * the localisation cache using $wgLocalisationCacheConf['storeDirectory'].
2335 */
2336 $wgCacheDirectory = false;
2337
2338 /**
2339 * Main cache type. This should be a cache with fast access, but it may have
2340 * limited space. By default, it is disabled, since the stock database cache
2341 * is not fast enough to make it worthwhile.
2342 *
2343 * The options are:
2344 *
2345 * - CACHE_ANYTHING: Use anything, as long as it works
2346 * - CACHE_NONE: Do not cache
2347 * - CACHE_DB: Store cache objects in the DB
2348 * - CACHE_MEMCACHED: MemCached, must specify servers in $wgMemCachedServers
2349 * - CACHE_ACCEL: APC, APCU or WinCache
2350 * - (other): A string may be used which identifies a cache
2351 * configuration in $wgObjectCaches.
2352 *
2353 * @see $wgMessageCacheType, $wgParserCacheType
2354 */
2355 $wgMainCacheType = CACHE_NONE;
2356
2357 /**
2358 * The cache type for storing the contents of the MediaWiki namespace. This
2359 * cache is used for a small amount of data which is expensive to regenerate.
2360 *
2361 * For available types see $wgMainCacheType.
2362 */
2363 $wgMessageCacheType = CACHE_ANYTHING;
2364
2365 /**
2366 * The cache type for storing article HTML. This is used to store data which
2367 * is expensive to regenerate, and benefits from having plenty of storage space.
2368 *
2369 * For available types see $wgMainCacheType.
2370 */
2371 $wgParserCacheType = CACHE_ANYTHING;
2372
2373 /**
2374 * The cache type for storing session data.
2375 *
2376 * For available types see $wgMainCacheType.
2377 */
2378 $wgSessionCacheType = CACHE_ANYTHING;
2379
2380 /**
2381 * The cache type for storing language conversion tables,
2382 * which are used when parsing certain text and interface messages.
2383 *
2384 * For available types see $wgMainCacheType.
2385 *
2386 * @since 1.20
2387 */
2388 $wgLanguageConverterCacheType = CACHE_ANYTHING;
2389
2390 /**
2391 * Advanced object cache configuration.
2392 *
2393 * Use this to define the class names and constructor parameters which are used
2394 * for the various cache types. Custom cache types may be defined here and
2395 * referenced from $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType,
2396 * or $wgLanguageConverterCacheType.
2397 *
2398 * The format is an associative array where the key is a cache identifier, and
2399 * the value is an associative array of parameters. The "class" parameter is the
2400 * class name which will be used. Alternatively, a "factory" parameter may be
2401 * given, giving a callable function which will generate a suitable cache object.
2402 */
2403 $wgObjectCaches = [
2404 CACHE_NONE => [ 'class' => EmptyBagOStuff::class, 'reportDupes' => false ],
2405 CACHE_DB => [ 'class' => SqlBagOStuff::class, 'loggroup' => 'SQLBagOStuff' ],
2406
2407 CACHE_ANYTHING => [ 'factory' => 'ObjectCache::newAnything' ],
2408 CACHE_ACCEL => [ 'factory' => 'ObjectCache::getLocalServerInstance' ],
2409 CACHE_MEMCACHED => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
2410
2411 'db-replicated' => [
2412 'class' => ReplicatedBagOStuff::class,
2413 'readFactory' => [
2414 'class' => SqlBagOStuff::class,
2415 'args' => [ [ 'slaveOnly' => true ] ]
2416 ],
2417 'writeFactory' => [
2418 'class' => SqlBagOStuff::class,
2419 'args' => [ [ 'slaveOnly' => false ] ]
2420 ],
2421 'loggroup' => 'SQLBagOStuff',
2422 'reportDupes' => false
2423 ],
2424
2425 'apc' => [ 'class' => APCBagOStuff::class, 'reportDupes' => false ],
2426 'apcu' => [ 'class' => APCUBagOStuff::class, 'reportDupes' => false ],
2427 'wincache' => [ 'class' => WinCacheBagOStuff::class, 'reportDupes' => false ],
2428 'memcached-php' => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
2429 'memcached-pecl' => [ 'class' => MemcachedPeclBagOStuff::class, 'loggroup' => 'memcached' ],
2430 'hash' => [ 'class' => HashBagOStuff::class, 'reportDupes' => false ],
2431 ];
2432
2433 /**
2434 * Main Wide-Area-Network cache type. This should be a cache with fast access,
2435 * but it may have limited space. By default, it is disabled, since the basic stock
2436 * cache is not fast enough to make it worthwhile. For single data-center setups, this can
2437 * simply be pointed to a cache in $wgWANObjectCaches that uses a local $wgObjectCaches
2438 * cache with a relayer of type EventRelayerNull.
2439 *
2440 * The options are:
2441 * - false: Configure the cache using $wgMainCacheType, without using
2442 * a relayer (only matters if there are multiple data-centers)
2443 * - CACHE_NONE: Do not cache
2444 * - (other): A string may be used which identifies a cache
2445 * configuration in $wgWANObjectCaches
2446 * @since 1.26
2447 */
2448 $wgMainWANCache = false;
2449
2450 /**
2451 * Advanced WAN object cache configuration.
2452 *
2453 * Each WAN cache wraps a registered object cache (for the local cluster)
2454 * and it must also be configured to point to a PubSub instance. Subscribers
2455 * must be configured to relay purges to the actual cache servers.
2456 *
2457 * The format is an associative array where the key is a cache identifier, and
2458 * the value is an associative array of parameters. The "cacheId" parameter is
2459 * a cache identifier from $wgObjectCaches. The "loggroup" parameter controls
2460 * where log events are sent.
2461 *
2462 * @since 1.26
2463 */
2464 $wgWANObjectCaches = [
2465 CACHE_NONE => [
2466 'class' => WANObjectCache::class,
2467 'cacheId' => CACHE_NONE
2468 ]
2469 /* Example of a simple single data-center cache:
2470 'memcached-php' => [
2471 'class' => WANObjectCache::class,
2472 'cacheId' => 'memcached-php'
2473 ]
2474 */
2475 ];
2476
2477 /**
2478 * Verify and enforce WAN cache purges using reliable DB sources as streams.
2479 *
2480 * These secondary cache purges are de-duplicated via simple cache mutexes.
2481 * This improves consistency when cache purges are lost, which becomes more likely
2482 * as more cache servers are added or if there are multiple datacenters. Only keys
2483 * related to important mutable content will be checked.
2484 *
2485 * @var bool
2486 * @since 1.29
2487 */
2488 $wgEnableWANCacheReaper = false;
2489
2490 /**
2491 * Main object stash type. This should be a fast storage system for storing
2492 * lightweight data like hit counters and user activity. Sites with multiple
2493 * data-centers should have this use a store that replicates all writes. The
2494 * store should have enough consistency for CAS operations to be usable.
2495 * Reads outside of those needed for merge() may be eventually consistent.
2496 *
2497 * The options are:
2498 * - db: Store cache objects in the DB
2499 * - (other): A string may be used which identifies a cache
2500 * configuration in $wgObjectCaches
2501 *
2502 * @since 1.26
2503 */
2504 $wgMainStash = 'db-replicated';
2505
2506 /**
2507 * The expiry time for the parser cache, in seconds.
2508 * The default is 86400 (one day).
2509 */
2510 $wgParserCacheExpireTime = 86400;
2511
2512 /**
2513 * The expiry time to use for session storage, in seconds.
2514 */
2515 $wgObjectCacheSessionExpiry = 3600;
2516
2517 /**
2518 * Whether to use PHP session handling ($_SESSION and session_*() functions)
2519 *
2520 * If the constant MW_NO_SESSION is defined, this is forced to 'disable'.
2521 *
2522 * If the constant MW_NO_SESSION_HANDLER is defined, this is ignored and PHP
2523 * session handling will function independently of SessionHandler.
2524 * SessionHandler and PHP's session handling may attempt to override each
2525 * others' cookies.
2526 *
2527 * @since 1.27
2528 * @var string
2529 * - 'enable': Integrate with PHP's session handling as much as possible.
2530 * - 'warn': Integrate but log warnings if anything changes $_SESSION.
2531 * - 'disable': Throw exceptions if PHP session handling is used.
2532 */
2533 $wgPHPSessionHandling = 'enable';
2534
2535 /**
2536 * Number of internal PBKDF2 iterations to use when deriving session secrets.
2537 *
2538 * @since 1.28
2539 */
2540 $wgSessionPbkdf2Iterations = 10001;
2541
2542 /**
2543 * If enabled, will send MemCached debugging information to $wgDebugLogFile
2544 */
2545 $wgMemCachedDebug = false;
2546
2547 /**
2548 * The list of MemCached servers and port numbers
2549 */
2550 $wgMemCachedServers = [ '127.0.0.1:11211' ];
2551
2552 /**
2553 * Use persistent connections to MemCached, which are shared across multiple
2554 * requests.
2555 */
2556 $wgMemCachedPersistent = false;
2557
2558 /**
2559 * Read/write timeout for MemCached server communication, in microseconds.
2560 */
2561 $wgMemCachedTimeout = 500000;
2562
2563 /**
2564 * Set this to true to maintain a copy of the message cache on the local server.
2565 *
2566 * This layer of message cache is in addition to the one configured by $wgMessageCacheType.
2567 *
2568 * The local copy is put in APC. If APC is not installed, this setting does nothing.
2569 *
2570 * Note that this is about the message cache, which stores interface messages
2571 * maintained as wiki pages. This is separate from the localisation cache for interface
2572 * messages provided by the software, which is configured by $wgLocalisationCacheConf.
2573 */
2574 $wgUseLocalMessageCache = false;
2575
2576 /**
2577 * Instead of caching everything, only cache those messages which have
2578 * been customised in the site content language. This means that
2579 * MediaWiki:Foo/ja is ignored if MediaWiki:Foo doesn't exist.
2580 * This option is probably only useful for translatewiki.net.
2581 */
2582 $wgAdaptiveMessageCache = false;
2583
2584 /**
2585 * Localisation cache configuration. Associative array with keys:
2586 * class: The class to use. May be overridden by extensions.
2587 *
2588 * store: The location to store cache data. May be 'files', 'array', 'db' or
2589 * 'detect'. If set to "files", data will be in CDB files. If set
2590 * to "db", data will be stored to the database. If set to
2591 * "detect", files will be used if $wgCacheDirectory is set,
2592 * otherwise the database will be used.
2593 * "array" is an experimental option that uses PHP files that
2594 * store static arrays.
2595 *
2596 * storeClass: The class name for the underlying storage. If set to a class
2597 * name, it overrides the "store" setting.
2598 *
2599 * storeDirectory: If the store class puts its data in files, this is the
2600 * directory it will use. If this is false, $wgCacheDirectory
2601 * will be used.
2602 *
2603 * manualRecache: Set this to true to disable cache updates on web requests.
2604 * Use maintenance/rebuildLocalisationCache.php instead.
2605 */
2606 $wgLocalisationCacheConf = [
2607 'class' => LocalisationCache::class,
2608 'store' => 'detect',
2609 'storeClass' => false,
2610 'storeDirectory' => false,
2611 'manualRecache' => false,
2612 ];
2613
2614 /**
2615 * Allow client-side caching of pages
2616 */
2617 $wgCachePages = true;
2618
2619 /**
2620 * Set this to current time to invalidate all prior cached pages. Affects both
2621 * client-side and server-side caching.
2622 * You can get the current date on your server by using the command:
2623 * @verbatim
2624 * date +%Y%m%d%H%M%S
2625 * @endverbatim
2626 */
2627 $wgCacheEpoch = '20030516000000';
2628
2629 /**
2630 * Directory where GitInfo will look for pre-computed cache files. If false,
2631 * $wgCacheDirectory/gitinfo will be used.
2632 */
2633 $wgGitInfoCacheDirectory = false;
2634
2635 /**
2636 * This will cache static pages for non-logged-in users to reduce
2637 * database traffic on public sites. ResourceLoader requests to default
2638 * language and skins are cached as well as single module requests.
2639 */
2640 $wgUseFileCache = false;
2641
2642 /**
2643 * Depth of the subdirectory hierarchy to be created under
2644 * $wgFileCacheDirectory. The subdirectories will be named based on
2645 * the MD5 hash of the title. A value of 0 means all cache files will
2646 * be put directly into the main file cache directory.
2647 */
2648 $wgFileCacheDepth = 2;
2649
2650 /**
2651 * Append a configured value to the parser cache and the sitenotice key so
2652 * that they can be kept separate for some class of activity.
2653 */
2654 $wgRenderHashAppend = '';
2655
2656 /**
2657 * If on, the sidebar navigation links are cached for users with the
2658 * current language set. This can save a touch of load on a busy site
2659 * by shaving off extra message lookups.
2660 *
2661 * However it is also fragile: changing the site configuration, or
2662 * having a variable $wgArticlePath, can produce broken links that
2663 * don't update as expected.
2664 */
2665 $wgEnableSidebarCache = false;
2666
2667 /**
2668 * Expiry time for the sidebar cache, in seconds
2669 */
2670 $wgSidebarCacheExpiry = 86400;
2671
2672 /**
2673 * When using the file cache, we can store the cached HTML gzipped to save disk
2674 * space. Pages will then also be served compressed to clients that support it.
2675 *
2676 * Requires zlib support enabled in PHP.
2677 */
2678 $wgUseGzip = false;
2679
2680 /**
2681 * Clock skew or the one-second resolution of time() can occasionally cause cache
2682 * problems when the user requests two pages within a short period of time. This
2683 * variable adds a given number of seconds to vulnerable timestamps, thereby giving
2684 * a grace period.
2685 */
2686 $wgClockSkewFudge = 5;
2687
2688 /**
2689 * Invalidate various caches when LocalSettings.php changes. This is equivalent
2690 * to setting $wgCacheEpoch to the modification time of LocalSettings.php, as
2691 * was previously done in the default LocalSettings.php file.
2692 *
2693 * On high-traffic wikis, this should be set to false, to avoid the need to
2694 * check the file modification time, and to avoid the performance impact of
2695 * unnecessary cache invalidations.
2696 */
2697 $wgInvalidateCacheOnLocalSettingsChange = true;
2698
2699 /**
2700 * When loading extensions through the extension registration system, this
2701 * can be used to invalidate the cache. A good idea would be to set this to
2702 * one file, you can just `touch` that one to invalidate the cache
2703 *
2704 * @par Example:
2705 * @code
2706 * $wgExtensionInfoMtime = filemtime( "$IP/LocalSettings.php" );
2707 * @endcode
2708 *
2709 * If set to false, the mtime for each individual JSON file will be checked,
2710 * which can be slow if a large number of extensions are being loaded.
2711 *
2712 * @var int|bool
2713 */
2714 $wgExtensionInfoMTime = false;
2715
2716 /** @} */ # end of cache settings
2717
2718 /************************************************************************//**
2719 * @name HTTP proxy (CDN) settings
2720 *
2721 * Many of these settings apply to any HTTP proxy used in front of MediaWiki,
2722 * although they are referred to as Squid settings for historical reasons.
2723 *
2724 * Achieving a high hit ratio with an HTTP proxy requires special
2725 * configuration. See https://www.mediawiki.org/wiki/Manual:Squid_caching for
2726 * more details.
2727 *
2728 * @{
2729 */
2730
2731 /**
2732 * Enable/disable CDN.
2733 * See https://www.mediawiki.org/wiki/Manual:Squid_caching
2734 */
2735 $wgUseSquid = false;
2736
2737 /**
2738 * If you run Squid3 with ESI support, enable this (default:false):
2739 * @deprecated in 1.33. This was a now-defunct experimental feature.
2740 */
2741 $wgUseESI = false;
2742
2743 /**
2744 * Send the Key HTTP header for better caching.
2745 * See https://datatracker.ietf.org/doc/draft-ietf-httpbis-key/ for details.
2746 * @since 1.27
2747 * @deprecated in 1.32, the IETF spec expired without becoming a standard.
2748 */
2749 $wgUseKeyHeader = false;
2750
2751 /**
2752 * Add X-Forwarded-Proto to the Vary and Key headers for API requests and
2753 * RSS/Atom feeds. Use this if you have an SSL termination setup
2754 * and need to split the cache between HTTP and HTTPS for API requests,
2755 * feed requests and HTTP redirect responses in order to prevent cache
2756 * pollution. This does not affect 'normal' requests to index.php other than
2757 * HTTP redirects.
2758 */
2759 $wgVaryOnXFP = false;
2760
2761 /**
2762 * Internal server name as known to CDN, if different.
2763 *
2764 * @par Example:
2765 * @code
2766 * $wgInternalServer = 'http://yourinternal.tld:8000';
2767 * @endcode
2768 */
2769 $wgInternalServer = false;
2770
2771 /**
2772 * Cache TTL for the CDN sent as s-maxage (without ESI) or
2773 * Surrogate-Control (with ESI). Without ESI, you should strip
2774 * out s-maxage in the CDN config.
2775 *
2776 * 18000 seconds = 5 hours, more cache hits with 2678400 = 31 days.
2777 */
2778 $wgSquidMaxage = 18000;
2779
2780 /**
2781 * Cache timeout for the CDN when DB replica DB lag is high
2782 * @see $wgSquidMaxage
2783 * @since 1.27
2784 */
2785 $wgCdnMaxageLagged = 30;
2786
2787 /**
2788 * If set, any SquidPurge call on a URL or URLs will send a second purge no less than
2789 * this many seconds later via the job queue. This requires delayed job support.
2790 * This should be safely higher than the 'max lag' value in $wgLBFactoryConf, so that
2791 * replica DB lag does not cause page to be stuck in stales states in CDN.
2792 *
2793 * This also fixes race conditions in two-tiered CDN setups (e.g. cdn2 => cdn1 => MediaWiki).
2794 * If a purge for a URL reaches cdn2 before cdn1 and a request reaches cdn2 for that URL,
2795 * it will populate the response from the stale cdn1 value. When cdn1 gets the purge, cdn2
2796 * will still be stale. If the rebound purge delay is safely higher than the time to relay
2797 * a purge to all nodes, then the rebound puge will clear cdn2 after cdn1 was cleared.
2798 *
2799 * @since 1.27
2800 */
2801 $wgCdnReboundPurgeDelay = 0;
2802
2803 /**
2804 * Cache timeout for the CDN when a response is known to be wrong or incomplete (due to load)
2805 * @see $wgSquidMaxage
2806 * @since 1.27
2807 */
2808 $wgCdnMaxageSubstitute = 60;
2809
2810 /**
2811 * Default maximum age for raw CSS/JS accesses
2812 *
2813 * 300 seconds = 5 minutes.
2814 */
2815 $wgForcedRawSMaxage = 300;
2816
2817 /**
2818 * List of proxy servers to purge on changes; default port is 80. Use IP addresses.
2819 *
2820 * When MediaWiki is running behind a proxy, it will trust X-Forwarded-For
2821 * headers sent/modified from these proxies when obtaining the remote IP address
2822 *
2823 * For a list of trusted servers which *aren't* purged, see $wgSquidServersNoPurge.
2824 */
2825 $wgSquidServers = [];
2826
2827 /**
2828 * As above, except these servers aren't purged on page changes; use to set a
2829 * list of trusted proxies, etc. Supports both individual IP addresses and
2830 * CIDR blocks.
2831 * @since 1.23 Supports CIDR ranges
2832 */
2833 $wgSquidServersNoPurge = [];
2834
2835 /**
2836 * Whether to use a Host header in purge requests sent to the proxy servers
2837 * configured in $wgSquidServers. Set this to false to support Squid
2838 * configured in forward-proxy mode.
2839 *
2840 * If this is set to true, a Host header will be sent, and only the path
2841 * component of the URL will appear on the request line, as if the request
2842 * were a non-proxy HTTP 1.1 request. Varnish only supports this style of
2843 * request. Squid supports this style of request only if reverse-proxy mode
2844 * (http_port ... accel) is enabled.
2845 *
2846 * If this is set to false, no Host header will be sent, and the absolute URL
2847 * will be sent in the request line, as is the standard for an HTTP proxy
2848 * request in both HTTP 1.0 and 1.1. This style of request is not supported
2849 * by Varnish, but is supported by Squid in either configuration (forward or
2850 * reverse).
2851 *
2852 * @since 1.21
2853 * @deprecated since 1.33, will always be true in a future release.
2854 */
2855 $wgSquidPurgeUseHostHeader = true;
2856
2857 /**
2858 * Routing configuration for HTCP multicast purging. Add elements here to
2859 * enable HTCP and determine which purges are sent where. If set to an empty
2860 * array, HTCP is disabled.
2861 *
2862 * Each key in this array is a regular expression to match against the purged
2863 * URL, or an empty string to match all URLs. The purged URL is matched against
2864 * the regexes in the order specified, and the first rule whose regex matches
2865 * is used, all remaining rules will thus be ignored.
2866 *
2867 * @par Example configuration to send purges for upload.wikimedia.org to one
2868 * multicast group and all other purges to another:
2869 * @code
2870 * $wgHTCPRouting = [
2871 * '|^https?://upload\.wikimedia\.org|' => [
2872 * 'host' => '239.128.0.113',
2873 * 'port' => 4827,
2874 * ],
2875 * '' => [
2876 * 'host' => '239.128.0.112',
2877 * 'port' => 4827,
2878 * ],
2879 * ];
2880 * @endcode
2881 *
2882 * You can also pass an array of hosts to send purges too. This is useful when
2883 * you have several multicast groups or unicast address that should receive a
2884 * given purge. Multiple hosts support was introduced in MediaWiki 1.22.
2885 *
2886 * @par Example of sending purges to multiple hosts:
2887 * @code
2888 * $wgHTCPRouting = [
2889 * '' => [
2890 * // Purges to text caches using multicast
2891 * [ 'host' => '239.128.0.114', 'port' => '4827' ],
2892 * // Purges to a hardcoded list of caches
2893 * [ 'host' => '10.88.66.1', 'port' => '4827' ],
2894 * [ 'host' => '10.88.66.2', 'port' => '4827' ],
2895 * [ 'host' => '10.88.66.3', 'port' => '4827' ],
2896 * ],
2897 * ];
2898 * @endcode
2899 *
2900 * @since 1.22
2901 * @see $wgHTCPMulticastTTL
2902 */
2903 $wgHTCPRouting = [];
2904
2905 /**
2906 * HTCP multicast TTL.
2907 * @see $wgHTCPRouting
2908 */
2909 $wgHTCPMulticastTTL = 1;
2910
2911 /**
2912 * Should forwarded Private IPs be accepted?
2913 */
2914 $wgUsePrivateIPs = false;
2915
2916 /** @} */ # end of HTTP proxy settings
2917
2918 /************************************************************************//**
2919 * @name Language, regional and character encoding settings
2920 * @{
2921 */
2922
2923 /**
2924 * Site language code. See languages/data/Names.php for languages supported by
2925 * MediaWiki out of the box. Not all languages listed there have translations,
2926 * see languages/messages/ for the list of languages with some localisation.
2927 *
2928 * Warning: Don't use any of MediaWiki's deprecated language codes listed in
2929 * LanguageCode::getDeprecatedCodeMapping or $wgDummyLanguageCodes, like "no"
2930 * for Norwegian (use "nb" instead). If you do, things will break unexpectedly.
2931 *
2932 * This defines the default interface language for all users, but users can
2933 * change it in their preferences.
2934 *
2935 * This also defines the language of pages in the wiki. The content is wrapped
2936 * in a html element with lang=XX attribute. This behavior can be overridden
2937 * via hooks, see Title::getPageLanguage.
2938 */
2939 $wgLanguageCode = 'en';
2940
2941 /**
2942 * Language cache size, or really how many languages can we handle
2943 * simultaneously without degrading to crawl speed.
2944 */
2945 $wgLangObjCacheSize = 10;
2946
2947 /**
2948 * Some languages need different word forms, usually for different cases.
2949 * Used in Language::convertGrammar().
2950 *
2951 * @par Example:
2952 * @code
2953 * $wgGrammarForms['en']['genitive']['car'] = 'car\'s';
2954 * @endcode
2955 */
2956 $wgGrammarForms = [];
2957
2958 /**
2959 * Treat language links as magic connectors, not inline links
2960 */
2961 $wgInterwikiMagic = true;
2962
2963 /**
2964 * Hide interlanguage links from the sidebar
2965 */
2966 $wgHideInterlanguageLinks = false;
2967
2968 /**
2969 * List of additional interwiki prefixes that should be treated as
2970 * interlanguage links (i.e. placed in the sidebar).
2971 * Notes:
2972 * - This will not do anything unless the prefixes are defined in the interwiki
2973 * map.
2974 * - The display text for these custom interlanguage links will be fetched from
2975 * the system message "interlanguage-link-xyz" where xyz is the prefix in
2976 * this array.
2977 * - A friendly name for each site, used for tooltip text, may optionally be
2978 * placed in the system message "interlanguage-link-sitename-xyz" where xyz is
2979 * the prefix in this array.
2980 */
2981 $wgExtraInterlanguageLinkPrefixes = [];
2982
2983 /**
2984 * List of language names or overrides for default names in Names.php
2985 */
2986 $wgExtraLanguageNames = [];
2987
2988 /**
2989 * List of mappings from one language code to another.
2990 * This array makes the codes not appear as a selectable language on the
2991 * installer, and excludes them when running the transstat.php script.
2992 *
2993 * In Setup.php, the variable $wgDummyLanguageCodes is created by combining
2994 * these codes with a list of "deprecated" codes, which are mostly leftovers
2995 * from renames or other legacy things, and the internal codes 'qqq' and 'qqx'.
2996 * If a mapping in $wgExtraLanguageCodes collide with a built-in mapping, the
2997 * value in $wgExtraLanguageCodes will be used.
2998 *
2999 * @since 1.29
3000 */
3001 $wgExtraLanguageCodes = [
3002 // Language codes of macro languages, which get mapped to the main language
3003 'bh' => 'bho', // Bihari language family
3004 'no' => 'nb', // Norwegian language family
3005
3006 // Language variants which get mapped to the main language
3007 'simple' => 'en', // Simple English
3008 ];
3009
3010 /**
3011 * Functionally the same as $wgExtraLanguageCodes, but deprecated. Instead of
3012 * appending values to this array, append them to $wgExtraLanguageCodes.
3013 *
3014 * @deprecated since 1.29
3015 */
3016 $wgDummyLanguageCodes = [];
3017
3018 /**
3019 * Set this to true to replace Arabic presentation forms with their standard
3020 * forms in the U+0600-U+06FF block. This only works if $wgLanguageCode is
3021 * set to "ar".
3022 *
3023 * Note that pages with titles containing presentation forms will become
3024 * inaccessible, run maintenance/cleanupTitles.php to fix this.
3025 *
3026 * @deprecated since 1.33: in the future will always be true.
3027 */
3028 $wgFixArabicUnicode = true;
3029
3030 /**
3031 * Set this to true to replace ZWJ-based chillu sequences in Malayalam text
3032 * with their Unicode 5.1 equivalents. This only works if $wgLanguageCode is
3033 * set to "ml". Note that some clients (even new clients as of 2010) do not
3034 * support these characters.
3035 *
3036 * If you enable this on an existing wiki, run maintenance/cleanupTitles.php to
3037 * fix any ZWJ sequences in existing page titles.
3038 *
3039 * @deprecated since 1.33: in the future will always be true.
3040 */
3041 $wgFixMalayalamUnicode = true;
3042
3043 /**
3044 * Set this to always convert certain Unicode sequences to modern ones
3045 * regardless of the content language. This has a small performance
3046 * impact.
3047 *
3048 * See $wgFixArabicUnicode and $wgFixMalayalamUnicode for conversion
3049 * details.
3050 *
3051 * @since 1.17
3052 */
3053 $wgAllUnicodeFixes = false;
3054
3055 /**
3056 * Set this to eg 'ISO-8859-1' to perform character set conversion when
3057 * loading old revisions not marked with "utf-8" flag. Use this when
3058 * converting a wiki from MediaWiki 1.4 or earlier to UTF-8 without the
3059 * burdensome mass conversion of old text data.
3060 *
3061 * @note This DOES NOT touch any fields other than old_text. Titles, comments,
3062 * user names, etc still must be converted en masse in the database before
3063 * continuing as a UTF-8 wiki.
3064 */
3065 $wgLegacyEncoding = false;
3066
3067 /**
3068 * If set to true, the MediaWiki 1.4 to 1.5 schema conversion will
3069 * create stub reference rows in the text table instead of copying
3070 * the full text of all current entries from 'cur' to 'text'.
3071 *
3072 * This will speed up the conversion step for large sites, but
3073 * requires that the cur table be kept around for those revisions
3074 * to remain viewable.
3075 *
3076 * This option affects the updaters *only*. Any present cur stub
3077 * revisions will be readable at runtime regardless of this setting.
3078 */
3079 $wgLegacySchemaConversion = false;
3080
3081 /**
3082 * Enable dates like 'May 12' instead of '12 May', if the default date format
3083 * is 'dmy or mdy'.
3084 */
3085 $wgAmericanDates = false;
3086
3087 /**
3088 * For Hindi and Arabic use local numerals instead of Western style (0-9)
3089 * numerals in interface.
3090 */
3091 $wgTranslateNumerals = true;
3092
3093 /**
3094 * Translation using MediaWiki: namespace.
3095 * Interface messages will be loaded from the database.
3096 */
3097 $wgUseDatabaseMessages = true;
3098
3099 /**
3100 * Expiry time for the message cache key
3101 */
3102 $wgMsgCacheExpiry = 86400;
3103
3104 /**
3105 * Maximum entry size in the message cache, in bytes
3106 */
3107 $wgMaxMsgCacheEntrySize = 10000;
3108
3109 /**
3110 * Whether to enable language variant conversion.
3111 */
3112 $wgDisableLangConversion = false;
3113
3114 /**
3115 * Whether to enable language variant conversion for links.
3116 */
3117 $wgDisableTitleConversion = false;
3118
3119 /**
3120 * Default variant code, if false, the default will be the language code
3121 */
3122 $wgDefaultLanguageVariant = false;
3123
3124 /**
3125 * Whether to enable the pig Latin variant of English (en-x-piglatin),
3126 * used to ease variant development work.
3127 */
3128 $wgUsePigLatinVariant = false;
3129
3130 /**
3131 * Disabled variants array of language variant conversion.
3132 *
3133 * @par Example:
3134 * @code
3135 * $wgDisabledVariants[] = 'zh-mo';
3136 * $wgDisabledVariants[] = 'zh-my';
3137 * @endcode
3138 */
3139 $wgDisabledVariants = [];
3140
3141 /**
3142 * Like $wgArticlePath, but on multi-variant wikis, this provides a
3143 * path format that describes which parts of the URL contain the
3144 * language variant.
3145 *
3146 * @par Example:
3147 * @code
3148 * $wgLanguageCode = 'sr';
3149 * $wgVariantArticlePath = '/$2/$1';
3150 * $wgArticlePath = '/wiki/$1';
3151 * @endcode
3152 *
3153 * A link to /wiki/ would be redirected to /sr/Главна_страна
3154 *
3155 * It is important that $wgArticlePath not overlap with possible values
3156 * of $wgVariantArticlePath.
3157 */
3158 $wgVariantArticlePath = false;
3159
3160 /**
3161 * Show a bar of language selection links in the user login and user
3162 * registration forms; edit the "loginlanguagelinks" message to
3163 * customise these.
3164 */
3165 $wgLoginLanguageSelector = false;
3166
3167 /**
3168 * When translating messages with wfMessage(), it is not always clear what
3169 * should be considered UI messages and what should be content messages.
3170 *
3171 * For example, for the English Wikipedia, there should be only one 'mainpage',
3172 * so when getting the link for 'mainpage', we should treat it as site content
3173 * and call ->inContentLanguage()->text(), but for rendering the text of the
3174 * link, we call ->text(). The code behaves this way by default. However,
3175 * sites like the Wikimedia Commons do offer different versions of 'mainpage'
3176 * and the like for different languages. This array provides a way to override
3177 * the default behavior.
3178 *
3179 * @par Example:
3180 * To allow language-specific main page and community
3181 * portal:
3182 * @code
3183 * $wgForceUIMsgAsContentMsg = [ 'mainpage', 'portal-url' ];
3184 * @endcode
3185 */
3186 $wgForceUIMsgAsContentMsg = [];
3187
3188 /**
3189 * Fake out the timezone that the server thinks it's in. This will be used for
3190 * date display and not for what's stored in the DB. Leave to null to retain
3191 * your server's OS-based timezone value.
3192 *
3193 * This variable is currently used only for signature formatting and for local
3194 * time/date parser variables ({{LOCALTIME}} etc.)
3195 *
3196 * Timezones can be translated by editing MediaWiki messages of type
3197 * timezone-nameinlowercase like timezone-utc.
3198 *
3199 * A list of usable timezones can found at:
3200 * https://secure.php.net/manual/en/timezones.php
3201 *
3202 * @par Examples:
3203 * @code
3204 * $wgLocaltimezone = 'UTC';
3205 * $wgLocaltimezone = 'GMT';
3206 * $wgLocaltimezone = 'PST8PDT';
3207 * $wgLocaltimezone = 'Europe/Sweden';
3208 * $wgLocaltimezone = 'CET';
3209 * @endcode
3210 */
3211 $wgLocaltimezone = null;
3212
3213 /**
3214 * Set an offset from UTC in minutes to use for the default timezone setting
3215 * for anonymous users and new user accounts.
3216 *
3217 * This setting is used for most date/time displays in the software, and is
3218 * overridable in user preferences. It is *not* used for signature timestamps.
3219 *
3220 * By default, this will be set to match $wgLocaltimezone.
3221 */
3222 $wgLocalTZoffset = null;
3223
3224 /** @} */ # End of language/charset settings
3225
3226 /*************************************************************************//**
3227 * @name Output format and skin settings
3228 * @{
3229 */
3230
3231 /**
3232 * The default Content-Type header.
3233 */
3234 $wgMimeType = 'text/html';
3235
3236 /**
3237 * Previously used as content type in HTML script tags. This is now ignored since
3238 * HTML5 doesn't require a MIME type for script tags (javascript is the default).
3239 * It was also previously used by RawAction to determine the ctype query parameter
3240 * value that will result in a javascript response.
3241 * @deprecated since 1.22
3242 */
3243 $wgJsMimeType = null;
3244
3245 /**
3246 * The default xmlns attribute. The option to define this has been removed.
3247 * The value of this variable is no longer used by core and is set to a fixed
3248 * value in Setup.php for compatibility with extensions that depend on the value
3249 * of this variable being set. Such a dependency however is deprecated.
3250 * @deprecated since 1.22
3251 */
3252 $wgXhtmlDefaultNamespace = null;
3253
3254 /**
3255 * Previously used to determine if we should output an HTML5 doctype.
3256 * This is no longer used as we always output HTML5 now. For compatibility with
3257 * extensions that still check the value of this config it's value is now forced
3258 * to true by Setup.php.
3259 * @deprecated since 1.22
3260 */
3261 $wgHtml5 = true;
3262
3263 /**
3264 * Defines the value of the version attribute in the &lt;html&gt; tag, if any.
3265 *
3266 * If your wiki uses RDFa, set it to the correct value for RDFa+HTML5.
3267 * Correct current values are 'HTML+RDFa 1.0' or 'XHTML+RDFa 1.0'.
3268 * See also https://www.w3.org/TR/rdfa-in-html/#document-conformance
3269 * @since 1.16
3270 */
3271 $wgHtml5Version = null;
3272
3273 /**
3274 * Temporary variable that allows HTMLForms to be rendered as tables.
3275 * Table based layouts cause various issues when designing for mobile.
3276 * This global allows skins or extensions a means to force non-table based rendering.
3277 * Setting to false forces form components to always render as div elements.
3278 * @since 1.24
3279 */
3280 $wgHTMLFormAllowTableFormat = true;
3281
3282 /**
3283 * Temporary variable that applies MediaWiki UI wherever it can be supported.
3284 * Temporary variable that should be removed when mediawiki ui is more
3285 * stable and change has been communicated.
3286 * @since 1.24
3287 */
3288 $wgUseMediaWikiUIEverywhere = false;
3289
3290 /**
3291 * Whether to label the store-to-database-and-show-to-others button in the editor
3292 * as "Save page"/"Save changes" if false (the default) or, if true, instead as
3293 * "Publish page"/"Publish changes".
3294 *
3295 * @since 1.28
3296 */
3297 $wgEditSubmitButtonLabelPublish = false;
3298
3299 /**
3300 * Permit other namespaces in addition to the w3.org default.
3301 *
3302 * Use the prefix for the key and the namespace for the value.
3303 *
3304 * @par Example:
3305 * @code
3306 * $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg';
3307 * @endcode
3308 * Normally we wouldn't have to define this in the root "<html>"
3309 * element, but IE needs it there in some circumstances.
3310 *
3311 * This is ignored if $wgMimeType is set to a non-XML MIME type.
3312 */
3313 $wgXhtmlNamespaces = [];
3314
3315 /**
3316 * Site notice shown at the top of each page
3317 *
3318 * MediaWiki:Sitenotice page, which will override this. You can also
3319 * provide a separate message for logged-out users using the
3320 * MediaWiki:Anonnotice page.
3321 */
3322 $wgSiteNotice = '';
3323
3324 /**
3325 * Default skin, for new users and anonymous visitors. Registered users may
3326 * change this to any one of the other available skins in their preferences.
3327 */
3328 $wgDefaultSkin = 'vector';
3329
3330 /**
3331 * Fallback skin used when the skin defined by $wgDefaultSkin can't be found.
3332 *
3333 * @since 1.24
3334 */
3335 $wgFallbackSkin = 'fallback';
3336
3337 /**
3338 * Specify the names of skins that should not be presented in the list of
3339 * available skins in user preferences. If you want to remove a skin entirely,
3340 * remove it from the skins/ directory and its entry from LocalSettings.php.
3341 */
3342 $wgSkipSkins = [];
3343
3344 /**
3345 * @deprecated since 1.23; use $wgSkipSkins instead
3346 */
3347 $wgSkipSkin = '';
3348
3349 /**
3350 * Allow user Javascript page?
3351 * This enables a lot of neat customizations, but may
3352 * increase security risk to users and server load.
3353 */
3354 $wgAllowUserJs = false;
3355
3356 /**
3357 * Allow user Cascading Style Sheets (CSS)?
3358 * This enables a lot of neat customizations, but may
3359 * increase security risk to users and server load.
3360 */
3361 $wgAllowUserCss = false;
3362
3363 /**
3364 * Allow style-related user-preferences?
3365 *
3366 * This controls whether the `editfont` and `underline` preferences
3367 * are availabe to users.
3368 */
3369 $wgAllowUserCssPrefs = true;
3370
3371 /**
3372 * Use the site's Javascript page?
3373 */
3374 $wgUseSiteJs = true;
3375
3376 /**
3377 * Use the site's Cascading Style Sheets (CSS)?
3378 */
3379 $wgUseSiteCss = true;
3380
3381 /**
3382 * Break out of framesets. This can be used to prevent clickjacking attacks,
3383 * or to prevent external sites from framing your site with ads.
3384 */
3385 $wgBreakFrames = false;
3386
3387 /**
3388 * The X-Frame-Options header to send on pages sensitive to clickjacking
3389 * attacks, such as edit pages. This prevents those pages from being displayed
3390 * in a frame or iframe. The options are:
3391 *
3392 * - 'DENY': Do not allow framing. This is recommended for most wikis.
3393 *
3394 * - 'SAMEORIGIN': Allow framing by pages on the same domain. This can be used
3395 * to allow framing within a trusted domain. This is insecure if there
3396 * is a page on the same domain which allows framing of arbitrary URLs.
3397 *
3398 * - false: Allow all framing. This opens up the wiki to XSS attacks and thus
3399 * full compromise of local user accounts. Private wikis behind a
3400 * corporate firewall are especially vulnerable. This is not
3401 * recommended.
3402 *
3403 * For extra safety, set $wgBreakFrames = true, to prevent framing on all pages,
3404 * not just edit pages.
3405 */
3406 $wgEditPageFrameOptions = 'DENY';
3407
3408 /**
3409 * Disallow framing of API pages directly, by setting the X-Frame-Options
3410 * header. Since the API returns CSRF tokens, allowing the results to be
3411 * framed can compromise your user's account security.
3412 * Options are:
3413 * - 'DENY': Do not allow framing. This is recommended for most wikis.
3414 * - 'SAMEORIGIN': Allow framing by pages on the same domain.
3415 * - false: Allow all framing.
3416 * Note: $wgBreakFrames will override this for human formatted API output.
3417 */
3418 $wgApiFrameOptions = 'DENY';
3419
3420 /**
3421 * Disable output compression (enabled by default if zlib is available)
3422 */
3423 $wgDisableOutputCompression = false;
3424
3425 /**
3426 * How should section IDs be encoded?
3427 * This array can contain 1 or 2 elements, each of them can be one of:
3428 * - 'html5' is modern HTML5 style encoding with minimal escaping. Displays Unicode
3429 * characters in most browsers' address bars.
3430 * - 'legacy' is old MediaWiki-style encoding, e.g. 啤酒 turns into .E5.95.A4.E9.85.92
3431 *
3432 * The first element of this array specifies the primary mode of escaping IDs. This
3433 * is what users will see when they e.g. follow an [[#internal link]] to a section of
3434 * a page.
3435 *
3436 * The optional second element defines a fallback mode, useful for migrations.
3437 * If present, it will direct MediaWiki to add empty <span>s to every section with its
3438 * id attribute set to fallback encoded title so that links using the previous encoding
3439 * would still work.
3440 *
3441 * Example: you want to migrate your wiki from 'legacy' to 'html5'
3442 *
3443 * On the first step, set this variable to [ 'legacy', 'html5' ]. After a while, when
3444 * all caches (parser, HTTP, etc.) contain only pages generated with this setting,
3445 * flip the value to [ 'html5', 'legacy' ]. This will result in all internal links being
3446 * generated in the new encoding while old links (both external and cached internal) will
3447 * still work. After a long time, you might want to ditch backwards compatibility and
3448 * set it to [ 'html5' ]. After all, pages get edited, breaking incoming links no matter which
3449 * fragment mode is used.
3450 *
3451 * @since 1.30
3452 */
3453 $wgFragmentMode = [ 'legacy', 'html5' ];
3454
3455 /**
3456 * Which ID escaping mode should be used for external interwiki links? See documentation
3457 * for $wgFragmentMode above for details of each mode. Because you can't control external sites,
3458 * this setting should probably always be 'legacy', unless every wiki you link to has converted
3459 * to 'html5'.
3460 *
3461 * @since 1.30
3462 */
3463 $wgExternalInterwikiFragmentMode = 'legacy';
3464
3465 /**
3466 * Abstract list of footer icons for skins in place of old copyrightico and poweredbyico code
3467 * You can add new icons to the built in copyright or poweredby, or you can create
3468 * a new block. Though note that you may need to add some custom css to get good styling
3469 * of new blocks in monobook. vector and modern should work without any special css.
3470 *
3471 * $wgFooterIcons itself is a key/value array.
3472 * The key is the name of a block that the icons will be wrapped in. The final id varies
3473 * by skin; Monobook and Vector will turn poweredby into f-poweredbyico while Modern
3474 * turns it into mw_poweredby.
3475 * The value is either key/value array of icons or a string.
3476 * In the key/value array the key may or may not be used by the skin but it can
3477 * be used to find the icon and unset it or change the icon if needed.
3478 * This is useful for disabling icons that are set by extensions.
3479 * The value should be either a string or an array. If it is a string it will be output
3480 * directly as html, however some skins may choose to ignore it. An array is the preferred format
3481 * for the icon, the following keys are used:
3482 * - src: An absolute url to the image to use for the icon, this is recommended
3483 * but not required, however some skins will ignore icons without an image
3484 * - srcset: optional additional-resolution images; see HTML5 specs
3485 * - url: The url to use in the a element around the text or icon, if not set an a element will
3486 * not be outputted
3487 * - alt: This is the text form of the icon, it will be displayed without an image in
3488 * skins like Modern or if src is not set, and will otherwise be used as
3489 * the alt="" for the image. This key is required.
3490 * - width and height: If the icon specified by src is not of the standard size
3491 * you can specify the size of image to use with these keys.
3492 * Otherwise they will default to the standard 88x31.
3493 * @todo Reformat documentation.
3494 */
3495 $wgFooterIcons = [
3496 "copyright" => [
3497 "copyright" => [], // placeholder for the built in copyright icon
3498 ],
3499 "poweredby" => [
3500 "mediawiki" => [
3501 // Defaults to point at
3502 // "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png"
3503 // plus srcset for 1.5x, 2x resolution variants.
3504 "src" => null,
3505 "url" => "//www.mediawiki.org/",
3506 "alt" => "Powered by MediaWiki",
3507 ]
3508 ],
3509 ];
3510
3511 /**
3512 * Login / create account link behavior when it's possible for anonymous users
3513 * to create an account.
3514 * - true = use a combined login / create account link
3515 * - false = split login and create account into two separate links
3516 */
3517 $wgUseCombinedLoginLink = false;
3518
3519 /**
3520 * Display user edit counts in various prominent places.
3521 */
3522 $wgEdititis = false;
3523
3524 /**
3525 * Some web hosts attempt to rewrite all responses with a 404 (not found)
3526 * status code, mangling or hiding MediaWiki's output. If you are using such a
3527 * host, you should start looking for a better one. While you're doing that,
3528 * set this to false to convert some of MediaWiki's 404 responses to 200 so
3529 * that the generated error pages can be seen.
3530 *
3531 * In cases where for technical reasons it is more important for MediaWiki to
3532 * send the correct status code than for the body to be transmitted intact,
3533 * this configuration variable is ignored.
3534 */
3535 $wgSend404Code = true;
3536
3537 /**
3538 * The $wgShowRollbackEditCount variable is used to show how many edits can be rolled back.
3539 * The numeric value of the variable controls how many edits MediaWiki will look back to
3540 * determine whether a rollback is allowed (by checking that they are all from the same author).
3541 * If the value is false or 0, the edits are not counted. Disabling this will prevent MediaWiki
3542 * from hiding some useless rollback links.
3543 *
3544 * @since 1.20
3545 */
3546 $wgShowRollbackEditCount = 10;
3547
3548 /**
3549 * Output a <link rel="canonical"> tag on every page indicating the canonical
3550 * server which should be used, i.e. $wgServer or $wgCanonicalServer. Since
3551 * detection of the current server is unreliable, the link is sent
3552 * unconditionally.
3553 */
3554 $wgEnableCanonicalServerLink = false;
3555
3556 /**
3557 * When OutputHandler is used, mangle any output that contains
3558 * <cross-domain-policy>. Without this, an attacker can send their own
3559 * cross-domain policy unless it is prevented by the crossdomain.xml file at
3560 * the domain root.
3561 *
3562 * @since 1.25
3563 */
3564 $wgMangleFlashPolicy = true;
3565
3566 /** @} */ # End of output format settings }
3567
3568 /*************************************************************************//**
3569 * @name ResourceLoader settings
3570 * @{
3571 */
3572
3573 /**
3574 * Client-side resource modules.
3575 *
3576 * Extensions should add their ResourceLoader module definitions
3577 * to the $wgResourceModules variable.
3578 *
3579 * @par Example:
3580 * @code
3581 * $wgResourceModules['ext.myExtension'] = [
3582 * 'scripts' => 'myExtension.js',
3583 * 'styles' => 'myExtension.css',
3584 * 'dependencies' => [ 'jquery.cookie', 'jquery.tabIndex' ],
3585 * 'localBasePath' => __DIR__,
3586 * 'remoteExtPath' => 'MyExtension',
3587 * ];
3588 * @endcode
3589 */
3590 $wgResourceModules = [];
3591
3592 /**
3593 * Skin-specific styles for resource modules.
3594 *
3595 * These are later added to the 'skinStyles' list of the existing module. The 'styles' list can
3596 * not be modified or disabled.
3597 *
3598 * For example, here is a module "bar" and how skin Foo would provide additional styles for it.
3599 *
3600 * @par Example:
3601 * @code
3602 * $wgResourceModules['bar'] = [
3603 * 'scripts' => 'resources/bar/bar.js',
3604 * 'styles' => 'resources/bar/main.css',
3605 * ];
3606 *
3607 * $wgResourceModuleSkinStyles['foo'] = [
3608 * 'bar' => 'skins/Foo/bar.css',
3609 * ];
3610 * @endcode
3611 *
3612 * This is mostly equivalent to:
3613 *
3614 * @par Equivalent:
3615 * @code
3616 * $wgResourceModules['bar'] = [
3617 * 'scripts' => 'resources/bar/bar.js',
3618 * 'styles' => 'resources/bar/main.css',
3619 * 'skinStyles' => [
3620 * 'foo' => skins/Foo/bar.css',
3621 * ],
3622 * ];
3623 * @endcode
3624 *
3625 * If the module already defines its own entry in `skinStyles` for a given skin, then
3626 * $wgResourceModuleSkinStyles is ignored.
3627 *
3628 * If a module defines a `skinStyles['default']` the skin may want to extend that instead
3629 * of replacing them. This can be done using the `+` prefix.
3630 *
3631 * @par Example:
3632 * @code
3633 * $wgResourceModules['bar'] = [
3634 * 'scripts' => 'resources/bar/bar.js',
3635 * 'styles' => 'resources/bar/basic.css',
3636 * 'skinStyles' => [
3637 * 'default' => 'resources/bar/additional.css',
3638 * ],
3639 * ];
3640 * // Note the '+' character:
3641 * $wgResourceModuleSkinStyles['foo'] = [
3642 * '+bar' => 'skins/Foo/bar.css',
3643 * ];
3644 * @endcode
3645 *
3646 * This is mostly equivalent to:
3647 *
3648 * @par Equivalent:
3649 * @code
3650 * $wgResourceModules['bar'] = [
3651 * 'scripts' => 'resources/bar/bar.js',
3652 * 'styles' => 'resources/bar/basic.css',
3653 * 'skinStyles' => [
3654 * 'default' => 'resources/bar/additional.css',
3655 * 'foo' => [
3656 * 'resources/bar/additional.css',
3657 * 'skins/Foo/bar.css',
3658 * ],
3659 * ],
3660 * ];
3661 * @endcode
3662 *
3663 * In other words, as a module author, use the `styles` list for stylesheets that may not be
3664 * disabled by a skin. To provide default styles that may be extended or replaced,
3665 * use `skinStyles['default']`.
3666 *
3667 * As with $wgResourceModules, paths default to being relative to the MediaWiki root.
3668 * You should always provide a localBasePath and remoteBasePath (or remoteExtPath/remoteSkinPath).
3669 *
3670 * @par Example:
3671 * @code
3672 * $wgResourceModuleSkinStyles['foo'] = [
3673 * 'bar' => 'bar.css',
3674 * 'quux' => 'quux.css',
3675 * 'remoteSkinPath' => 'Foo',
3676 * 'localBasePath' => __DIR__,
3677 * ];
3678 * @endcode
3679 */
3680 $wgResourceModuleSkinStyles = [];
3681
3682 /**
3683 * Extensions should register foreign module sources here. 'local' is a
3684 * built-in source that is not in this array, but defined by
3685 * ResourceLoader::__construct() so that it cannot be unset.
3686 *
3687 * @par Example:
3688 * @code
3689 * $wgResourceLoaderSources['foo'] = 'http://example.org/w/load.php';
3690 * @endcode
3691 */
3692 $wgResourceLoaderSources = [];
3693
3694 /**
3695 * The default 'remoteBasePath' value for instances of ResourceLoaderFileModule.
3696 * Defaults to $wgScriptPath.
3697 */
3698 $wgResourceBasePath = null;
3699
3700 /**
3701 * Maximum time in seconds to cache resources served by ResourceLoader.
3702 * Used to set last modified headers (max-age/s-maxage).
3703 *
3704 * Following options to distinguish:
3705 * - versioned: Used for modules with a version, because changing version
3706 * numbers causes cache misses. This normally has a long expiry time.
3707 * - unversioned: Used for modules without a version to propagate changes
3708 * quickly to clients. Also used for modules with errors to recover quickly.
3709 * This normally has a short expiry time.
3710 *
3711 * Expiry time for the options to distinguish:
3712 * - server: Squid/Varnish but also any other public proxy cache between the
3713 * client and MediaWiki.
3714 * - client: On the client side (e.g. in the browser cache).
3715 */
3716 $wgResourceLoaderMaxage = [
3717 'versioned' => [
3718 'server' => 30 * 24 * 60 * 60, // 30 days
3719 'client' => 30 * 24 * 60 * 60, // 30 days
3720 ],
3721 'unversioned' => [
3722 'server' => 5 * 60, // 5 minutes
3723 'client' => 5 * 60, // 5 minutes
3724 ],
3725 ];
3726
3727 /**
3728 * The default debug mode (on/off) for of ResourceLoader requests.
3729 *
3730 * This will still be overridden when the debug URL parameter is used.
3731 */
3732 $wgResourceLoaderDebug = false;
3733
3734 /**
3735 * Whether to ensure the mediawiki.legacy library is loaded before other modules.
3736 *
3737 * @deprecated since 1.26: Always declare dependencies.
3738 */
3739 $wgIncludeLegacyJavaScript = false;
3740
3741 /**
3742 * Whether or not to assign configuration variables to the global window object.
3743 *
3744 * If this is set to false, old code using deprecated variables will no longer
3745 * work.
3746 *
3747 * @par Example of legacy code:
3748 * @code{,js}
3749 * if ( window.wgRestrictionEdit ) { ... }
3750 * @endcode
3751 * or:
3752 * @code{,js}
3753 * if ( wgIsArticle ) { ... }
3754 * @endcode
3755 *
3756 * Instead, one needs to use mw.config.
3757 * @par Example using mw.config global configuration:
3758 * @code{,js}
3759 * if ( mw.config.exists('wgRestrictionEdit') ) { ... }
3760 * @endcode
3761 * or:
3762 * @code{,js}
3763 * if ( mw.config.get('wgIsArticle') ) { ... }
3764 * @endcode
3765 */
3766 $wgLegacyJavaScriptGlobals = true;
3767
3768 /**
3769 * If set to a positive number, ResourceLoader will not generate URLs whose
3770 * query string is more than this many characters long, and will instead use
3771 * multiple requests with shorter query strings. This degrades performance,
3772 * but may be needed if your web server has a low (less than, say 1024)
3773 * query string length limit or a low value for suhosin.get.max_value_length
3774 * that you can't increase.
3775 *
3776 * If set to a negative number, ResourceLoader will assume there is no query
3777 * string length limit.
3778 *
3779 * Defaults to a value based on php configuration.
3780 */
3781 $wgResourceLoaderMaxQueryLength = false;
3782
3783 /**
3784 * If set to true, JavaScript modules loaded from wiki pages will be parsed
3785 * prior to minification to validate it.
3786 *
3787 * Parse errors will result in a JS exception being thrown during module load,
3788 * which avoids breaking other modules loaded in the same request.
3789 */
3790 $wgResourceLoaderValidateJS = true;
3791
3792 /**
3793 * When enabled, execution of JavaScript modules is profiled client-side.
3794 *
3795 * Instrumentation happens in mw.loader.profiler.
3796 * Use `mw.inspect('time')` from the browser console to display the data.
3797 *
3798 * @since 1.32
3799 */
3800 $wgResourceLoaderEnableJSProfiler = false;
3801
3802 /**
3803 * Whether ResourceLoader should attempt to persist modules in localStorage on
3804 * browsers that support the Web Storage API.
3805 */
3806 $wgResourceLoaderStorageEnabled = true;
3807
3808 /**
3809 * Cache version for client-side ResourceLoader module storage. You can trigger
3810 * invalidation of the contents of the module store by incrementing this value.
3811 *
3812 * @since 1.23
3813 */
3814 $wgResourceLoaderStorageVersion = 1;
3815
3816 /**
3817 * Whether to allow site-wide CSS (MediaWiki:Common.css and friends) on
3818 * restricted pages like Special:UserLogin or Special:Preferences where
3819 * JavaScript is disabled for security reasons. As it is possible to
3820 * execute JavaScript through CSS, setting this to true opens up a
3821 * potential security hole. Some sites may "skin" their wiki by using
3822 * site-wide CSS, causing restricted pages to look unstyled and different
3823 * from the rest of the site.
3824 *
3825 * @since 1.25
3826 */
3827 $wgAllowSiteCSSOnRestrictedPages = false;
3828
3829 /** @} */ # End of ResourceLoader settings }
3830
3831 /*************************************************************************//**
3832 * @name Page title and interwiki link settings
3833 * @{
3834 */
3835
3836 /**
3837 * Name of the project namespace. If left set to false, $wgSitename will be
3838 * used instead.
3839 */
3840 $wgMetaNamespace = false;
3841
3842 /**
3843 * Name of the project talk namespace.
3844 *
3845 * Normally you can ignore this and it will be something like
3846 * $wgMetaNamespace . "_talk". In some languages, you may want to set this
3847 * manually for grammatical reasons.
3848 */
3849 $wgMetaNamespaceTalk = false;
3850
3851 /**
3852 * Additional namespaces. If the namespaces defined in Language.php and
3853 * Namespace.php are insufficient, you can create new ones here, for example,
3854 * to import Help files in other languages. You can also override the namespace
3855 * names of existing namespaces. Extensions should use the CanonicalNamespaces
3856 * hook or extension.json.
3857 *
3858 * @warning Once you delete a namespace, the pages in that namespace will
3859 * no longer be accessible. If you rename it, then you can access them through
3860 * the new namespace name.
3861 *
3862 * Custom namespaces should start at 100 to avoid conflicting with standard
3863 * namespaces, and should always follow the even/odd main/talk pattern.
3864 *
3865 * @par Example:
3866 * @code
3867 * $wgExtraNamespaces = [
3868 * 100 => "Hilfe",
3869 * 101 => "Hilfe_Diskussion",
3870 * 102 => "Aide",
3871 * 103 => "Discussion_Aide"
3872 * ];
3873 * @endcode
3874 *
3875 * @todo Add a note about maintenance/namespaceDupes.php
3876 */
3877 $wgExtraNamespaces = [];
3878
3879 /**
3880 * Same as above, but for namespaces with gender distinction.
3881 * Note: the default form for the namespace should also be set
3882 * using $wgExtraNamespaces for the same index.
3883 * @since 1.18
3884 */
3885 $wgExtraGenderNamespaces = [];
3886
3887 /**
3888 * Namespace aliases.
3889 *
3890 * These are alternate names for the primary localised namespace names, which
3891 * are defined by $wgExtraNamespaces and the language file. If a page is
3892 * requested with such a prefix, the request will be redirected to the primary
3893 * name.
3894 *
3895 * Set this to a map from namespace names to IDs.
3896 *
3897 * @par Example:
3898 * @code
3899 * $wgNamespaceAliases = [
3900 * 'Wikipedian' => NS_USER,
3901 * 'Help' => 100,
3902 * ];
3903 * @endcode
3904 */
3905 $wgNamespaceAliases = [];
3906
3907 /**
3908 * Allowed title characters -- regex character class
3909 * Don't change this unless you know what you're doing
3910 *
3911 * Problematic punctuation:
3912 * - []{}|# Are needed for link syntax, never enable these
3913 * - <> Causes problems with HTML escaping, don't use
3914 * - % Enabled by default, minor problems with path to query rewrite rules, see below
3915 * - + Enabled by default, but doesn't work with path to query rewrite rules,
3916 * corrupted by apache
3917 * - ? Enabled by default, but doesn't work with path to PATH_INFO rewrites
3918 *
3919 * All three of these punctuation problems can be avoided by using an alias,
3920 * instead of a rewrite rule of either variety.
3921 *
3922 * The problem with % is that when using a path to query rewrite rule, URLs are
3923 * double-unescaped: once by Apache's path conversion code, and again by PHP. So
3924 * %253F, for example, becomes "?". Our code does not double-escape to compensate
3925 * for this, indeed double escaping would break if the double-escaped title was
3926 * passed in the query string rather than the path. This is a minor security issue
3927 * because articles can be created such that they are hard to view or edit.
3928 *
3929 * In some rare cases you may wish to remove + for compatibility with old links.
3930 */
3931 $wgLegalTitleChars = " %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+";
3932
3933 /**
3934 * The interwiki prefix of the current wiki, or false if it doesn't have one.
3935 *
3936 * @deprecated since 1.23; use $wgLocalInterwikis instead
3937 */
3938 $wgLocalInterwiki = false;
3939
3940 /**
3941 * Array for multiple $wgLocalInterwiki values, in case there are several
3942 * interwiki prefixes that point to the current wiki. If $wgLocalInterwiki is
3943 * set, its value is prepended to this array, for backwards compatibility.
3944 *
3945 * Note, recent changes feeds use only the first entry in this array (or
3946 * $wgLocalInterwiki, if it is set). See $wgRCFeeds
3947 */
3948 $wgLocalInterwikis = [];
3949
3950 /**
3951 * Expiry time for cache of interwiki table
3952 */
3953 $wgInterwikiExpiry = 10800;
3954
3955 /**
3956 * @name Interwiki caching settings.
3957 * @{
3958 */
3959
3960 /**
3961 * Interwiki cache, either as an associative array or a path to a constant
3962 * database (.cdb) file.
3963 *
3964 * This data structure database is generated by the `dumpInterwiki` maintenance
3965 * script (which lives in the WikimediaMaintenance repository) and has key
3966 * formats such as the following:
3967 *
3968 * - dbname:key - a simple key (e.g. enwiki:meta)
3969 * - _sitename:key - site-scope key (e.g. wiktionary:meta)
3970 * - __global:key - global-scope key (e.g. __global:meta)
3971 * - __sites:dbname - site mapping (e.g. __sites:enwiki)
3972 *
3973 * Sites mapping just specifies site name, other keys provide "local url"
3974 * data layout.
3975 *
3976 * @var bool|array|string
3977 */
3978 $wgInterwikiCache = false;
3979
3980 /**
3981 * Specify number of domains to check for messages.
3982 * - 1: Just wiki(db)-level
3983 * - 2: wiki and global levels
3984 * - 3: site levels
3985 */
3986 $wgInterwikiScopes = 3;
3987
3988 /**
3989 * Fallback site, if unable to resolve from cache
3990 */
3991 $wgInterwikiFallbackSite = 'wiki';
3992
3993 /** @} */ # end of Interwiki caching settings.
3994
3995 /**
3996 * @name SiteStore caching settings.
3997 * @{
3998 */
3999
4000 /**
4001 * Specify the file location for the Sites json cache file.
4002 */
4003 $wgSitesCacheFile = false;
4004
4005 /** @} */ # end of SiteStore caching settings.
4006
4007 /**
4008 * If local interwikis are set up which allow redirects,
4009 * set this regexp to restrict URLs which will be displayed
4010 * as 'redirected from' links.
4011 *
4012 * @par Example:
4013 * It might look something like this:
4014 * @code
4015 * $wgRedirectSources = '!^https?://[a-z-]+\.wikipedia\.org/!';
4016 * @endcode
4017 *
4018 * Leave at false to avoid displaying any incoming redirect markers.
4019 * This does not affect intra-wiki redirects, which don't change
4020 * the URL.
4021 */
4022 $wgRedirectSources = false;
4023
4024 /**
4025 * Set this to false to avoid forcing the first letter of links to capitals.
4026 *
4027 * @warning may break links! This makes links COMPLETELY case-sensitive. Links
4028 * appearing with a capital at the beginning of a sentence will *not* go to the
4029 * same place as links in the middle of a sentence using a lowercase initial.
4030 */
4031 $wgCapitalLinks = true;
4032
4033 /**
4034 * @since 1.16 - This can now be set per-namespace. Some special namespaces (such
4035 * as Special, see MWNamespace::$alwaysCapitalizedNamespaces for the full list) must be
4036 * true by default (and setting them has no effect), due to various things that
4037 * require them to be so. Also, since Talk namespaces need to directly mirror their
4038 * associated content namespaces, the values for those are ignored in favor of the
4039 * subject namespace's setting. Setting for NS_MEDIA is taken automatically from
4040 * NS_FILE.
4041 *
4042 * @par Example:
4043 * @code
4044 * $wgCapitalLinkOverrides[ NS_FILE ] = false;
4045 * @endcode
4046 */
4047 $wgCapitalLinkOverrides = [];
4048
4049 /**
4050 * Which namespaces should support subpages?
4051 * See Language.php for a list of namespaces.
4052 */
4053 $wgNamespacesWithSubpages = [
4054 NS_TALK => true,
4055 NS_USER => true,
4056 NS_USER_TALK => true,
4057 NS_PROJECT => true,
4058 NS_PROJECT_TALK => true,
4059 NS_FILE_TALK => true,
4060 NS_MEDIAWIKI => true,
4061 NS_MEDIAWIKI_TALK => true,
4062 NS_TEMPLATE => true,
4063 NS_TEMPLATE_TALK => true,
4064 NS_HELP => true,
4065 NS_HELP_TALK => true,
4066 NS_CATEGORY_TALK => true
4067 ];
4068
4069 /**
4070 * Array holding default tracking category names.
4071 *
4072 * Array contains the system messages for each tracking category.
4073 * Tracking categories allow pages with certain characteristics to be tracked.
4074 * It works by adding any such page to a category automatically.
4075 *
4076 * A message with the suffix '-desc' should be added as a description message
4077 * to have extra information on Special:TrackingCategories.
4078 *
4079 * @deprecated since 1.25 Extensions should now register tracking categories using
4080 * the new extension registration system.
4081 *
4082 * @since 1.23
4083 */
4084 $wgTrackingCategories = [];
4085
4086 /**
4087 * Array of namespaces which can be deemed to contain valid "content", as far
4088 * as the site statistics are concerned. Useful if additional namespaces also
4089 * contain "content" which should be considered when generating a count of the
4090 * number of articles in the wiki.
4091 */
4092 $wgContentNamespaces = [ NS_MAIN ];
4093
4094 /**
4095 * Optional array of namespaces which should be blacklisted from Special:ShortPages
4096 * Only pages inside $wgContentNamespaces but not $wgShortPagesNamespaceBlacklist will
4097 * be shown on that page.
4098 * @since 1.30
4099 */
4100 $wgShortPagesNamespaceBlacklist = [];
4101
4102 /**
4103 * Array of namespaces, in addition to the talk namespaces, where signatures
4104 * (~~~~) are likely to be used. This determines whether to display the
4105 * Signature button on the edit toolbar, and may also be used by extensions.
4106 * For example, "traditional" style wikis, where content and discussion are
4107 * intermixed, could place NS_MAIN and NS_PROJECT namespaces in this array.
4108 */
4109 $wgExtraSignatureNamespaces = [];
4110
4111 /**
4112 * Max number of redirects to follow when resolving redirects.
4113 * 1 means only the first redirect is followed (default behavior).
4114 * 0 or less means no redirects are followed.
4115 */
4116 $wgMaxRedirects = 1;
4117
4118 /**
4119 * Array of invalid page redirect targets.
4120 * Attempting to create a redirect to any of the pages in this array
4121 * will make the redirect fail.
4122 * Userlogout is hard-coded, so it does not need to be listed here.
4123 * (T12569) Disallow Mypage and Mytalk as well.
4124 *
4125 * As of now, this only checks special pages. Redirects to pages in
4126 * other namespaces cannot be invalidated by this variable.
4127 */
4128 $wgInvalidRedirectTargets = [ 'Filepath', 'Mypage', 'Mytalk', 'Redirect' ];
4129
4130 /** @} */ # End of title and interwiki settings }
4131
4132 /************************************************************************//**
4133 * @name Parser settings
4134 * These settings configure the transformation from wikitext to HTML.
4135 * @{
4136 */
4137
4138 /**
4139 * Parser configuration. Associative array with the following members:
4140 *
4141 * class The class name
4142 *
4143 * preprocessorClass The preprocessor class. Two classes are currently available:
4144 * Preprocessor_Hash, which uses plain PHP arrays for temporary
4145 * storage, and Preprocessor_DOM, which uses the DOM module for
4146 * temporary storage. Preprocessor_DOM generally uses less memory;
4147 * the speed of the two is roughly the same.
4148 *
4149 * If this parameter is not given, it uses Preprocessor_DOM if the
4150 * DOM module is available, otherwise it uses Preprocessor_Hash.
4151 *
4152 * The entire associative array will be passed through to the constructor as
4153 * the first parameter. Note that only Setup.php can use this variable --
4154 * the configuration will change at runtime via $wgParser member functions, so
4155 * the contents of this variable will be out-of-date. The variable can only be
4156 * changed during LocalSettings.php, in particular, it can't be changed during
4157 * an extension setup function.
4158 */
4159 $wgParserConf = [
4160 'class' => Parser::class,
4161 # 'preprocessorClass' => Preprocessor_Hash::class,
4162 ];
4163
4164 /**
4165 * Maximum indent level of toc.
4166 */
4167 $wgMaxTocLevel = 999;
4168
4169 /**
4170 * A complexity limit on template expansion: the maximum number of nodes visited
4171 * by PPFrame::expand()
4172 */
4173 $wgMaxPPNodeCount = 1000000;
4174
4175 /**
4176 * A complexity limit on template expansion: the maximum number of elements
4177 * generated by Preprocessor::preprocessToObj(). This allows you to limit the
4178 * amount of memory used by the Preprocessor_DOM node cache: testing indicates
4179 * that each element uses about 160 bytes of memory on a 64-bit processor, so
4180 * this default corresponds to about 155 MB.
4181 *
4182 * When the limit is exceeded, an exception is thrown.
4183 */
4184 $wgMaxGeneratedPPNodeCount = 1000000;
4185
4186 /**
4187 * Maximum recursion depth for templates within templates.
4188 * The current parser adds two levels to the PHP call stack for each template,
4189 * and xdebug limits the call stack to 100 by default. So this should hopefully
4190 * stop the parser before it hits the xdebug limit.
4191 */
4192 $wgMaxTemplateDepth = 40;
4193
4194 /**
4195 * @see $wgMaxTemplateDepth
4196 */
4197 $wgMaxPPExpandDepth = 40;
4198
4199 /**
4200 * URL schemes that should be recognized as valid by wfParseUrl().
4201 *
4202 * WARNING: Do not add 'file:' to this or internal file links will be broken.
4203 * Instead, if you want to support file links, add 'file://'. The same applies
4204 * to any other protocols with the same name as a namespace. See task T46011 for
4205 * more information.
4206 *
4207 * @see wfParseUrl
4208 */
4209 $wgUrlProtocols = [
4210 'bitcoin:', 'ftp://', 'ftps://', 'geo:', 'git://', 'gopher://', 'http://',
4211 'https://', 'irc://', 'ircs://', 'magnet:', 'mailto:', 'mms://', 'news:',
4212 'nntp://', 'redis://', 'sftp://', 'sip:', 'sips:', 'sms:', 'ssh://',
4213 'svn://', 'tel:', 'telnet://', 'urn:', 'worldwind://', 'xmpp:', '//'
4214 ];
4215
4216 /**
4217 * If true, removes (by substituting) templates in signatures.
4218 */
4219 $wgCleanSignatures = true;
4220
4221 /**
4222 * Whether to allow inline image pointing to other websites
4223 */
4224 $wgAllowExternalImages = false;
4225
4226 /**
4227 * If the above is false, you can specify an exception here. Image URLs
4228 * that start with this string are then rendered, while all others are not.
4229 * You can use this to set up a trusted, simple repository of images.
4230 * You may also specify an array of strings to allow multiple sites
4231 *
4232 * @par Examples:
4233 * @code
4234 * $wgAllowExternalImagesFrom = 'http://127.0.0.1/';
4235 * $wgAllowExternalImagesFrom = [ 'http://127.0.0.1/', 'http://example.com' ];
4236 * @endcode
4237 */
4238 $wgAllowExternalImagesFrom = '';
4239
4240 /**
4241 * If $wgAllowExternalImages is false, you can allow an on-wiki
4242 * whitelist of regular expression fragments to match the image URL
4243 * against. If the image matches one of the regular expression fragments,
4244 * The image will be displayed.
4245 *
4246 * Set this to true to enable the on-wiki whitelist (MediaWiki:External image whitelist)
4247 * Or false to disable it
4248 *
4249 * @since 1.14
4250 */
4251 $wgEnableImageWhitelist = false;
4252
4253 /**
4254 * A different approach to the above: simply allow the "<img>" tag to be used.
4255 * This allows you to specify alt text and other attributes, copy-paste HTML to
4256 * your wiki more easily, etc. However, allowing external images in any manner
4257 * will allow anyone with editing rights to snoop on your visitors' IP
4258 * addresses and so forth, if they wanted to, by inserting links to images on
4259 * sites they control.
4260 */
4261 $wgAllowImageTag = false;
4262
4263 /**
4264 * Configuration for HTML postprocessing tool. Set this to a configuration
4265 * array to enable an external tool. By default, we now use the RemexHtml
4266 * library; historically, other postprocessors were used.
4267 *
4268 * Setting this to null will use default settings.
4269 *
4270 * Keys include:
4271 * - driver: formerly used to select a postprocessor; now ignored.
4272 * - treeMutationTrace: a boolean to turn on Remex tracing
4273 * - serializerTrace: a boolean to turn on Remex tracing
4274 * - mungerTrace: a boolean to turn on Remex tracing
4275 * - pwrap: whether <p> wrapping should be done (default true)
4276 *
4277 * See includes/tidy/RemexDriver.php for detail on configuration.
4278 *
4279 * Overriding the default configuration is strongly discouraged in
4280 * production.
4281 */
4282 $wgTidyConfig = [ 'driver' => 'RemexHtml' ];
4283
4284 /**
4285 * Allow raw, unchecked HTML in "<html>...</html>" sections.
4286 * THIS IS VERY DANGEROUS on a publicly editable site, so USE wgGroupPermissions
4287 * TO RESTRICT EDITING to only those that you trust
4288 */
4289 $wgRawHtml = false;
4290
4291 /**
4292 * Set a default target for external links, e.g. _blank to pop up a new window.
4293 *
4294 * This will also set the "noreferrer" and "noopener" link rel to prevent the
4295 * attack described at https://mathiasbynens.github.io/rel-noopener/ .
4296 * Some older browsers may not support these link attributes, hence
4297 * setting $wgExternalLinkTarget to _blank may represent a security risk
4298 * to some of your users.
4299 */
4300 $wgExternalLinkTarget = false;
4301
4302 /**
4303 * If true, external URL links in wiki text will be given the
4304 * rel="nofollow" attribute as a hint to search engines that
4305 * they should not be followed for ranking purposes as they
4306 * are user-supplied and thus subject to spamming.
4307 */
4308 $wgNoFollowLinks = true;
4309
4310 /**
4311 * Namespaces in which $wgNoFollowLinks doesn't apply.
4312 * See Language.php for a list of namespaces.
4313 */
4314 $wgNoFollowNsExceptions = [];
4315
4316 /**
4317 * If this is set to an array of domains, external links to these domain names
4318 * (or any subdomains) will not be set to rel="nofollow" regardless of the
4319 * value of $wgNoFollowLinks. For instance:
4320 *
4321 * $wgNoFollowDomainExceptions = [ 'en.wikipedia.org', 'wiktionary.org', 'mediawiki.org' ];
4322 *
4323 * This would add rel="nofollow" to links to de.wikipedia.org, but not
4324 * en.wikipedia.org, wiktionary.org, en.wiktionary.org, us.en.wikipedia.org,
4325 * etc.
4326 *
4327 * Defaults to mediawiki.org for the links included in the software by default.
4328 */
4329 $wgNoFollowDomainExceptions = [ 'mediawiki.org' ];
4330
4331 /**
4332 * Allow DISPLAYTITLE to change title display
4333 */
4334 $wgAllowDisplayTitle = true;
4335
4336 /**
4337 * For consistency, restrict DISPLAYTITLE to text that normalizes to the same
4338 * canonical DB key. Also disallow some inline CSS rules like display: none;
4339 * which can cause the text to be hidden or unselectable.
4340 */
4341 $wgRestrictDisplayTitle = true;
4342
4343 /**
4344 * Maximum number of calls per parse to expensive parser functions such as
4345 * PAGESINCATEGORY.
4346 */
4347 $wgExpensiveParserFunctionLimit = 100;
4348
4349 /**
4350 * Preprocessor caching threshold
4351 * Setting it to 'false' will disable the preprocessor cache.
4352 */
4353 $wgPreprocessorCacheThreshold = 1000;
4354
4355 /**
4356 * Enable interwiki transcluding. Only when iw_trans=1 in the interwiki table.
4357 */
4358 $wgEnableScaryTranscluding = false;
4359
4360 /**
4361 * Expiry time for transcluded templates cached in object cache.
4362 * Only used $wgEnableInterwikiTranscluding is set to true.
4363 */
4364 $wgTranscludeCacheExpiry = 3600;
4365
4366 /**
4367 * Enable the magic links feature of automatically turning ISBN xxx,
4368 * PMID xxx, RFC xxx into links
4369 *
4370 * @since 1.28
4371 */
4372 $wgEnableMagicLinks = [
4373 'ISBN' => false,
4374 'PMID' => false,
4375 'RFC' => false
4376 ];
4377
4378 /** @} */ # end of parser settings }
4379
4380 /************************************************************************//**
4381 * @name Statistics
4382 * @{
4383 */
4384
4385 /**
4386 * Method used to determine if a page in a content namespace should be counted
4387 * as a valid article.
4388 *
4389 * Redirect pages will never be counted as valid articles.
4390 *
4391 * This variable can have the following values:
4392 * - 'any': all pages as considered as valid articles
4393 * - 'link': the page must contain a [[wiki link]] to be considered valid
4394 *
4395 * See also See https://www.mediawiki.org/wiki/Manual:Article_count
4396 *
4397 * Retroactively changing this variable will not affect the existing count,
4398 * to update it, you will need to run the maintenance/updateArticleCount.php
4399 * script.
4400 */
4401 $wgArticleCountMethod = 'link';
4402
4403 /**
4404 * How many days user must be idle before he is considered inactive. Will affect
4405 * the number shown on Special:Statistics, Special:ActiveUsers, and the
4406 * {{NUMBEROFACTIVEUSERS}} magic word in wikitext.
4407 * You might want to leave this as the default value, to provide comparable
4408 * numbers between different wikis.
4409 */
4410 $wgActiveUserDays = 30;
4411
4412 /** @} */ # End of statistics }
4413
4414 /************************************************************************//**
4415 * @name User accounts, authentication
4416 * @{
4417 */
4418
4419 /**
4420 * Central ID lookup providers
4421 * Key is the provider ID, value is a specification for ObjectFactory
4422 * @since 1.27
4423 */
4424 $wgCentralIdLookupProviders = [
4425 'local' => [ 'class' => LocalIdLookup::class ],
4426 ];
4427
4428 /**
4429 * Central ID lookup provider to use by default
4430 * @var string
4431 */
4432 $wgCentralIdLookupProvider = 'local';
4433
4434 /**
4435 * Password policy for the wiki.
4436 * Structured as
4437 * [
4438 * 'policies' => [ <group> => [ <policy> => <settings>, ... ], ... ],
4439 * 'checks' => [ <policy> => <callback>, ... ],
4440 * ]
4441 * where <group> is a user group, <policy> is a password policy name
4442 * (arbitrary string) defined in the 'checks' part, <callback> is the
4443 * PHP callable implementing the policy check, <settings> is an array
4444 * of options with the following keys:
4445 * - value: (number, boolean or null) the value to pass to the callback
4446 * - forceChange: (bool, default false) if the password is invalid, do
4447 * not let the user log in without changing the password
4448 * As a shorthand for [ 'value' => <value> ], simply <value> can be written.
4449 * When multiple password policies are defined for a user, the settings
4450 * arrays are merged, and for fields which are set in both arrays, the
4451 * larger value (as understood by PHP's 'max' method) is taken.
4452 *
4453 * A user's effective policy is the superset of all policy statements
4454 * from the policies for the groups where the user is a member. If more
4455 * than one group policy include the same policy statement, the value is
4456 * the max() of the values. Note true > false. The 'default' policy group
4457 * is required, and serves as the minimum policy for all users.
4458 *
4459 * Callbacks receive three arguments: the policy value, the User object
4460 * and the password; and must return a StatusValue. A non-good status
4461 * means the password will not be accepted for new accounts, and existing
4462 * accounts will be prompted for password change or barred from logging in
4463 * (depending on whether the status is a fatal or merely error/warning).
4464 *
4465 * The checks supported by core are:
4466 * - MinimalPasswordLength - Minimum length a user can set.
4467 * - MinimumPasswordLengthToLogin - Passwords shorter than this will
4468 * not be allowed to login, regardless if it is correct.
4469 * - MaximalPasswordLength - maximum length password a user is allowed
4470 * to attempt. Prevents DoS attacks with pbkdf2.
4471 * - PasswordCannotMatchUsername - Password cannot match the username.
4472 * - PasswordCannotMatchBlacklist - Username/password combination cannot
4473 * match a blacklist of default passwords used by MediaWiki in the past.
4474 * - PasswordCannotBePopular - Blacklist passwords which are known to be
4475 * commonly chosen. Set to integer n to ban the top n passwords.
4476 * If you want to ban all common passwords on file, use the
4477 * PHP_INT_MAX constant.
4478 * Deprecated since 1.33. Use PasswordNotInLargeBlacklist instead.
4479 * - PasswordNotInLargeBlacklist - Password not in best practices list of
4480 * 100,000 commonly used passwords. Due to the size of the list this
4481 * is a probabilistic test.
4482 *
4483 * If you add custom checks, for Special:PasswordPolicies to display them correctly,
4484 * every check should have a corresponding passwordpolicies-policy-<check> message,
4485 * and every settings field other than 'value' should have a corresponding
4486 * passwordpolicies-policyflag-<flag> message (<check> and <flag> are in lowercase).
4487 * The check message receives the policy value as a parameter, the flag message
4488 * receives the flag value (or values if it's an array).
4489 *
4490 * @since 1.26
4491 * @see PasswordPolicyChecks
4492 * @see User::checkPasswordValidity()
4493 */
4494 $wgPasswordPolicy = [
4495 'policies' => [
4496 'bureaucrat' => [
4497 'MinimalPasswordLength' => 10,
4498 'MinimumPasswordLengthToLogin' => 1,
4499 'PasswordNotInLargeBlacklist' => true,
4500 ],
4501 'sysop' => [
4502 'MinimalPasswordLength' => 10,
4503 'MinimumPasswordLengthToLogin' => 1,
4504 'PasswordNotInLargeBlacklist' => true,
4505 ],
4506 'interface-admin' => [
4507 'MinimalPasswordLength' => 10,
4508 'MinimumPasswordLengthToLogin' => 1,
4509 'PasswordNotInLargeBlacklist' => true,
4510 ],
4511 'bot' => [
4512 'MinimalPasswordLength' => 10,
4513 'MinimumPasswordLengthToLogin' => 1,
4514 'PasswordNotInLargeBlacklist' => true,
4515 ],
4516 'default' => [
4517 'MinimalPasswordLength' => 1,
4518 'PasswordCannotMatchUsername' => true,
4519 'PasswordCannotMatchBlacklist' => true,
4520 'MaximalPasswordLength' => 4096,
4521 ],
4522 ],
4523 'checks' => [
4524 'MinimalPasswordLength' => 'PasswordPolicyChecks::checkMinimalPasswordLength',
4525 'MinimumPasswordLengthToLogin' => 'PasswordPolicyChecks::checkMinimumPasswordLengthToLogin',
4526 'PasswordCannotMatchUsername' => 'PasswordPolicyChecks::checkPasswordCannotMatchUsername',
4527 'PasswordCannotMatchBlacklist' => 'PasswordPolicyChecks::checkPasswordCannotMatchBlacklist',
4528 'MaximalPasswordLength' => 'PasswordPolicyChecks::checkMaximalPasswordLength',
4529 'PasswordCannotBePopular' => 'PasswordPolicyChecks::checkPopularPasswordBlacklist',
4530 'PasswordNotInLargeBlacklist' => 'PasswordPolicyChecks::checkPasswordNotInLargeBlacklist',
4531 ],
4532 ];
4533
4534 /**
4535 * Configure AuthManager
4536 *
4537 * All providers are constructed using ObjectFactory, see that for the general
4538 * structure. The array may also contain a key "sort" used to order providers:
4539 * providers are stably sorted by this value, which should be an integer
4540 * (default is 0).
4541 *
4542 * Elements are:
4543 * - preauth: Array (keys ignored) of specifications for PreAuthenticationProviders
4544 * - primaryauth: Array (keys ignored) of specifications for PrimaryAuthenticationProviders
4545 * - secondaryauth: Array (keys ignored) of specifications for SecondaryAuthenticationProviders
4546 *
4547 * @since 1.27
4548 * @note If this is null or empty, the value from $wgAuthManagerAutoConfig is
4549 * used instead. Local customization should generally set this variable from
4550 * scratch to the desired configuration. Extensions that want to
4551 * auto-configure themselves should use $wgAuthManagerAutoConfig instead.
4552 */
4553 $wgAuthManagerConfig = null;
4554
4555 /**
4556 * @see $wgAuthManagerConfig
4557 * @since 1.27
4558 */
4559 $wgAuthManagerAutoConfig = [
4560 'preauth' => [
4561 MediaWiki\Auth\ThrottlePreAuthenticationProvider::class => [
4562 'class' => MediaWiki\Auth\ThrottlePreAuthenticationProvider::class,
4563 'sort' => 0,
4564 ],
4565 ],
4566 'primaryauth' => [
4567 // TemporaryPasswordPrimaryAuthenticationProvider should come before
4568 // any other PasswordAuthenticationRequest-based
4569 // PrimaryAuthenticationProvider (or at least any that might return
4570 // FAIL rather than ABSTAIN for a wrong password), or password reset
4571 // won't work right. Do not remove this (or change the key) or
4572 // auto-configuration of other such providers in extensions will
4573 // probably auto-insert themselves in the wrong place.
4574 MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider::class => [
4575 'class' => MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider::class,
4576 'args' => [ [
4577 // Fall through to LocalPasswordPrimaryAuthenticationProvider
4578 'authoritative' => false,
4579 ] ],
4580 'sort' => 0,
4581 ],
4582 MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider::class => [
4583 'class' => MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider::class,
4584 'args' => [ [
4585 // Last one should be authoritative, or else the user will get
4586 // a less-than-helpful error message (something like "supplied
4587 // authentication info not supported" rather than "wrong
4588 // password") if it too fails.
4589 'authoritative' => true,
4590 ] ],
4591 'sort' => 100,
4592 ],
4593 ],
4594 'secondaryauth' => [
4595 MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider::class => [
4596 'class' => MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider::class,
4597 'sort' => 0,
4598 ],
4599 MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProvider::class => [
4600 'class' => MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProvider::class,
4601 'sort' => 100,
4602 ],
4603 // Linking during login is experimental, enable at your own risk - T134952
4604 // MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider::class => [
4605 // 'class' => MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider::class,
4606 // 'sort' => 100,
4607 // ],
4608 MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProvider::class => [
4609 'class' => MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProvider::class,
4610 'sort' => 200,
4611 ],
4612 ],
4613 ];
4614
4615 /**
4616 * Time frame for re-authentication.
4617 *
4618 * With only password-based authentication, you'd just ask the user to re-enter
4619 * their password to verify certain operations like changing the password or
4620 * changing the account's email address. But under AuthManager, the user might
4621 * not have a password (you might even have to redirect the browser to a
4622 * third-party service or something complex like that), you might want to have
4623 * both factors of a two-factor authentication, and so on. So, the options are:
4624 * - Incorporate the whole multi-step authentication flow within everything
4625 * that needs to do this.
4626 * - Consider it good if they used Special:UserLogin during this session within
4627 * the last X seconds.
4628 * - Come up with a third option.
4629 *
4630 * MediaWiki currently takes the second option. This setting configures the
4631 * "X seconds".
4632 *
4633 * This allows for configuring different time frames for different
4634 * "operations". The operations used in MediaWiki core include:
4635 * - LinkAccounts
4636 * - UnlinkAccount
4637 * - ChangeCredentials
4638 * - RemoveCredentials
4639 * - ChangeEmail
4640 *
4641 * Additional operations may be used by extensions, either explicitly by
4642 * calling AuthManager::securitySensitiveOperationStatus(),
4643 * ApiAuthManagerHelper::securitySensitiveOperation() or
4644 * SpecialPage::checkLoginSecurityLevel(), or implicitly by overriding
4645 * SpecialPage::getLoginSecurityLevel() or by subclassing
4646 * AuthManagerSpecialPage.
4647 *
4648 * The key 'default' is used if a requested operation isn't defined in the array.
4649 *
4650 * @since 1.27
4651 * @var int[] operation => time in seconds. A 'default' key must always be provided.
4652 */
4653 $wgReauthenticateTime = [
4654 'default' => 300,
4655 ];
4656
4657 /**
4658 * Whether to allow security-sensitive operations when re-authentication is not possible.
4659 *
4660 * If AuthManager::canAuthenticateNow() is false (e.g. the current
4661 * SessionProvider is not able to change users, such as when OAuth is in use),
4662 * AuthManager::securitySensitiveOperationStatus() cannot sensibly return
4663 * SEC_REAUTH. Setting an operation true here will have it return SEC_OK in
4664 * that case, while setting it false will have it return SEC_FAIL.
4665 *
4666 * The key 'default' is used if a requested operation isn't defined in the array.
4667 *
4668 * @since 1.27
4669 * @see $wgReauthenticateTime
4670 * @var bool[] operation => boolean. A 'default' key must always be provided.
4671 */
4672 $wgAllowSecuritySensitiveOperationIfCannotReauthenticate = [
4673 'default' => true,
4674 ];
4675
4676 /**
4677 * List of AuthenticationRequest class names which are not changeable through
4678 * Special:ChangeCredentials and the changeauthenticationdata API.
4679 * This is only enforced on the client level; AuthManager itself (e.g.
4680 * AuthManager::allowsAuthenticationDataChange calls) is not affected.
4681 * Class names are checked for exact match (not for subclasses).
4682 * @since 1.27
4683 * @var string[]
4684 */
4685 $wgChangeCredentialsBlacklist = [
4686 \MediaWiki\Auth\TemporaryPasswordAuthenticationRequest::class
4687 ];
4688
4689 /**
4690 * List of AuthenticationRequest class names which are not removable through
4691 * Special:RemoveCredentials and the removeauthenticationdata API.
4692 * This is only enforced on the client level; AuthManager itself (e.g.
4693 * AuthManager::allowsAuthenticationDataChange calls) is not affected.
4694 * Class names are checked for exact match (not for subclasses).
4695 * @since 1.27
4696 * @var string[]
4697 */
4698 $wgRemoveCredentialsBlacklist = [
4699 \MediaWiki\Auth\PasswordAuthenticationRequest::class,
4700 ];
4701
4702 /**
4703 * For compatibility with old installations set to false
4704 * @deprecated since 1.24 will be removed in future
4705 */
4706 $wgPasswordSalt = true;
4707
4708 /**
4709 * Specifies the minimal length of a user password. If set to 0, empty pass-
4710 * words are allowed.
4711 * @deprecated since 1.26, use $wgPasswordPolicy's MinimalPasswordLength.
4712 */
4713 $wgMinimalPasswordLength = false;
4714
4715 /**
4716 * Specifies the maximal length of a user password (T64685).
4717 *
4718 * It is not recommended to make this greater than the default, as it can
4719 * allow DoS attacks by users setting really long passwords. In addition,
4720 * this should not be lowered too much, as it enforces weak passwords.
4721 *
4722 * @warning Unlike other password settings, user with passwords greater than
4723 * the maximum will not be able to log in.
4724 * @deprecated since 1.26, use $wgPasswordPolicy's MaximalPasswordLength.
4725 */
4726 $wgMaximalPasswordLength = false;
4727
4728 /**
4729 * Specifies if users should be sent to a password-reset form on login, if their
4730 * password doesn't meet the requirements of User::isValidPassword().
4731 * @since 1.23
4732 */
4733 $wgInvalidPasswordReset = true;
4734
4735 /**
4736 * Default password type to use when hashing user passwords
4737 *
4738 * @since 1.24
4739 */
4740 $wgPasswordDefault = 'pbkdf2';
4741
4742 /**
4743 * Configuration for built-in password types. Maps the password type
4744 * to an array of options. The 'class' option is the Password class to
4745 * use. All other options are class-dependent.
4746 *
4747 * An advanced example:
4748 * @code
4749 * $wgPasswordConfig['bcrypt-peppered'] = [
4750 * 'class' => EncryptedPassword::class,
4751 * 'underlying' => 'bcrypt',
4752 * 'secrets' => [
4753 * hash( 'sha256', 'secret', true ),
4754 * ],
4755 * 'cipher' => 'aes-256-cbc',
4756 * ];
4757 * @endcode
4758 *
4759 * @since 1.24
4760 */
4761 $wgPasswordConfig = [
4762 'A' => [
4763 'class' => MWOldPassword::class,
4764 ],
4765 'B' => [
4766 'class' => MWSaltedPassword::class,
4767 ],
4768 'pbkdf2-legacyA' => [
4769 'class' => LayeredParameterizedPassword::class,
4770 'types' => [
4771 'A',
4772 'pbkdf2',
4773 ],
4774 ],
4775 'pbkdf2-legacyB' => [
4776 'class' => LayeredParameterizedPassword::class,
4777 'types' => [
4778 'B',
4779 'pbkdf2',
4780 ],
4781 ],
4782 'bcrypt' => [
4783 'class' => BcryptPassword::class,
4784 'cost' => 9,
4785 ],
4786 'pbkdf2' => [
4787 'class' => Pbkdf2Password::class,
4788 'algo' => 'sha512',
4789 'cost' => '30000',
4790 'length' => '64',
4791 ],
4792 'argon2' => [
4793 'class' => Argon2Password::class,
4794
4795 // Algorithm used:
4796 // * 'argon2i' is optimized against side-channel attacks (PHP 7.2+)
4797 // * 'argon2id' is optimized against both side-channel and GPU cracking (PHP 7.3+)
4798 // * 'auto' to use best available algorithm. If you're using more than one server, be
4799 // careful when you're mixing PHP versions because newer PHP might generate hashes that
4800 // older versions might would not understand.
4801 'algo' => 'auto',
4802
4803 // The parameters below are the same as options accepted by password_hash().
4804 // Set them to override that function's defaults.
4805 //
4806 // 'memory_cost' => PASSWORD_ARGON2_DEFAULT_MEMORY_COST,
4807 // 'time_cost' => PASSWORD_ARGON2_DEFAULT_TIME_COST,
4808 // 'threads' => PASSWORD_ARGON2_DEFAULT_THREADS,
4809 ],
4810 ];
4811
4812 /**
4813 * Whether to allow password resets ("enter some identifying data, and we'll send an email
4814 * with a temporary password you can use to get back into the account") identified by
4815 * various bits of data. Setting all of these to false (or the whole variable to false)
4816 * has the effect of disabling password resets entirely
4817 */
4818 $wgPasswordResetRoutes = [
4819 'username' => true,
4820 'email' => true,
4821 ];
4822
4823 /**
4824 * Maximum number of Unicode characters in signature
4825 */
4826 $wgMaxSigChars = 255;
4827
4828 /**
4829 * Maximum number of bytes in username. You want to run the maintenance
4830 * script ./maintenance/checkUsernames.php once you have changed this value.
4831 */
4832 $wgMaxNameChars = 255;
4833
4834 /**
4835 * Array of usernames which may not be registered or logged in from
4836 * Maintenance scripts can still use these
4837 */
4838 $wgReservedUsernames = [
4839 'MediaWiki default', // Default 'Main Page' and MediaWiki: message pages
4840 'Conversion script', // Used for the old Wikipedia software upgrade
4841 'Maintenance script', // Maintenance scripts which perform editing, image import script
4842 'Template namespace initialisation script', // Used in 1.2->1.3 upgrade
4843 'ScriptImporter', // Default user name used by maintenance/importSiteScripts.php
4844 'Unknown user', // Used in WikiImporter and RevisionStore for revisions with no author
4845 'msg:double-redirect-fixer', // Automatic double redirect fix
4846 'msg:usermessage-editor', // Default user for leaving user messages
4847 'msg:proxyblocker', // For $wgProxyList and Special:Blockme (removed in 1.22)
4848 'msg:sorbs', // For $wgEnableDnsBlacklist etc.
4849 'msg:spambot_username', // Used by cleanupSpam.php
4850 'msg:autochange-username', // Used by anon category RC entries (parser functions, Lua & purges)
4851 ];
4852
4853 /**
4854 * Settings added to this array will override the default globals for the user
4855 * preferences used by anonymous visitors and newly created accounts.
4856 * For instance, to disable editing on double clicks:
4857 * $wgDefaultUserOptions ['editondblclick'] = 0;
4858 */
4859 $wgDefaultUserOptions = [
4860 'ccmeonemails' => 0,
4861 'cols' => 80, // @deprecated since 1.29 No longer used in core
4862 'date' => 'default',
4863 'diffonly' => 0,
4864 'disablemail' => 0,
4865 'editfont' => 'monospace',
4866 'editondblclick' => 0,
4867 'editsectiononrightclick' => 0,
4868 'email-allow-new-users' => 1,
4869 'enotifminoredits' => 0,
4870 'enotifrevealaddr' => 0,
4871 'enotifusertalkpages' => 1,
4872 'enotifwatchlistpages' => 1,
4873 'extendwatchlist' => 1,
4874 'fancysig' => 0,
4875 'forceeditsummary' => 0,
4876 'gender' => 'unknown',
4877 'hideminor' => 0,
4878 'hidepatrolled' => 0,
4879 'hidecategorization' => 1,
4880 'imagesize' => 2,
4881 'minordefault' => 0,
4882 'newpageshidepatrolled' => 0,
4883 'nickname' => '',
4884 'norollbackdiff' => 0,
4885 'numberheadings' => 0,
4886 'previewonfirst' => 0,
4887 'previewontop' => 1,
4888 'rcdays' => 7,
4889 'rcenhancedfilters' => 0,
4890 'rcenhancedfilters-disable' => 0,
4891 'rclimit' => 50,
4892 'rows' => 25, // @deprecated since 1.29 No longer used in core
4893 'showhiddencats' => 0,
4894 'shownumberswatching' => 1,
4895 'skin' => false,
4896 'stubthreshold' => 0,
4897 'thumbsize' => 5,
4898 'underline' => 2,
4899 'uselivepreview' => 0,
4900 'usenewrc' => 1,
4901 'watchcreations' => 1,
4902 'watchdefault' => 1,
4903 'watchdeletion' => 0,
4904 'watchuploads' => 1,
4905 'watchlistdays' => 7.0,
4906 'watchlisthideanons' => 0,
4907 'watchlisthidebots' => 0,
4908 'watchlisthideliu' => 0,
4909 'watchlisthideminor' => 0,
4910 'watchlisthideown' => 0,
4911 'watchlisthidepatrolled' => 0,
4912 'watchlisthidecategorization' => 1,
4913 'watchlistreloadautomatically' => 0,
4914 'watchlistunwatchlinks' => 0,
4915 'watchmoves' => 0,
4916 'watchrollback' => 0,
4917 'wlenhancedfilters-disable' => 0,
4918 'wllimit' => 250,
4919 'useeditwarning' => 1,
4920 'prefershttps' => 1,
4921 ];
4922
4923 /**
4924 * An array of preferences to not show for the user
4925 */
4926 $wgHiddenPrefs = [];
4927
4928 /**
4929 * Characters to prevent during new account creations.
4930 * This is used in a regular expression character class during
4931 * registration (regex metacharacters like / are escaped).
4932 */
4933 $wgInvalidUsernameCharacters = '@:';
4934
4935 /**
4936 * Character used as a delimiter when testing for interwiki userrights
4937 * (In Special:UserRights, it is possible to modify users on different
4938 * databases if the delimiter is used, e.g. "Someuser@enwiki").
4939 *
4940 * It is recommended that you have this delimiter in
4941 * $wgInvalidUsernameCharacters above, or you will not be able to
4942 * modify the user rights of those users via Special:UserRights
4943 */
4944 $wgUserrightsInterwikiDelimiter = '@';
4945
4946 /**
4947 * This is to let user authenticate using https when they come from http.
4948 * Based on an idea by George Herbert on wikitech-l:
4949 * https://lists.wikimedia.org/pipermail/wikitech-l/2010-October/050039.html
4950 * @since 1.17
4951 */
4952 $wgSecureLogin = false;
4953
4954 /**
4955 * Versioning for authentication tokens.
4956 *
4957 * If non-null, this is combined with the user's secret (the user_token field
4958 * in the DB) to generate the token cookie. Changing this will invalidate all
4959 * active sessions (i.e. it will log everyone out).
4960 *
4961 * @since 1.27
4962 * @var string|null
4963 */
4964 $wgAuthenticationTokenVersion = null;
4965
4966 /**
4967 * MediaWiki\Session\SessionProvider configuration.
4968 *
4969 * Value is an array of ObjectFactory specifications for the SessionProviders
4970 * to be used. Keys in the array are ignored. Order is not significant.
4971 *
4972 * @since 1.27
4973 */
4974 $wgSessionProviders = [
4975 MediaWiki\Session\CookieSessionProvider::class => [
4976 'class' => MediaWiki\Session\CookieSessionProvider::class,
4977 'args' => [ [
4978 'priority' => 30,
4979 'callUserSetCookiesHook' => true,
4980 ] ],
4981 ],
4982 MediaWiki\Session\BotPasswordSessionProvider::class => [
4983 'class' => MediaWiki\Session\BotPasswordSessionProvider::class,
4984 'args' => [ [
4985 'priority' => 75,
4986 ] ],
4987 ],
4988 ];
4989
4990 /** @} */ # end user accounts }
4991
4992 /************************************************************************//**
4993 * @name User rights, access control and monitoring
4994 * @{
4995 */
4996
4997 /**
4998 * Number of seconds before autoblock entries expire. Default 86400 = 1 day.
4999 */
5000 $wgAutoblockExpiry = 86400;
5001
5002 /**
5003 * Set this to true to allow blocked users to edit their own user talk page.
5004 *
5005 * This only applies to sitewide blocks. Partial blocks always allow users to
5006 * edit their own user talk page unless otherwise specified in the block
5007 * restrictions.
5008 */
5009 $wgBlockAllowsUTEdit = true;
5010
5011 /**
5012 * Allow sysops to ban users from accessing Emailuser
5013 */
5014 $wgSysopEmailBans = true;
5015
5016 /**
5017 * Limits on the possible sizes of range blocks.
5018 *
5019 * CIDR notation is hard to understand, it's easy to mistakenly assume that a
5020 * /1 is a small range and a /31 is a large range. For IPv4, setting a limit of
5021 * half the number of bits avoids such errors, and allows entire ISPs to be
5022 * blocked using a small number of range blocks.
5023 *
5024 * For IPv6, RFC 3177 recommends that a /48 be allocated to every residential
5025 * customer, so range blocks larger than /64 (half the number of bits) will
5026 * plainly be required. RFC 4692 implies that a very large ISP may be
5027 * allocated a /19 if a generous HD-Ratio of 0.8 is used, so we will use that
5028 * as our limit. As of 2012, blocking the whole world would require a /4 range.
5029 */
5030 $wgBlockCIDRLimit = [
5031 'IPv4' => 16, # Blocks larger than a /16 (64k addresses) will not be allowed
5032 'IPv6' => 19,
5033 ];
5034
5035 /**
5036 * If true, blocked users will not be allowed to login. When using this with
5037 * a public wiki, the effect of logging out blocked users may actually be
5038 * avers: unless the user's address is also blocked (e.g. auto-block),
5039 * logging the user out will again allow reading and editing, just as for
5040 * anonymous visitors.
5041 */
5042 $wgBlockDisablesLogin = false;
5043
5044 /**
5045 * Pages anonymous user may see, set as an array of pages titles.
5046 *
5047 * @par Example:
5048 * @code
5049 * $wgWhitelistRead = array ( "Main Page", "Wikipedia:Help");
5050 * @endcode
5051 *
5052 * Special:Userlogin and Special:ChangePassword are always whitelisted.
5053 *
5054 * @note This will only work if $wgGroupPermissions['*']['read'] is false --
5055 * see below. Otherwise, ALL pages are accessible, regardless of this setting.
5056 *
5057 * @note Also that this will only protect _pages in the wiki_. Uploaded files
5058 * will remain readable. You can use img_auth.php to protect uploaded files,
5059 * see https://www.mediawiki.org/wiki/Manual:Image_Authorization
5060 *
5061 * @note Extensions should not modify this, but use the TitleReadWhitelist
5062 * hook instead.
5063 */
5064 $wgWhitelistRead = false;
5065
5066 /**
5067 * Pages anonymous user may see, set as an array of regular expressions.
5068 *
5069 * This function will match the regexp against the title name, which
5070 * is without underscore.
5071 *
5072 * @par Example:
5073 * To whitelist [[Main Page]]:
5074 * @code
5075 * $wgWhitelistReadRegexp = [ "/Main Page/" ];
5076 * @endcode
5077 *
5078 * @note Unless ^ and/or $ is specified, a regular expression might match
5079 * pages not intended to be whitelisted. The above example will also
5080 * whitelist a page named 'Security Main Page'.
5081 *
5082 * @par Example:
5083 * To allow reading any page starting with 'User' regardless of the case:
5084 * @code
5085 * $wgWhitelistReadRegexp = [ "@^UsEr.*@i" ];
5086 * @endcode
5087 * Will allow both [[User is banned]] and [[User:JohnDoe]]
5088 *
5089 * @note This will only work if $wgGroupPermissions['*']['read'] is false --
5090 * see below. Otherwise, ALL pages are accessible, regardless of this setting.
5091 */
5092 $wgWhitelistReadRegexp = false;
5093
5094 /**
5095 * Should editors be required to have a validated e-mail
5096 * address before being allowed to edit?
5097 */
5098 $wgEmailConfirmToEdit = false;
5099
5100 /**
5101 * Should MediaWiki attempt to protect user's privacy when doing redirects?
5102 * Keep this true if access counts to articles are made public.
5103 */
5104 $wgHideIdentifiableRedirects = true;
5105
5106 /**
5107 * Permission keys given to users in each group.
5108 *
5109 * This is an array where the keys are all groups and each value is an
5110 * array of the format (right => boolean).
5111 *
5112 * The second format is used to support per-namespace permissions.
5113 * Note that this feature does not fully work for all permission types.
5114 *
5115 * All users are implicitly in the '*' group including anonymous visitors;
5116 * logged-in users are all implicitly in the 'user' group. These will be
5117 * combined with the permissions of all groups that a given user is listed
5118 * in in the user_groups table.
5119 *
5120 * Note: Don't set $wgGroupPermissions = []; unless you know what you're
5121 * doing! This will wipe all permissions, and may mean that your users are
5122 * unable to perform certain essential tasks or access new functionality
5123 * when new permissions are introduced and default grants established.
5124 *
5125 * Functionality to make pages inaccessible has not been extensively tested
5126 * for security. Use at your own risk!
5127 *
5128 * This replaces $wgWhitelistAccount and $wgWhitelistEdit
5129 */
5130 $wgGroupPermissions = [];
5131
5132 /** @cond file_level_code */
5133 // Implicit group for all visitors
5134 $wgGroupPermissions['*']['createaccount'] = true;
5135 $wgGroupPermissions['*']['read'] = true;
5136 $wgGroupPermissions['*']['edit'] = true;
5137 $wgGroupPermissions['*']['createpage'] = true;
5138 $wgGroupPermissions['*']['createtalk'] = true;
5139 $wgGroupPermissions['*']['writeapi'] = true;
5140 $wgGroupPermissions['*']['viewmywatchlist'] = true;
5141 $wgGroupPermissions['*']['editmywatchlist'] = true;
5142 $wgGroupPermissions['*']['viewmyprivateinfo'] = true;
5143 $wgGroupPermissions['*']['editmyprivateinfo'] = true;
5144 $wgGroupPermissions['*']['editmyoptions'] = true;
5145 # $wgGroupPermissions['*']['patrolmarks'] = false; // let anons see what was patrolled
5146
5147 // Implicit group for all logged-in accounts
5148 $wgGroupPermissions['user']['move'] = true;
5149 $wgGroupPermissions['user']['move-subpages'] = true;
5150 $wgGroupPermissions['user']['move-rootuserpages'] = true; // can move root userpages
5151 $wgGroupPermissions['user']['move-categorypages'] = true;
5152 $wgGroupPermissions['user']['movefile'] = true;
5153 $wgGroupPermissions['user']['read'] = true;
5154 $wgGroupPermissions['user']['edit'] = true;
5155 $wgGroupPermissions['user']['createpage'] = true;
5156 $wgGroupPermissions['user']['createtalk'] = true;
5157 $wgGroupPermissions['user']['writeapi'] = true;
5158 $wgGroupPermissions['user']['upload'] = true;
5159 $wgGroupPermissions['user']['reupload'] = true;
5160 $wgGroupPermissions['user']['reupload-shared'] = true;
5161 $wgGroupPermissions['user']['minoredit'] = true;
5162 $wgGroupPermissions['user']['editmyusercss'] = true;
5163 $wgGroupPermissions['user']['editmyuserjson'] = true;
5164 $wgGroupPermissions['user']['editmyuserjs'] = true;
5165 $wgGroupPermissions['user']['purge'] = true;
5166 $wgGroupPermissions['user']['sendemail'] = true;
5167 $wgGroupPermissions['user']['applychangetags'] = true;
5168 $wgGroupPermissions['user']['changetags'] = true;
5169 $wgGroupPermissions['user']['editcontentmodel'] = true;
5170
5171 // Implicit group for accounts that pass $wgAutoConfirmAge
5172 $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;
5173 $wgGroupPermissions['autoconfirmed']['editsemiprotected'] = true;
5174
5175 // Users with bot privilege can have their edits hidden
5176 // from various log pages by default
5177 $wgGroupPermissions['bot']['bot'] = true;
5178 $wgGroupPermissions['bot']['autoconfirmed'] = true;
5179 $wgGroupPermissions['bot']['editsemiprotected'] = true;
5180 $wgGroupPermissions['bot']['nominornewtalk'] = true;
5181 $wgGroupPermissions['bot']['autopatrol'] = true;
5182 $wgGroupPermissions['bot']['suppressredirect'] = true;
5183 $wgGroupPermissions['bot']['apihighlimits'] = true;
5184 $wgGroupPermissions['bot']['writeapi'] = true;
5185
5186 // Most extra permission abilities go to this group
5187 $wgGroupPermissions['sysop']['block'] = true;
5188 $wgGroupPermissions['sysop']['createaccount'] = true;
5189 $wgGroupPermissions['sysop']['delete'] = true;
5190 // can be separately configured for pages with > $wgDeleteRevisionsLimit revs
5191 $wgGroupPermissions['sysop']['bigdelete'] = true;
5192 // can view deleted history entries, but not see or restore the text
5193 $wgGroupPermissions['sysop']['deletedhistory'] = true;
5194 // can view deleted revision text
5195 $wgGroupPermissions['sysop']['deletedtext'] = true;
5196 $wgGroupPermissions['sysop']['undelete'] = true;
5197 $wgGroupPermissions['sysop']['editinterface'] = true;
5198 $wgGroupPermissions['sysop']['editsitejson'] = true;
5199 $wgGroupPermissions['sysop']['edituserjson'] = true;
5200 $wgGroupPermissions['sysop']['import'] = true;
5201 $wgGroupPermissions['sysop']['importupload'] = true;
5202 $wgGroupPermissions['sysop']['move'] = true;
5203 $wgGroupPermissions['sysop']['move-subpages'] = true;
5204 $wgGroupPermissions['sysop']['move-rootuserpages'] = true;
5205 $wgGroupPermissions['sysop']['move-categorypages'] = true;
5206 $wgGroupPermissions['sysop']['patrol'] = true;
5207 $wgGroupPermissions['sysop']['autopatrol'] = true;
5208 $wgGroupPermissions['sysop']['protect'] = true;
5209 $wgGroupPermissions['sysop']['editprotected'] = true;
5210 $wgGroupPermissions['sysop']['rollback'] = true;
5211 $wgGroupPermissions['sysop']['upload'] = true;
5212 $wgGroupPermissions['sysop']['reupload'] = true;
5213 $wgGroupPermissions['sysop']['reupload-shared'] = true;
5214 $wgGroupPermissions['sysop']['unwatchedpages'] = true;
5215 $wgGroupPermissions['sysop']['autoconfirmed'] = true;
5216 $wgGroupPermissions['sysop']['editsemiprotected'] = true;
5217 $wgGroupPermissions['sysop']['ipblock-exempt'] = true;
5218 $wgGroupPermissions['sysop']['blockemail'] = true;
5219 $wgGroupPermissions['sysop']['markbotedits'] = true;
5220 $wgGroupPermissions['sysop']['apihighlimits'] = true;
5221 $wgGroupPermissions['sysop']['browsearchive'] = true;
5222 $wgGroupPermissions['sysop']['noratelimit'] = true;
5223 $wgGroupPermissions['sysop']['movefile'] = true;
5224 $wgGroupPermissions['sysop']['unblockself'] = true;
5225 $wgGroupPermissions['sysop']['suppressredirect'] = true;
5226 # $wgGroupPermissions['sysop']['pagelang'] = true;
5227 # $wgGroupPermissions['sysop']['upload_by_url'] = true;
5228 $wgGroupPermissions['sysop']['mergehistory'] = true;
5229 $wgGroupPermissions['sysop']['managechangetags'] = true;
5230 $wgGroupPermissions['sysop']['deletechangetags'] = true;
5231
5232 $wgGroupPermissions['interface-admin']['editinterface'] = true;
5233 $wgGroupPermissions['interface-admin']['editsitecss'] = true;
5234 $wgGroupPermissions['interface-admin']['editsitejson'] = true;
5235 $wgGroupPermissions['interface-admin']['editsitejs'] = true;
5236 $wgGroupPermissions['interface-admin']['editusercss'] = true;
5237 $wgGroupPermissions['interface-admin']['edituserjson'] = true;
5238 $wgGroupPermissions['interface-admin']['edituserjs'] = true;
5239
5240 // Permission to change users' group assignments
5241 $wgGroupPermissions['bureaucrat']['userrights'] = true;
5242 $wgGroupPermissions['bureaucrat']['noratelimit'] = true;
5243 // Permission to change users' groups assignments across wikis
5244 # $wgGroupPermissions['bureaucrat']['userrights-interwiki'] = true;
5245 // Permission to export pages including linked pages regardless of $wgExportMaxLinkDepth
5246 # $wgGroupPermissions['bureaucrat']['override-export-depth'] = true;
5247
5248 # $wgGroupPermissions['sysop']['deletelogentry'] = true;
5249 # $wgGroupPermissions['sysop']['deleterevision'] = true;
5250 // To hide usernames from users and Sysops
5251 # $wgGroupPermissions['suppress']['hideuser'] = true;
5252 // To hide revisions/log items from users and Sysops
5253 # $wgGroupPermissions['suppress']['suppressrevision'] = true;
5254 // To view revisions/log items hidden from users and Sysops
5255 # $wgGroupPermissions['suppress']['viewsuppressed'] = true;
5256 // For private suppression log access
5257 # $wgGroupPermissions['suppress']['suppressionlog'] = true;
5258
5259 /**
5260 * The developer group is deprecated, but can be activated if need be
5261 * to use the 'lockdb' and 'unlockdb' special pages. Those require
5262 * that a lock file be defined and creatable/removable by the web
5263 * server.
5264 */
5265 # $wgGroupPermissions['developer']['siteadmin'] = true;
5266
5267 /** @endcond */
5268
5269 /**
5270 * Permission keys revoked from users in each group.
5271 *
5272 * This acts the same way as wgGroupPermissions above, except that
5273 * if the user is in a group here, the permission will be removed from them.
5274 *
5275 * Improperly setting this could mean that your users will be unable to perform
5276 * certain essential tasks, so use at your own risk!
5277 */
5278 $wgRevokePermissions = [];
5279
5280 /**
5281 * Implicit groups, aren't shown on Special:Listusers or somewhere else
5282 */
5283 $wgImplicitGroups = [ '*', 'user', 'autoconfirmed' ];
5284
5285 /**
5286 * A map of group names that the user is in, to group names that those users
5287 * are allowed to add or revoke.
5288 *
5289 * Setting the list of groups to add or revoke to true is equivalent to "any
5290 * group".
5291 *
5292 * @par Example:
5293 * To allow sysops to add themselves to the "bot" group:
5294 * @code
5295 * $wgGroupsAddToSelf = [ 'sysop' => [ 'bot' ] ];
5296 * @endcode
5297 *
5298 * @par Example:
5299 * Implicit groups may be used for the source group, for instance:
5300 * @code
5301 * $wgGroupsRemoveFromSelf = [ '*' => true ];
5302 * @endcode
5303 * This allows users in the '*' group (i.e. any user) to remove themselves from
5304 * any group that they happen to be in.
5305 */
5306 $wgGroupsAddToSelf = [];
5307
5308 /**
5309 * @see $wgGroupsAddToSelf
5310 */
5311 $wgGroupsRemoveFromSelf = [];
5312
5313 /**
5314 * Set of available actions that can be restricted via action=protect
5315 * You probably shouldn't change this.
5316 * Translated through restriction-* messages.
5317 * Title::getRestrictionTypes() will remove restrictions that are not
5318 * applicable to a specific title (create and upload)
5319 */
5320 $wgRestrictionTypes = [ 'create', 'edit', 'move', 'upload' ];
5321
5322 /**
5323 * Rights which can be required for each protection level (via action=protect)
5324 *
5325 * You can add a new protection level that requires a specific
5326 * permission by manipulating this array. The ordering of elements
5327 * dictates the order on the protection form's lists.
5328 *
5329 * - '' will be ignored (i.e. unprotected)
5330 * - 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility
5331 * - 'sysop' is quietly rewritten to 'editprotected' for backwards compatibility
5332 */
5333 $wgRestrictionLevels = [ '', 'autoconfirmed', 'sysop' ];
5334
5335 /**
5336 * Restriction levels that can be used with cascading protection
5337 *
5338 * A page can only be protected with cascading protection if the
5339 * requested restriction level is included in this array.
5340 *
5341 * 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility.
5342 * 'sysop' is quietly rewritten to 'editprotected' for backwards compatibility.
5343 */
5344 $wgCascadingRestrictionLevels = [ 'sysop' ];
5345
5346 /**
5347 * Restriction levels that should be considered "semiprotected"
5348 *
5349 * Certain places in the interface recognize a dichotomy between "protected"
5350 * and "semiprotected", without further distinguishing the specific levels. In
5351 * general, if anyone can be eligible to edit a protection level merely by
5352 * reaching some condition in $wgAutopromote, it should probably be considered
5353 * "semiprotected".
5354 *
5355 * 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility.
5356 * 'sysop' is not changed, since it really shouldn't be here.
5357 */
5358 $wgSemiprotectedRestrictionLevels = [ 'autoconfirmed' ];
5359
5360 /**
5361 * Set the minimum permissions required to edit pages in each
5362 * namespace. If you list more than one permission, a user must
5363 * have all of them to edit pages in that namespace.
5364 *
5365 * @note NS_MEDIAWIKI is implicitly restricted to 'editinterface'.
5366 */
5367 $wgNamespaceProtection = [];
5368
5369 /**
5370 * Pages in namespaces in this array can not be used as templates.
5371 *
5372 * Elements MUST be numeric namespace ids, you can safely use the MediaWiki
5373 * namespaces constants (NS_USER, NS_MAIN...).
5374 *
5375 * Among other things, this may be useful to enforce read-restrictions
5376 * which may otherwise be bypassed by using the template mechanism.
5377 */
5378 $wgNonincludableNamespaces = [];
5379
5380 /**
5381 * Number of seconds an account is required to age before it's given the
5382 * implicit 'autoconfirm' group membership. This can be used to limit
5383 * privileges of new accounts.
5384 *
5385 * Accounts created by earlier versions of the software may not have a
5386 * recorded creation date, and will always be considered to pass the age test.
5387 *
5388 * When left at 0, all registered accounts will pass.
5389 *
5390 * @par Example:
5391 * Set automatic confirmation to 10 minutes (which is 600 seconds):
5392 * @code
5393 * $wgAutoConfirmAge = 600; // ten minutes
5394 * @endcode
5395 * Set age to one day:
5396 * @code
5397 * $wgAutoConfirmAge = 3600*24; // one day
5398 * @endcode
5399 */
5400 $wgAutoConfirmAge = 0;
5401
5402 /**
5403 * Number of edits an account requires before it is autoconfirmed.
5404 * Passing both this AND the time requirement is needed. Example:
5405 *
5406 * @par Example:
5407 * @code
5408 * $wgAutoConfirmCount = 50;
5409 * @endcode
5410 */
5411 $wgAutoConfirmCount = 0;
5412
5413 /**
5414 * Array containing the conditions of automatic promotion of a user to specific groups.
5415 *
5416 * The basic syntax for `$wgAutopromote` is:
5417 *
5418 * $wgAutopromote = array(
5419 * 'groupname' => cond,
5420 * 'group2' => cond2,
5421 * );
5422 *
5423 * A `cond` may be:
5424 * - a single condition without arguments:
5425 * Note that Autopromote wraps a single non-array value into an array
5426 * e.g. `APCOND_EMAILCONFIRMED` OR
5427 * array( `APCOND_EMAILCONFIRMED` )
5428 * - a single condition with arguments:
5429 * e.g. `array( APCOND_EDITCOUNT, 100 )`
5430 * - a set of conditions:
5431 * e.g. `array( 'operand', cond1, cond2, ... )`
5432 *
5433 * When constructing a set of conditions, the following conditions are available:
5434 * - `&` (**AND**):
5435 * promote if user matches **ALL** conditions
5436 * - `|` (**OR**):
5437 * promote if user matches **ANY** condition
5438 * - `^` (**XOR**):
5439 * promote if user matches **ONLY ONE OF THE CONDITIONS**
5440 * - `!` (**NOT**):
5441 * promote if user matces **NO** condition
5442 * - array( APCOND_EMAILCONFIRMED ):
5443 * true if user has a confirmed e-mail
5444 * - array( APCOND_EDITCOUNT, number of edits ):
5445 * true if user has the at least the number of edits as the passed parameter
5446 * - array( APCOND_AGE, seconds since registration ):
5447 * true if the length of time since the user created his/her account
5448 * is at least the same length of time as the passed parameter
5449 * - array( APCOND_AGE_FROM_EDIT, seconds since first edit ):
5450 * true if the length of time since the user made his/her first edit
5451 * is at least the same length of time as the passed parameter
5452 * - array( APCOND_INGROUPS, group1, group2, ... ):
5453 * true if the user is a member of each of the passed groups
5454 * - array( APCOND_ISIP, ip ):
5455 * true if the user has the passed IP address
5456 * - array( APCOND_IPINRANGE, range ):
5457 * true if the user has an IP address in the range of the passed parameter
5458 * - array( APCOND_BLOCKED ):
5459 * true if the user is blocked
5460 * - array( APCOND_ISBOT ):
5461 * true if the user is a bot
5462 * - similar constructs can be defined by extensions
5463 *
5464 * The sets of conditions are evaluated recursively, so you can use nested sets of conditions
5465 * linked by operands.
5466 *
5467 * Note that if $wgEmailAuthentication is disabled, APCOND_EMAILCONFIRMED will be true for any
5468 * user who has provided an e-mail address.
5469 */
5470 $wgAutopromote = [
5471 'autoconfirmed' => [ '&',
5472 [ APCOND_EDITCOUNT, &$wgAutoConfirmCount ],
5473 [ APCOND_AGE, &$wgAutoConfirmAge ],
5474 ],
5475 ];
5476
5477 /**
5478 * Automatically add a usergroup to any user who matches certain conditions.
5479 *
5480 * Does not add the user to the group again if it has been removed.
5481 * Also, does not remove the group if the user no longer meets the criteria.
5482 *
5483 * The format is:
5484 * @code
5485 * [ event => criteria, ... ]
5486 * @endcode
5487 * Where event is either:
5488 * - 'onEdit' (when user edits)
5489 *
5490 * Criteria has the same format as $wgAutopromote
5491 *
5492 * @see $wgAutopromote
5493 * @since 1.18
5494 */
5495 $wgAutopromoteOnce = [
5496 'onEdit' => [],
5497 ];
5498
5499 /**
5500 * Put user rights log entries for autopromotion in recent changes?
5501 * @since 1.18
5502 */
5503 $wgAutopromoteOnceLogInRC = true;
5504
5505 /**
5506 * $wgAddGroups and $wgRemoveGroups can be used to give finer control over who
5507 * can assign which groups at Special:Userrights.
5508 *
5509 * @par Example:
5510 * Bureaucrats can add any group:
5511 * @code
5512 * $wgAddGroups['bureaucrat'] = true;
5513 * @endcode
5514 * Bureaucrats can only remove bots and sysops:
5515 * @code
5516 * $wgRemoveGroups['bureaucrat'] = [ 'bot', 'sysop' ];
5517 * @endcode
5518 * Sysops can make bots:
5519 * @code
5520 * $wgAddGroups['sysop'] = [ 'bot' ];
5521 * @endcode
5522 * Sysops can disable other sysops in an emergency, and disable bots:
5523 * @code
5524 * $wgRemoveGroups['sysop'] = [ 'sysop', 'bot' ];
5525 * @endcode
5526 */
5527 $wgAddGroups = [];
5528
5529 /**
5530 * @see $wgAddGroups
5531 */
5532 $wgRemoveGroups = [];
5533
5534 /**
5535 * A list of available rights, in addition to the ones defined by the core.
5536 * For extensions only.
5537 */
5538 $wgAvailableRights = [];
5539
5540 /**
5541 * Optional to restrict deletion of pages with higher revision counts
5542 * to users with the 'bigdelete' permission. (Default given to sysops.)
5543 */
5544 $wgDeleteRevisionsLimit = 0;
5545
5546 /**
5547 * Page deletions with > this number of revisions will use the job queue.
5548 * Revisions will be archived in batches of (at most) this size, one batch per job.
5549 */
5550 $wgDeleteRevisionsBatchSize = 1000;
5551
5552 /**
5553 * The maximum number of edits a user can have and
5554 * can still be hidden by users with the hideuser permission.
5555 * This is limited for performance reason.
5556 * Set to false to disable the limit.
5557 * @since 1.23
5558 */
5559 $wgHideUserContribLimit = 1000;
5560
5561 /**
5562 * Number of accounts each IP address may create per specified period(s).
5563 *
5564 * @par Example:
5565 * @code
5566 * $wgAccountCreationThrottle = [
5567 * // no more than 100 per month
5568 * [
5569 * 'count' => 100,
5570 * 'seconds' => 30*86400,
5571 * ],
5572 * // no more than 10 per day
5573 * [
5574 * 'count' => 10,
5575 * 'seconds' => 86400,
5576 * ],
5577 * ];
5578 * @endcode
5579 *
5580 * @warning Requires $wgMainCacheType to be enabled
5581 */
5582 $wgAccountCreationThrottle = [ [
5583 'count' => 0,
5584 'seconds' => 86400,
5585 ] ];
5586
5587 /**
5588 * Edits matching these regular expressions in body text
5589 * will be recognised as spam and rejected automatically.
5590 *
5591 * There's no administrator override on-wiki, so be careful what you set. :)
5592 * May be an array of regexes or a single string for backwards compatibility.
5593 *
5594 * @see https://en.wikipedia.org/wiki/Regular_expression
5595 *
5596 * @note Each regex needs a beginning/end delimiter, eg: # or /
5597 */
5598 $wgSpamRegex = [];
5599
5600 /**
5601 * Same as the above except for edit summaries
5602 */
5603 $wgSummarySpamRegex = [];
5604
5605 /**
5606 * Whether to use DNS blacklists in $wgDnsBlacklistUrls to check for open
5607 * proxies
5608 * @since 1.16
5609 */
5610 $wgEnableDnsBlacklist = false;
5611
5612 /**
5613 * List of DNS blacklists to use, if $wgEnableDnsBlacklist is true.
5614 *
5615 * This is an array of either a URL or an array with the URL and a key (should
5616 * the blacklist require a key).
5617 *
5618 * @par Example:
5619 * @code
5620 * $wgDnsBlacklistUrls = [
5621 * // String containing URL
5622 * 'http.dnsbl.sorbs.net.',
5623 * // Array with URL and key, for services that require a key
5624 * [ 'dnsbl.httpbl.net.', 'mykey' ],
5625 * // Array with just the URL. While this works, it is recommended that you
5626 * // just use a string as shown above
5627 * [ 'opm.tornevall.org.' ]
5628 * ];
5629 * @endcode
5630 *
5631 * @note You should end the domain name with a . to avoid searching your
5632 * eventual domain search suffixes.
5633 * @since 1.16
5634 */
5635 $wgDnsBlacklistUrls = [ 'http.dnsbl.sorbs.net.' ];
5636
5637 /**
5638 * Proxy whitelist, list of addresses that are assumed to be non-proxy despite
5639 * what the other methods might say.
5640 */
5641 $wgProxyWhitelist = [];
5642
5643 /**
5644 * IP ranges that should be considered soft-blocked (anon-only, account
5645 * creation allowed). The intent is to use this to prevent anonymous edits from
5646 * shared resources such as Wikimedia Labs.
5647 * @since 1.29
5648 * @var string[]
5649 */
5650 $wgSoftBlockRanges = [];
5651
5652 /**
5653 * Whether to look at the X-Forwarded-For header's list of (potentially spoofed)
5654 * IPs and apply IP blocks to them. This allows for IP blocks to work with correctly-configured
5655 * (transparent) proxies without needing to block the proxies themselves.
5656 */
5657 $wgApplyIpBlocksToXff = false;
5658
5659 /**
5660 * Simple rate limiter options to brake edit floods.
5661 *
5662 * Maximum number actions allowed in the given number of seconds; after that
5663 * the violating client receives HTTP 500 error pages until the period
5664 * elapses.
5665 *
5666 * @par Example:
5667 * Limits per configured per action and then type of users.
5668 * @code
5669 * $wgRateLimits = [
5670 * 'edit' => [
5671 * 'anon' => [ x, y ], // any and all anonymous edits (aggregate)
5672 * 'user' => [ x, y ], // each logged-in user
5673 * 'newbie' => [ x, y ], // each new autoconfirmed accounts; overrides 'user'
5674 * 'ip' => [ x, y ], // each anon and recent account
5675 * 'subnet' => [ x, y ], // ... within a /24 subnet in IPv4 or /64 in IPv6
5676 * 'groupName' => [ x, y ], // by group membership
5677 * ]
5678 * ];
5679 * @endcode
5680 *
5681 * @par Normally, the 'noratelimit' right allows a user to bypass any rate
5682 * limit checks. This can be disabled on a per-action basis by setting the
5683 * special '&can-bypass' key to false in that action's configuration.
5684 * @code
5685 * $wgRateLimits = [
5686 * 'some-action' => [
5687 * '&can-bypass' => false,
5688 * 'user' => [ x, y ],
5689 * ];
5690 * @endcode
5691 *
5692 * @warning Requires that $wgMainCacheType is set to something persistent
5693 */
5694 $wgRateLimits = [
5695 // Page edits
5696 'edit' => [
5697 'ip' => [ 8, 60 ],
5698 'newbie' => [ 8, 60 ],
5699 'user' => [ 90, 60 ],
5700 ],
5701 // Page moves
5702 'move' => [
5703 'newbie' => [ 2, 120 ],
5704 'user' => [ 8, 60 ],
5705 ],
5706 // File uploads
5707 'upload' => [
5708 'ip' => [ 8, 60 ],
5709 'newbie' => [ 8, 60 ],
5710 ],
5711 // Page rollbacks
5712 'rollback' => [
5713 'user' => [ 10, 60 ],
5714 'newbie' => [ 5, 120 ]
5715 ],
5716 // Triggering password resets emails
5717 'mailpassword' => [
5718 'ip' => [ 5, 3600 ],
5719 ],
5720 // Emailing other users using MediaWiki
5721 'emailuser' => [
5722 'ip' => [ 5, 86400 ],
5723 'newbie' => [ 5, 86400 ],
5724 'user' => [ 20, 86400 ],
5725 ],
5726 // Purging pages
5727 'purge' => [
5728 'ip' => [ 30, 60 ],
5729 'user' => [ 30, 60 ],
5730 ],
5731 // Purges of link tables
5732 'linkpurge' => [
5733 'ip' => [ 30, 60 ],
5734 'user' => [ 30, 60 ],
5735 ],
5736 // Files rendered via thumb.php or thumb_handler.php
5737 'renderfile' => [
5738 'ip' => [ 700, 30 ],
5739 'user' => [ 700, 30 ],
5740 ],
5741 // Same as above but for non-standard thumbnails
5742 'renderfile-nonstandard' => [
5743 'ip' => [ 70, 30 ],
5744 'user' => [ 70, 30 ],
5745 ],
5746 // Stashing edits into cache before save
5747 'stashedit' => [
5748 'ip' => [ 30, 60 ],
5749 'newbie' => [ 30, 60 ],
5750 ],
5751 // Adding or removing change tags
5752 'changetag' => [
5753 'ip' => [ 8, 60 ],
5754 'newbie' => [ 8, 60 ],
5755 ],
5756 // Changing the content model of a page
5757 'editcontentmodel' => [
5758 'newbie' => [ 2, 120 ],
5759 'user' => [ 8, 60 ],
5760 ],
5761 ];
5762
5763 /**
5764 * Array of IPs / CIDR ranges which should be excluded from rate limits.
5765 * This may be useful for whitelisting NAT gateways for conferences, etc.
5766 */
5767 $wgRateLimitsExcludedIPs = [];
5768
5769 /**
5770 * Log IP addresses in the recentchanges table; can be accessed only by
5771 * extensions (e.g. CheckUser) or a DB admin
5772 * Used for retroactive autoblocks
5773 */
5774 $wgPutIPinRC = true;
5775
5776 /**
5777 * Integer defining default number of entries to show on
5778 * special pages which are query-pages such as Special:Whatlinkshere.
5779 */
5780 $wgQueryPageDefaultLimit = 50;
5781
5782 /**
5783 * Limit password attempts to X attempts per Y seconds per IP per account.
5784 *
5785 * Value is an array of arrays. Each sub-array must have a key for count
5786 * (ie count of how many attempts before throttle) and a key for seconds.
5787 * If the key 'allIPs' (case sensitive) is present, then the limit is
5788 * just per account instead of per IP per account.
5789 *
5790 * @since 1.27 allIps support and multiple limits added in 1.27. Prior
5791 * to 1.27 this only supported having a single throttle.
5792 * @warning Requires $wgMainCacheType to be enabled
5793 */
5794 $wgPasswordAttemptThrottle = [
5795 // Short term limit
5796 [ 'count' => 5, 'seconds' => 300 ],
5797 // Long term limit. We need to balance the risk
5798 // of somebody using this as a DoS attack to lock someone
5799 // out of their account, and someone doing a brute force attack.
5800 [ 'count' => 150, 'seconds' => 60 * 60 * 48 ],
5801 ];
5802
5803 /**
5804 * @var array Map of (grant => right => boolean)
5805 * Users authorize consumers (like Apps) to act on their behalf but only with
5806 * a subset of the user's normal account rights (signed off on by the user).
5807 * The possible rights to grant to a consumer are bundled into groups called
5808 * "grants". Each grant defines some rights it lets consumers inherit from the
5809 * account they may act on behalf of. Note that a user granting a right does
5810 * nothing if that user does not actually have that right to begin with.
5811 * @since 1.27
5812 */
5813 $wgGrantPermissions = [];
5814
5815 // @TODO: clean up grants
5816 // @TODO: auto-include read/editsemiprotected rights?
5817
5818 $wgGrantPermissions['basic']['autoconfirmed'] = true;
5819 $wgGrantPermissions['basic']['autopatrol'] = true;
5820 $wgGrantPermissions['basic']['editsemiprotected'] = true;
5821 $wgGrantPermissions['basic']['ipblock-exempt'] = true;
5822 $wgGrantPermissions['basic']['nominornewtalk'] = true;
5823 $wgGrantPermissions['basic']['patrolmarks'] = true;
5824 $wgGrantPermissions['basic']['purge'] = true;
5825 $wgGrantPermissions['basic']['read'] = true;
5826 $wgGrantPermissions['basic']['skipcaptcha'] = true;
5827 $wgGrantPermissions['basic']['writeapi'] = true;
5828
5829 $wgGrantPermissions['highvolume']['bot'] = true;
5830 $wgGrantPermissions['highvolume']['apihighlimits'] = true;
5831 $wgGrantPermissions['highvolume']['noratelimit'] = true;
5832 $wgGrantPermissions['highvolume']['markbotedits'] = true;
5833
5834 $wgGrantPermissions['editpage']['edit'] = true;
5835 $wgGrantPermissions['editpage']['minoredit'] = true;
5836 $wgGrantPermissions['editpage']['applychangetags'] = true;
5837 $wgGrantPermissions['editpage']['changetags'] = true;
5838
5839 $wgGrantPermissions['editprotected'] = $wgGrantPermissions['editpage'];
5840 $wgGrantPermissions['editprotected']['editprotected'] = true;
5841
5842 // FIXME: Rename editmycssjs to editmyconfig
5843 $wgGrantPermissions['editmycssjs'] = $wgGrantPermissions['editpage'];
5844 $wgGrantPermissions['editmycssjs']['editmyusercss'] = true;
5845 $wgGrantPermissions['editmycssjs']['editmyuserjson'] = true;
5846 $wgGrantPermissions['editmycssjs']['editmyuserjs'] = true;
5847
5848 $wgGrantPermissions['editmyoptions']['editmyoptions'] = true;
5849 $wgGrantPermissions['editmyoptions']['editmyuserjson'] = true;
5850
5851 $wgGrantPermissions['editinterface'] = $wgGrantPermissions['editpage'];
5852 $wgGrantPermissions['editinterface']['editinterface'] = true;
5853 $wgGrantPermissions['editinterface']['edituserjson'] = true;
5854 $wgGrantPermissions['editinterface']['editsitejson'] = true;
5855
5856 $wgGrantPermissions['editsiteconfig'] = $wgGrantPermissions['editinterface'];
5857 $wgGrantPermissions['editsiteconfig']['editusercss'] = true;
5858 $wgGrantPermissions['editsiteconfig']['edituserjs'] = true;
5859 $wgGrantPermissions['editsiteconfig']['editsitecss'] = true;
5860 $wgGrantPermissions['editsiteconfig']['editsitejs'] = true;
5861
5862 $wgGrantPermissions['createeditmovepage'] = $wgGrantPermissions['editpage'];
5863 $wgGrantPermissions['createeditmovepage']['createpage'] = true;
5864 $wgGrantPermissions['createeditmovepage']['createtalk'] = true;
5865 $wgGrantPermissions['createeditmovepage']['move'] = true;
5866 $wgGrantPermissions['createeditmovepage']['move-rootuserpages'] = true;
5867 $wgGrantPermissions['createeditmovepage']['move-subpages'] = true;
5868 $wgGrantPermissions['createeditmovepage']['move-categorypages'] = true;
5869
5870 $wgGrantPermissions['uploadfile']['upload'] = true;
5871 $wgGrantPermissions['uploadfile']['reupload-own'] = true;
5872
5873 $wgGrantPermissions['uploadeditmovefile'] = $wgGrantPermissions['uploadfile'];
5874 $wgGrantPermissions['uploadeditmovefile']['reupload'] = true;
5875 $wgGrantPermissions['uploadeditmovefile']['reupload-shared'] = true;
5876 $wgGrantPermissions['uploadeditmovefile']['upload_by_url'] = true;
5877 $wgGrantPermissions['uploadeditmovefile']['movefile'] = true;
5878 $wgGrantPermissions['uploadeditmovefile']['suppressredirect'] = true;
5879
5880 $wgGrantPermissions['patrol']['patrol'] = true;
5881
5882 $wgGrantPermissions['rollback']['rollback'] = true;
5883
5884 $wgGrantPermissions['blockusers']['block'] = true;
5885 $wgGrantPermissions['blockusers']['blockemail'] = true;
5886
5887 $wgGrantPermissions['viewdeleted']['browsearchive'] = true;
5888 $wgGrantPermissions['viewdeleted']['deletedhistory'] = true;
5889 $wgGrantPermissions['viewdeleted']['deletedtext'] = true;
5890
5891 $wgGrantPermissions['viewrestrictedlogs']['suppressionlog'] = true;
5892
5893 $wgGrantPermissions['delete'] = $wgGrantPermissions['editpage'] +
5894 $wgGrantPermissions['viewdeleted'];
5895 $wgGrantPermissions['delete']['delete'] = true;
5896 $wgGrantPermissions['delete']['bigdelete'] = true;
5897 $wgGrantPermissions['delete']['deletelogentry'] = true;
5898 $wgGrantPermissions['delete']['deleterevision'] = true;
5899 $wgGrantPermissions['delete']['undelete'] = true;
5900
5901 $wgGrantPermissions['oversight']['suppressrevision'] = true;
5902
5903 $wgGrantPermissions['protect'] = $wgGrantPermissions['editprotected'];
5904 $wgGrantPermissions['protect']['protect'] = true;
5905
5906 $wgGrantPermissions['viewmywatchlist']['viewmywatchlist'] = true;
5907
5908 $wgGrantPermissions['editmywatchlist']['editmywatchlist'] = true;
5909
5910 $wgGrantPermissions['sendemail']['sendemail'] = true;
5911
5912 $wgGrantPermissions['createaccount']['createaccount'] = true;
5913
5914 $wgGrantPermissions['privateinfo']['viewmyprivateinfo'] = true;
5915
5916 /**
5917 * @var array Map of grants to their UI grouping
5918 * @since 1.27
5919 */
5920 $wgGrantPermissionGroups = [
5921 // Hidden grants are implicitly present
5922 'basic' => 'hidden',
5923
5924 'editpage' => 'page-interaction',
5925 'createeditmovepage' => 'page-interaction',
5926 'editprotected' => 'page-interaction',
5927 'patrol' => 'page-interaction',
5928
5929 'uploadfile' => 'file-interaction',
5930 'uploadeditmovefile' => 'file-interaction',
5931
5932 'sendemail' => 'email',
5933
5934 'viewmywatchlist' => 'watchlist-interaction',
5935 'editviewmywatchlist' => 'watchlist-interaction',
5936
5937 'editmycssjs' => 'customization',
5938 'editmyoptions' => 'customization',
5939
5940 'editinterface' => 'administration',
5941 'editsiteconfig' => 'administration',
5942 'rollback' => 'administration',
5943 'blockusers' => 'administration',
5944 'delete' => 'administration',
5945 'viewdeleted' => 'administration',
5946 'viewrestrictedlogs' => 'administration',
5947 'protect' => 'administration',
5948 'oversight' => 'administration',
5949 'createaccount' => 'administration',
5950
5951 'highvolume' => 'high-volume',
5952
5953 'privateinfo' => 'private-information',
5954 ];
5955
5956 /**
5957 * @var bool Whether to enable bot passwords
5958 * @since 1.27
5959 */
5960 $wgEnableBotPasswords = true;
5961
5962 /**
5963 * Cluster for the bot_passwords table
5964 * @var string|bool If false, the normal cluster will be used
5965 * @since 1.27
5966 */
5967 $wgBotPasswordsCluster = false;
5968
5969 /**
5970 * Database name for the bot_passwords table
5971 *
5972 * To use a database with a table prefix, set this variable to
5973 * "{$database}-{$prefix}".
5974 * @var string|bool If false, the normal database will be used
5975 * @since 1.27
5976 */
5977 $wgBotPasswordsDatabase = false;
5978
5979 /** @} */ # end of user rights settings
5980
5981 /************************************************************************//**
5982 * @name Proxy scanner settings
5983 * @{
5984 */
5985
5986 /**
5987 * This should always be customised in LocalSettings.php
5988 */
5989 $wgSecretKey = false;
5990
5991 /**
5992 * Big list of banned IP addresses.
5993 *
5994 * This can have the following formats:
5995 * - An array of addresses, either in the values
5996 * or the keys (for backward compatibility, deprecated since 1.30)
5997 * - A string, in that case this is the path to a file
5998 * containing the list of IP addresses, one per line
5999 */
6000 $wgProxyList = [];
6001
6002 /** @} */ # end of proxy scanner settings
6003
6004 /************************************************************************//**
6005 * @name Cookie settings
6006 * @{
6007 */
6008
6009 /**
6010 * Default cookie lifetime, in seconds. Setting to 0 makes all cookies session-only.
6011 */
6012 $wgCookieExpiration = 30 * 86400;
6013
6014 /**
6015 * Default login cookie lifetime, in seconds. Setting
6016 * $wgExtendLoginCookieExpiration to null will use $wgCookieExpiration to
6017 * calculate the cookie lifetime. As with $wgCookieExpiration, 0 will make
6018 * login cookies session-only.
6019 */
6020 $wgExtendedLoginCookieExpiration = 180 * 86400;
6021
6022 /**
6023 * Set to set an explicit domain on the login cookies eg, "justthis.domain.org"
6024 * or ".any.subdomain.net"
6025 */
6026 $wgCookieDomain = '';
6027
6028 /**
6029 * Set this variable if you want to restrict cookies to a certain path within
6030 * the domain specified by $wgCookieDomain.
6031 */
6032 $wgCookiePath = '/';
6033
6034 /**
6035 * Whether the "secure" flag should be set on the cookie. This can be:
6036 * - true: Set secure flag
6037 * - false: Don't set secure flag
6038 * - "detect": Set the secure flag if $wgServer is set to an HTTPS URL
6039 */
6040 $wgCookieSecure = 'detect';
6041
6042 /**
6043 * By default, MediaWiki checks if the client supports cookies during the
6044 * login process, so that it can display an informative error message if
6045 * cookies are disabled. Set this to true if you want to disable this cookie
6046 * check.
6047 */
6048 $wgDisableCookieCheck = false;
6049
6050 /**
6051 * Cookies generated by MediaWiki have names starting with this prefix. Set it
6052 * to a string to use a custom prefix. Setting it to false causes the database
6053 * name to be used as a prefix.
6054 */
6055 $wgCookiePrefix = false;
6056
6057 /**
6058 * Set authentication cookies to HttpOnly to prevent access by JavaScript,
6059 * in browsers that support this feature. This can mitigates some classes of
6060 * XSS attack.
6061 */
6062 $wgCookieHttpOnly = true;
6063
6064 /**
6065 * A list of cookies that vary the cache (for use by extensions)
6066 */
6067 $wgCacheVaryCookies = [];
6068
6069 /**
6070 * Override to customise the session name
6071 */
6072 $wgSessionName = false;
6073
6074 /**
6075 * Whether to set a cookie when a user is autoblocked. Doing so means that a blocked user, even
6076 * after logging out and moving to a new IP address, will still be blocked. This cookie will contain
6077 * an authentication code if $wgSecretKey is set, or otherwise will just be the block ID (in
6078 * which case there is a possibility of an attacker discovering the names of revdeleted users, so
6079 * it is best to use this in conjunction with $wgSecretKey being set).
6080 */
6081 $wgCookieSetOnAutoblock = false;
6082
6083 /**
6084 * Whether to set a cookie when a logged-out user is blocked. Doing so means that a blocked user,
6085 * even after moving to a new IP address, will still be blocked. This cookie will contain an
6086 * authentication code if $wgSecretKey is set, or otherwise will just be the block ID (in which
6087 * case there is a possibility of an attacker discovering the names of revdeleted users, so it
6088 * is best to use this in conjunction with $wgSecretKey being set).
6089 */
6090 $wgCookieSetOnIpBlock = false;
6091
6092 /** @} */ # end of cookie settings }
6093
6094 /************************************************************************//**
6095 * @name LaTeX (mathematical formulas)
6096 * @{
6097 */
6098
6099 /**
6100 * To use inline TeX, you need to compile 'texvc' (in the 'math' subdirectory of
6101 * the MediaWiki package and have latex, dvips, gs (ghostscript), andconvert
6102 * (ImageMagick) installed and available in the PATH.
6103 * Please see math/README for more information.
6104 */
6105 $wgUseTeX = false;
6106
6107 /** @} */ # end LaTeX }
6108
6109 /************************************************************************//**
6110 * @name Profiling, testing and debugging
6111 *
6112 * See $wgProfiler for how to enable profiling.
6113 *
6114 * @{
6115 */
6116
6117 /**
6118 * Filename for debug logging. See https://www.mediawiki.org/wiki/How_to_debug
6119 * The debug log file should be not be publicly accessible if it is used, as it
6120 * may contain private data.
6121 */
6122 $wgDebugLogFile = '';
6123
6124 /**
6125 * Prefix for debug log lines
6126 */
6127 $wgDebugLogPrefix = '';
6128
6129 /**
6130 * If true, instead of redirecting, show a page with a link to the redirect
6131 * destination. This allows for the inspection of PHP error messages, and easy
6132 * resubmission of form data. For developer use only.
6133 */
6134 $wgDebugRedirects = false;
6135
6136 /**
6137 * If true, log debugging data from action=raw and load.php.
6138 * This is normally false to avoid overlapping debug entries due to gen=css
6139 * and gen=js requests.
6140 */
6141 $wgDebugRawPage = false;
6142
6143 /**
6144 * Send debug data to an HTML comment in the output.
6145 *
6146 * This may occasionally be useful when supporting a non-technical end-user.
6147 * It's more secure than exposing the debug log file to the web, since the
6148 * output only contains private data for the current user. But it's not ideal
6149 * for development use since data is lost on fatal errors and redirects.
6150 */
6151 $wgDebugComments = false;
6152
6153 /**
6154 * Write SQL queries to the debug log.
6155 *
6156 * This setting is only used $wgLBFactoryConf['class'] is set to
6157 * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
6158 * the DBO_DEBUG flag must be set in the 'flags' option of the database
6159 * connection to achieve the same functionality.
6160 */
6161 $wgDebugDumpSql = false;
6162
6163 /**
6164 * Performance expectations for DB usage
6165 *
6166 * @since 1.26
6167 */
6168 $wgTrxProfilerLimits = [
6169 // HTTP GET/HEAD requests.
6170 // Master queries should not happen on GET requests
6171 'GET' => [
6172 'masterConns' => 0,
6173 'writes' => 0,
6174 'readQueryTime' => 5,
6175 'readQueryRows' => 10000
6176 ],
6177 // HTTP POST requests.
6178 // Master reads and writes will happen for a subset of these.
6179 'POST' => [
6180 'readQueryTime' => 5,
6181 'writeQueryTime' => 1,
6182 'readQueryRows' => 100000,
6183 'maxAffected' => 1000
6184 ],
6185 'POST-nonwrite' => [
6186 'writes' => 0,
6187 'readQueryTime' => 5,
6188 'readQueryRows' => 10000
6189 ],
6190 // Deferred updates that run after HTTP response is sent for GET requests
6191 'PostSend-GET' => [
6192 'readQueryTime' => 5,
6193 'writeQueryTime' => 1,
6194 'readQueryRows' => 10000,
6195 'maxAffected' => 1000,
6196 // Log master queries under the post-send entry point as they are discouraged
6197 'masterConns' => 0,
6198 'writes' => 0,
6199 ],
6200 // Deferred updates that run after HTTP response is sent for POST requests
6201 'PostSend-POST' => [
6202 'readQueryTime' => 5,
6203 'writeQueryTime' => 1,
6204 'readQueryRows' => 100000,
6205 'maxAffected' => 1000
6206 ],
6207 // Background job runner
6208 'JobRunner' => [
6209 'readQueryTime' => 30,
6210 'writeQueryTime' => 5,
6211 'readQueryRows' => 100000,
6212 'maxAffected' => 500 // ballpark of $wgUpdateRowsPerQuery
6213 ],
6214 // Command-line scripts
6215 'Maintenance' => [
6216 'writeQueryTime' => 5,
6217 'maxAffected' => 1000
6218 ]
6219 ];
6220
6221 /**
6222 * Map of string log group names to log destinations.
6223 *
6224 * If set, wfDebugLog() output for that group will go to that file instead
6225 * of the regular $wgDebugLogFile. Useful for enabling selective logging
6226 * in production.
6227 *
6228 * Log destinations may be one of the following:
6229 * - false to completely remove from the output, including from $wgDebugLogFile.
6230 * - string values specifying a filename or URI.
6231 * - associative array with keys:
6232 * - 'destination' desired filename or URI.
6233 * - 'sample' an integer value, specifying a sampling factor (optional)
6234 * - 'level' A \Psr\Log\LogLevel constant, indicating the minimum level
6235 * to log (optional, since 1.25)
6236 *
6237 * @par Example:
6238 * @code
6239 * $wgDebugLogGroups['redis'] = '/var/log/mediawiki/redis.log';
6240 * @endcode
6241 *
6242 * @par Advanced example:
6243 * @code
6244 * $wgDebugLogGroups['memcached'] = [
6245 * 'destination' => '/var/log/mediawiki/memcached.log',
6246 * 'sample' => 1000, // log 1 message out of every 1,000.
6247 * 'level' => \Psr\Log\LogLevel::WARNING
6248 * ];
6249 * @endcode
6250 */
6251 $wgDebugLogGroups = [];
6252
6253 /**
6254 * Default service provider for creating Psr\Log\LoggerInterface instances.
6255 *
6256 * The value should be an array suitable for use with
6257 * ObjectFactory::getObjectFromSpec(). The created object is expected to
6258 * implement the MediaWiki\Logger\Spi interface. See ObjectFactory for additional
6259 * details.
6260 *
6261 * Alternately the MediaWiki\Logger\LoggerFactory::registerProvider method can
6262 * be called to inject an MediaWiki\Logger\Spi instance into the LoggerFactory
6263 * and bypass the use of this configuration variable entirely.
6264 *
6265 * @par To completely disable logging:
6266 * @code
6267 * $wgMWLoggerDefaultSpi = [ 'class' => \MediaWiki\Logger\NullSpi::class ];
6268 * @endcode
6269 *
6270 * @since 1.25
6271 * @var array $wgMWLoggerDefaultSpi
6272 * @see MwLogger
6273 */
6274 $wgMWLoggerDefaultSpi = [
6275 'class' => \MediaWiki\Logger\LegacySpi::class,
6276 ];
6277
6278 /**
6279 * Display debug data at the bottom of the main content area.
6280 *
6281 * Useful for developers and technical users trying to working on a closed wiki.
6282 */
6283 $wgShowDebug = false;
6284
6285 /**
6286 * Prefix debug messages with relative timestamp. Very-poor man's profiler.
6287 * Since 1.19 also includes memory usage.
6288 */
6289 $wgDebugTimestamps = false;
6290
6291 /**
6292 * Print HTTP headers for every request in the debug information.
6293 */
6294 $wgDebugPrintHttpHeaders = true;
6295
6296 /**
6297 * Show the contents of $wgHooks in Special:Version
6298 */
6299 $wgSpecialVersionShowHooks = false;
6300
6301 /**
6302 * Whether to show "we're sorry, but there has been a database error" pages.
6303 * Displaying errors aids in debugging, but may display information useful
6304 * to an attacker.
6305 *
6306 * @deprecated and nonfunctional since 1.32: set $wgShowExceptionDetails and/or
6307 * $wgShowHostnames instead.
6308 */
6309 $wgShowSQLErrors = false;
6310
6311 /**
6312 * If set to true, uncaught exceptions will print the exception message and a
6313 * complete stack trace to output. This should only be used for debugging, as it
6314 * may reveal private information in function parameters due to PHP's backtrace
6315 * formatting. If set to false, only the exception's class will be shown.
6316 */
6317 $wgShowExceptionDetails = false;
6318
6319 /**
6320 * If true, show a backtrace for database errors
6321 *
6322 * @note This setting only applies when connection errors and query errors are
6323 * reported in the normal manner. $wgShowExceptionDetails applies in other cases,
6324 * including those in which an uncaught exception is thrown from within the
6325 * exception handler.
6326 *
6327 * @deprecated and nonfunctional since 1.32: set $wgShowExceptionDetails instead.
6328 */
6329 $wgShowDBErrorBacktrace = false;
6330
6331 /**
6332 * If true, send the exception backtrace to the error log
6333 */
6334 $wgLogExceptionBacktrace = true;
6335
6336 /**
6337 * If true, the MediaWiki error handler passes errors/warnings to the default error handler
6338 * after logging them. The setting is ignored when the track_errors php.ini flag is true.
6339 */
6340 $wgPropagateErrors = true;
6341
6342 /**
6343 * Expose backend server host names through the API and various HTML comments
6344 */
6345 $wgShowHostnames = false;
6346
6347 /**
6348 * Override server hostname detection with a hardcoded value.
6349 * Should be a string, default false.
6350 * @since 1.20
6351 */
6352 $wgOverrideHostname = false;
6353
6354 /**
6355 * If set to true MediaWiki will throw notices for some possible error
6356 * conditions and for deprecated functions.
6357 */
6358 $wgDevelopmentWarnings = false;
6359
6360 /**
6361 * Release limitation to wfDeprecated warnings, if set to a release number
6362 * development warnings will not be generated for deprecations added in releases
6363 * after the limit.
6364 */
6365 $wgDeprecationReleaseLimit = false;
6366
6367 /**
6368 * Profiler configuration.
6369 *
6370 * To use a profiler, set $wgProfiler in LocalSetings.php.
6371 *
6372 * Example:
6373 *
6374 * @code
6375 * $wgProfiler['class'] = ProfilerXhprof::class;
6376 * @endcode
6377 *
6378 * For output, set the 'output' key to an array of class names, one for each
6379 * output type you want the profiler to generate. For example:
6380 *
6381 * @code
6382 * $wgProfiler['output'] = [ ProfilerOutputText::class ];
6383 * @endcode
6384 *
6385 * The output classes available to you by default are ProfilerOutputDb,
6386 * ProfilerOutputDump, ProfilerOutputStats, ProfilerOutputText, and
6387 * ProfilerOutputUdp.
6388 *
6389 * ProfilerOutputStats outputs profiling data as StatsD metrics. It expects
6390 * that you have set the $wgStatsdServer configuration variable to the host (or
6391 * host:port) of your statsd server.
6392 *
6393 * ProfilerOutputText will output profiling data in the page body as a comment.
6394 * You can make the profiling data in HTML render as part of the page content
6395 * by setting the 'visible' configuration flag:
6396 *
6397 * @code
6398 * $wgProfiler['visible'] = true;
6399 * @endcode
6400 *
6401 * 'ProfilerOutputDb' expects a database table that can be created by applying
6402 * maintenance/archives/patch-profiling.sql to your database.
6403 *
6404 * 'ProfilerOutputDump' expects a $wgProfiler['outputDir'] telling it where to
6405 * write dump files. The files produced are compatible with the XHProf gui.
6406 * For a rudimentary sampling profiler:
6407 *
6408 * @code
6409 * $wgProfiler['class'] = 'ProfilerXhprof';
6410 * $wgProfiler['output'] = array( 'ProfilerOutputDb' );
6411 * $wgProfiler['sampling'] = 50; // one every 50 requests
6412 * @endcode
6413 *
6414 * When using the built-in `sampling` option, the `class` will changed to
6415 * ProfilerStub for non-sampled cases.
6416 *
6417 * For performance, the profiler is always disabled for CLI scripts as they
6418 * could be long running and the data would accumulate. Use the '--profiler'
6419 * parameter of maintenance scripts to override this.
6420 *
6421 * @since 1.17.0
6422 */
6423 $wgProfiler = [];
6424
6425 /**
6426 * Allow the profileinfo.php entrypoint to be used.
6427 *
6428 * @since 1.5.0
6429 */
6430 $wgEnableProfileInfo = false;
6431
6432 /**
6433 * Only record profiling info for pages that took longer than this
6434 * @deprecated since 1.25: set $wgProfiler['threshold'] instead.
6435 */
6436 $wgProfileLimit = 0.0;
6437
6438 /**
6439 * Don't put non-profiling info into log file
6440 *
6441 * @deprecated since 1.23, set the log file in
6442 * $wgDebugLogGroups['profileoutput'] instead.
6443 */
6444 $wgProfileOnly = false;
6445
6446 /**
6447 * Destination of statsd metrics.
6448 *
6449 * A host or host:port of a statsd server. Port defaults to 8125.
6450 *
6451 * If not set, statsd metrics will not be collected.
6452 *
6453 * @see wfLogProfilingData
6454 * @since 1.25
6455 */
6456 $wgStatsdServer = false;
6457
6458 /**
6459 * Prefix for metric names sent to $wgStatsdServer.
6460 *
6461 * @see MediaWikiServices::getStatsdDataFactory
6462 * @see BufferingStatsdDataFactory
6463 * @since 1.25
6464 */
6465 $wgStatsdMetricPrefix = 'MediaWiki';
6466
6467 /**
6468 * Sampling rate for statsd metrics as an associative array of patterns and rates.
6469 * Patterns are Unix shell patterns (e.g. 'MediaWiki.api.*').
6470 * Rates are sampling probabilities (e.g. 0.1 means 1 in 10 events are sampled).
6471 * @since 1.28
6472 */
6473 $wgStatsdSamplingRates = [
6474 'wanobjectcache:*' => 0.001
6475 ];
6476
6477 /**
6478 * InfoAction retrieves a list of transclusion links (both to and from).
6479 * This number puts a limit on that query in the case of highly transcluded
6480 * templates.
6481 */
6482 $wgPageInfoTransclusionLimit = 50;
6483
6484 /**
6485 * Set this to an integer to only do synchronous site_stats updates
6486 * one every *this many* updates. The other requests go into pending
6487 * delta values in $wgMemc. Make sure that $wgMemc is a global cache.
6488 * If set to -1, updates *only* go to $wgMemc (useful for daemons).
6489 */
6490 $wgSiteStatsAsyncFactor = false;
6491
6492 /**
6493 * Parser test suite files to be run by parserTests.php when no specific
6494 * filename is passed to it.
6495 *
6496 * Extensions using extension.json will have any *.txt file in a
6497 * tests/parser/ directory automatically run.
6498 *
6499 * Core tests can be added to ParserTestRunner::$coreTestFiles.
6500 *
6501 * Use full paths.
6502 *
6503 * @deprecated since 1.30
6504 */
6505 $wgParserTestFiles = [];
6506
6507 /**
6508 * Allow running of javascript test suites via [[Special:JavaScriptTest]] (such as QUnit).
6509 */
6510 $wgEnableJavaScriptTest = false;
6511
6512 /**
6513 * Overwrite the caching key prefix with custom value.
6514 * @since 1.19
6515 */
6516 $wgCachePrefix = false;
6517
6518 /**
6519 * Display the new debugging toolbar. This also enables profiling on database
6520 * queries and other useful output.
6521 * Will be ignored if $wgUseFileCache or $wgUseSquid is enabled.
6522 *
6523 * @since 1.19
6524 */
6525 $wgDebugToolbar = false;
6526
6527 /** @} */ # end of profiling, testing and debugging }
6528
6529 /************************************************************************//**
6530 * @name Search
6531 * @{
6532 */
6533
6534 /**
6535 * Set this to true to disable the full text search feature.
6536 */
6537 $wgDisableTextSearch = false;
6538
6539 /**
6540 * Set to true to have nicer highlighted text in search results,
6541 * by default off due to execution overhead
6542 */
6543 $wgAdvancedSearchHighlighting = false;
6544
6545 /**
6546 * Regexp to match word boundaries, defaults for non-CJK languages
6547 * should be empty for CJK since the words are not separate
6548 */
6549 $wgSearchHighlightBoundaries = '[\p{Z}\p{P}\p{C}]';
6550
6551 /**
6552 * Template for OpenSearch suggestions, defaults to API action=opensearch
6553 *
6554 * Sites with heavy load would typically have these point to a custom
6555 * PHP wrapper to avoid firing up mediawiki for every keystroke
6556 *
6557 * Placeholders: {searchTerms}
6558 *
6559 * @deprecated since 1.25 Use $wgOpenSearchTemplates['application/x-suggestions+json'] instead
6560 */
6561 $wgOpenSearchTemplate = false;
6562
6563 /**
6564 * Templates for OpenSearch suggestions, defaults to API action=opensearch
6565 *
6566 * Sites with heavy load would typically have these point to a custom
6567 * PHP wrapper to avoid firing up mediawiki for every keystroke
6568 *
6569 * Placeholders: {searchTerms}
6570 */
6571 $wgOpenSearchTemplates = [
6572 'application/x-suggestions+json' => false,
6573 'application/x-suggestions+xml' => false,
6574 ];
6575
6576 /**
6577 * Enable OpenSearch suggestions requested by MediaWiki. Set this to
6578 * false if you've disabled scripts that use api?action=opensearch and
6579 * want reduce load caused by cached scripts still pulling suggestions.
6580 * It will let the API fallback by responding with an empty array.
6581 */
6582 $wgEnableOpenSearchSuggest = true;
6583
6584 /**
6585 * Integer defining default number of entries to show on
6586 * OpenSearch call.
6587 */
6588 $wgOpenSearchDefaultLimit = 10;
6589
6590 /**
6591 * Minimum length of extract in <Description>. Actual extracts will last until the end of sentence.
6592 */
6593 $wgOpenSearchDescriptionLength = 100;
6594
6595 /**
6596 * Expiry time for search suggestion responses
6597 */
6598 $wgSearchSuggestCacheExpiry = 1200;
6599
6600 /**
6601 * If you've disabled search semi-permanently, this also disables updates to the
6602 * table. If you ever re-enable, be sure to rebuild the search table.
6603 */
6604 $wgDisableSearchUpdate = false;
6605
6606 /**
6607 * List of namespaces which are searched by default.
6608 *
6609 * @par Example:
6610 * @code
6611 * $wgNamespacesToBeSearchedDefault[NS_MAIN] = true;
6612 * $wgNamespacesToBeSearchedDefault[NS_PROJECT] = true;
6613 * @endcode
6614 */
6615 $wgNamespacesToBeSearchedDefault = [
6616 NS_MAIN => true,
6617 ];
6618
6619 /**
6620 * Disable the internal MySQL-based search, to allow it to be
6621 * implemented by an extension instead.
6622 */
6623 $wgDisableInternalSearch = false;
6624
6625 /**
6626 * Set this to a URL to forward search requests to some external location.
6627 * If the URL includes '$1', this will be replaced with the URL-encoded
6628 * search term.
6629 *
6630 * @par Example:
6631 * To forward to Google you'd have something like:
6632 * @code
6633 * $wgSearchForwardUrl =
6634 * 'https://www.google.com/search?q=$1' .
6635 * '&domains=https://example.com' .
6636 * '&sitesearch=https://example.com' .
6637 * '&ie=utf-8&oe=utf-8';
6638 * @endcode
6639 */
6640 $wgSearchForwardUrl = null;
6641
6642 /**
6643 * Search form behavior.
6644 * - true = use Go & Search buttons
6645 * - false = use Go button & Advanced search link
6646 */
6647 $wgUseTwoButtonsSearchForm = true;
6648
6649 /**
6650 * Array of namespaces to generate a Google sitemap for when the
6651 * maintenance/generateSitemap.php script is run, or false if one is to be
6652 * generated for all namespaces.
6653 */
6654 $wgSitemapNamespaces = false;
6655
6656 /**
6657 * Custom namespace priorities for sitemaps. Setting this will allow you to
6658 * set custom priorities to namespaces when sitemaps are generated using the
6659 * maintenance/generateSitemap.php script.
6660 *
6661 * This should be a map of namespace IDs to priority
6662 * @par Example:
6663 * @code
6664 * $wgSitemapNamespacesPriorities = [
6665 * NS_USER => '0.9',
6666 * NS_HELP => '0.0',
6667 * ];
6668 * @endcode
6669 */
6670 $wgSitemapNamespacesPriorities = false;
6671
6672 /**
6673 * If true, searches for IP addresses will be redirected to that IP's
6674 * contributions page. E.g. searching for "1.2.3.4" will redirect to
6675 * [[Special:Contributions/1.2.3.4]]
6676 */
6677 $wgEnableSearchContributorsByIP = true;
6678
6679 /** @} */ # end of search settings
6680
6681 /************************************************************************//**
6682 * @name Edit user interface
6683 * @{
6684 */
6685
6686 /**
6687 * Path to the GNU diff3 utility. If the file doesn't exist, edit conflicts will
6688 * fall back to the old behavior (no merging).
6689 */
6690 $wgDiff3 = '/usr/bin/diff3';
6691
6692 /**
6693 * Path to the GNU diff utility.
6694 */
6695 $wgDiff = '/usr/bin/diff';
6696
6697 /**
6698 * Which namespaces have special treatment where they should be preview-on-open
6699 * Internally only Category: pages apply, but using this extensions (e.g. Semantic MediaWiki)
6700 * can specify namespaces of pages they have special treatment for
6701 */
6702 $wgPreviewOnOpenNamespaces = [
6703 NS_CATEGORY => true
6704 ];
6705
6706 /**
6707 * Enable the UniversalEditButton for browsers that support it
6708 * (currently only Firefox with an extension)
6709 * See http://universaleditbutton.org for more background information
6710 */
6711 $wgUniversalEditButton = true;
6712
6713 /**
6714 * If user doesn't specify any edit summary when making a an edit, MediaWiki
6715 * will try to automatically create one. This feature can be disabled by set-
6716 * ting this variable false.
6717 */
6718 $wgUseAutomaticEditSummaries = true;
6719
6720 /** @} */ # end edit UI }
6721
6722 /************************************************************************//**
6723 * @name Maintenance
6724 * See also $wgSiteNotice
6725 * @{
6726 */
6727
6728 /**
6729 * @cond file_level_code
6730 * Set $wgCommandLineMode if it's not set already, to avoid notices
6731 */
6732 if ( !isset( $wgCommandLineMode ) ) {
6733 $wgCommandLineMode = false;
6734 }
6735 /** @endcond */
6736
6737 /**
6738 * For colorized maintenance script output, is your terminal background dark ?
6739 */
6740 $wgCommandLineDarkBg = false;
6741
6742 /**
6743 * Set this to a string to put the wiki into read-only mode. The text will be
6744 * used as an explanation to users.
6745 *
6746 * This prevents most write operations via the web interface. Cache updates may
6747 * still be possible. To prevent database writes completely, use the read_only
6748 * option in MySQL.
6749 */
6750 $wgReadOnly = null;
6751
6752 /**
6753 * Set this to true to put the wiki watchlists into read-only mode.
6754 * @var bool
6755 * @since 1.31
6756 */
6757 $wgReadOnlyWatchedItemStore = false;
6758
6759 /**
6760 * If this lock file exists (size > 0), the wiki will be forced into read-only mode.
6761 * Its contents will be shown to users as part of the read-only warning
6762 * message.
6763 *
6764 * Will default to "{$wgUploadDirectory}/lock_yBgMBwiR" in Setup.php
6765 */
6766 $wgReadOnlyFile = false;
6767
6768 /**
6769 * When you run the web-based upgrade utility, it will tell you what to set
6770 * this to in order to authorize the upgrade process. It will subsequently be
6771 * used as a password, to authorize further upgrades.
6772 *
6773 * For security, do not set this to a guessable string. Use the value supplied
6774 * by the install/upgrade process. To cause the upgrader to generate a new key,
6775 * delete the old key from LocalSettings.php.
6776 */
6777 $wgUpgradeKey = false;
6778
6779 /**
6780 * Fully specified path to git binary
6781 */
6782 $wgGitBin = '/usr/bin/git';
6783
6784 /**
6785 * Map GIT repository URLs to viewer URLs to provide links in Special:Version
6786 *
6787 * Key is a pattern passed to preg_match() and preg_replace(),
6788 * without the delimiters (which are #) and must match the whole URL.
6789 * The value is the replacement for the key (it can contain $1, etc.)
6790 * %h will be replaced by the short SHA-1 (7 first chars) and %H by the
6791 * full SHA-1 of the HEAD revision.
6792 * %r will be replaced with a URL-encoded version of $1.
6793 * %R will be replaced with $1 and no URL-encoding
6794 *
6795 * @since 1.20
6796 */
6797 $wgGitRepositoryViewers = [
6798 'https://(?:[a-z0-9_]+@)?gerrit.wikimedia.org/r/(?:p/)?(.*)' =>
6799 'https://gerrit.wikimedia.org/g/%R/+/%H',
6800 'ssh://(?:[a-z0-9_]+@)?gerrit.wikimedia.org:29418/(.*)' =>
6801 'https://gerrit.wikimedia.org/g/%R/+/%H',
6802 ];
6803
6804 /** @} */ # End of maintenance }
6805
6806 /************************************************************************//**
6807 * @name Recent changes, new pages, watchlist and history
6808 * @{
6809 */
6810
6811 /**
6812 * Recentchanges items are periodically purged; entries older than this many
6813 * seconds will go.
6814 * Default: 90 days = about three months
6815 */
6816 $wgRCMaxAge = 90 * 24 * 3600;
6817
6818 /**
6819 * Page watchers inactive for more than this many seconds are considered inactive.
6820 * Used mainly by action=info. Default: 180 days = about six months.
6821 * @since 1.26
6822 */
6823 $wgWatchersMaxAge = 180 * 24 * 3600;
6824
6825 /**
6826 * If active watchers (per above) are this number or less, do not disclose it.
6827 * Left to 1, prevents unprivileged users from knowing for sure that there are 0.
6828 * Set to -1 if you want to always complement watchers count with this info.
6829 * @since 1.26
6830 */
6831 $wgUnwatchedPageSecret = 1;
6832
6833 /**
6834 * Filter $wgRCLinkDays by $wgRCMaxAge to avoid showing links for numbers
6835 * higher than what will be stored. Note that this is disabled by default
6836 * because we sometimes do have RC data which is beyond the limit for some
6837 * reason, and some users may use the high numbers to display that data which
6838 * is still there.
6839 */
6840 $wgRCFilterByAge = false;
6841
6842 /**
6843 * List of Limits options to list in the Special:Recentchanges and
6844 * Special:Recentchangeslinked pages.
6845 */
6846 $wgRCLinkLimits = [ 50, 100, 250, 500 ];
6847
6848 /**
6849 * List of Days options to list in the Special:Recentchanges and
6850 * Special:Recentchangeslinked pages.
6851 */
6852 $wgRCLinkDays = [ 1, 3, 7, 14, 30 ];
6853
6854 /**
6855 * Configuration for feeds to which notifications about recent changes will be sent.
6856 *
6857 * The following feed classes are available by default:
6858 * - 'UDPRCFeedEngine' - sends recent changes over UDP to the specified server.
6859 * - 'RedisPubSubFeedEngine' - send recent changes to Redis.
6860 *
6861 * Only 'class' or 'uri' is required. If 'uri' is set instead of 'class', then
6862 * RecentChange::getEngine() is used to determine the class. All options are
6863 * passed to the constructor.
6864 *
6865 * Common options:
6866 * - 'class' -- The class to use for this feed (must implement RCFeed).
6867 * - 'omit_bots' -- Exclude bot edits from the feed. (default: false)
6868 * - 'omit_anon' -- Exclude anonymous edits from the feed. (default: false)
6869 * - 'omit_user' -- Exclude edits by registered users from the feed. (default: false)
6870 * - 'omit_minor' -- Exclude minor edits from the feed. (default: false)
6871 * - 'omit_patrolled' -- Exclude patrolled edits from the feed. (default: false)
6872 *
6873 * FormattedRCFeed-specific options:
6874 * - 'uri' -- [required] The address to which the messages are sent.
6875 * The uri scheme of this string will be looked up in $wgRCEngines
6876 * to determine which RCFeedEngine class to use.
6877 * - 'formatter' -- [required] The class (implementing RCFeedFormatter) which will
6878 * produce the text to send. This can also be an object of the class.
6879 * Formatters available by default: JSONRCFeedFormatter, XMLRCFeedFormatter,
6880 * IRCColourfulRCFeedFormatter.
6881 *
6882 * IRCColourfulRCFeedFormatter-specific options:
6883 * - 'add_interwiki_prefix' -- whether the titles should be prefixed with
6884 * the first entry in the $wgLocalInterwikis array (or the value of
6885 * $wgLocalInterwiki, if set)
6886 *
6887 * JSONRCFeedFormatter-specific options:
6888 * - 'channel' -- if set, the 'channel' parameter is also set in JSON values.
6889 *
6890 * @example $wgRCFeeds['example'] = [
6891 * 'uri' => 'udp://localhost:1336',
6892 * 'formatter' => 'JSONRCFeedFormatter',
6893 * 'add_interwiki_prefix' => false,
6894 * 'omit_bots' => true,
6895 * ];
6896 * @example $wgRCFeeds['example'] = [
6897 * 'uri' => 'udp://localhost:1338',
6898 * 'formatter' => 'IRCColourfulRCFeedFormatter',
6899 * 'add_interwiki_prefix' => false,
6900 * 'omit_bots' => true,
6901 * ];
6902 * @example $wgRCFeeds['example'] = [
6903 * 'class' => ExampleRCFeed::class,
6904 * ];
6905 * @since 1.22
6906 */
6907 $wgRCFeeds = [];
6908
6909 /**
6910 * Used by RecentChange::getEngine to find the correct engine for a given URI scheme.
6911 * Keys are scheme names, values are names of FormattedRCFeed sub classes.
6912 * @since 1.22
6913 */
6914 $wgRCEngines = [
6915 'redis' => RedisPubSubFeedEngine::class,
6916 'udp' => UDPRCFeedEngine::class,
6917 ];
6918
6919 /**
6920 * Treat category membership changes as a RecentChange.
6921 * Changes are mentioned in RC for page actions as follows:
6922 * - creation: pages created with categories are mentioned
6923 * - edit: category additions/removals to existing pages are mentioned
6924 * - move: nothing is mentioned (unless templates used depend on the title)
6925 * - deletion: nothing is mentioned
6926 * - undeletion: nothing is mentioned
6927 *
6928 * @since 1.27
6929 */
6930 $wgRCWatchCategoryMembership = false;
6931
6932 /**
6933 * Use RC Patrolling to check for vandalism (from recent changes and watchlists)
6934 * New pages and new files are included.
6935 *
6936 * @note If you disable all patrolling features, you probably also want to
6937 * remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
6938 * Special:Log.
6939 */
6940 $wgUseRCPatrol = true;
6941
6942 /**
6943 * Polling rate, in seconds, used by the 'live update' and 'view newest' features
6944 * of the RCFilters app on SpecialRecentChanges and Special:Watchlist.
6945 * 0 to disable completely.
6946 */
6947 $wgStructuredChangeFiltersLiveUpdatePollingRate = 3;
6948
6949 /**
6950 * Use new page patrolling to check new pages on Special:Newpages
6951 *
6952 * @note If you disable all patrolling features, you probably also want to
6953 * remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
6954 * Special:Log.
6955 */
6956 $wgUseNPPatrol = true;
6957
6958 /**
6959 * Use file patrolling to check new files on Special:Newfiles
6960 *
6961 * @note If you disable all patrolling features, you probably also want to
6962 * remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
6963 * Special:Log.
6964 *
6965 * @since 1.27
6966 */
6967 $wgUseFilePatrol = true;
6968
6969 /**
6970 * Provide syndication feeds (RSS, Atom) for, e.g., Recentchanges, Newpages
6971 */
6972 $wgFeed = true;
6973
6974 /**
6975 * Set maximum number of results to return in syndication feeds (RSS, Atom) for
6976 * eg Recentchanges, Newpages.
6977 */
6978 $wgFeedLimit = 50;
6979
6980 /**
6981 * _Minimum_ timeout for cached Recentchanges feed, in seconds.
6982 * A cached version will continue to be served out even if changes
6983 * are made, until this many seconds runs out since the last render.
6984 *
6985 * If set to 0, feed caching is disabled. Use this for debugging only;
6986 * feed generation can be pretty slow with diffs.
6987 */
6988 $wgFeedCacheTimeout = 60;
6989
6990 /**
6991 * When generating Recentchanges RSS/Atom feed, diffs will not be generated for
6992 * pages larger than this size.
6993 */
6994 $wgFeedDiffCutoff = 32768;
6995
6996 /**
6997 * Override the site's default RSS/ATOM feed for recentchanges that appears on
6998 * every page. Some sites might have a different feed they'd like to promote
6999 * instead of the RC feed (maybe like a "Recent New Articles" or "Breaking news" one).
7000 * Should be a format as key (either 'rss' or 'atom') and an URL to the feed
7001 * as value.
7002 * @par Example:
7003 * Configure the 'atom' feed to https://example.com/somefeed.xml
7004 * @code
7005 * $wgSiteFeed['atom'] = "https://example.com/somefeed.xml";
7006 * @endcode
7007 */
7008 $wgOverrideSiteFeed = [];
7009
7010 /**
7011 * Available feeds objects.
7012 * Should probably only be defined when a page is syndicated ie when
7013 * $wgOut->isSyndicated() is true.
7014 */
7015 $wgFeedClasses = [
7016 'rss' => RSSFeed::class,
7017 'atom' => AtomFeed::class,
7018 ];
7019
7020 /**
7021 * Which feed types should we provide by default? This can include 'rss',
7022 * 'atom', neither, or both.
7023 */
7024 $wgAdvertisedFeedTypes = [ 'atom' ];
7025
7026 /**
7027 * Show watching users in recent changes, watchlist and page history views
7028 */
7029 $wgRCShowWatchingUsers = false; # UPO
7030
7031 /**
7032 * Show the amount of changed characters in recent changes
7033 */
7034 $wgRCShowChangedSize = true;
7035
7036 /**
7037 * If the difference between the character counts of the text
7038 * before and after the edit is below that value, the value will be
7039 * highlighted on the RC page.
7040 */
7041 $wgRCChangedSizeThreshold = 500;
7042
7043 /**
7044 * Show "Updated (since my last visit)" marker in RC view, watchlist and history
7045 * view for watched pages with new changes
7046 */
7047 $wgShowUpdatedMarker = true;
7048
7049 /**
7050 * Disable links to talk pages of anonymous users (IPs) in listings on special
7051 * pages like page history, Special:Recentchanges, etc.
7052 */
7053 $wgDisableAnonTalk = false;
7054
7055 /**
7056 * Allow filtering by change tag in recentchanges, history, etc
7057 * Has no effect if no tags are defined in valid_tag.
7058 */
7059 $wgUseTagFilter = true;
7060
7061 /**
7062 * List of core tags to enable. Available tags are:
7063 * - 'mw-contentmodelchange': Edit changes content model of a page
7064 * - 'mw-new-redirect': Edit makes new redirect page (new page or by changing content page)
7065 * - 'mw-removed-redirect': Edit changes an existing redirect into a non-redirect
7066 * - 'mw-changed-redirect-target': Edit changes redirect target
7067 * - 'mw-blank': Edit completely blanks the page
7068 * - 'mw-replace': Edit removes more than 90% of the content
7069 * - 'mw-rollback': Edit is a rollback, made through the rollback link or rollback API
7070 * - 'mw-undo': Edit made through an undo link
7071 *
7072 * @var array
7073 * @since 1.31
7074 */
7075 $wgSoftwareTags = [
7076 'mw-contentmodelchange' => true,
7077 'mw-new-redirect' => true,
7078 'mw-removed-redirect' => true,
7079 'mw-changed-redirect-target' => true,
7080 'mw-blank' => true,
7081 'mw-replace' => true,
7082 'mw-rollback' => true,
7083 'mw-undo' => true,
7084 ];
7085
7086 /**
7087 * If set to an integer, pages that are watched by this many users or more
7088 * will not require the unwatchedpages permission to view the number of
7089 * watchers.
7090 *
7091 * @since 1.21
7092 */
7093 $wgUnwatchedPageThreshold = false;
7094
7095 /**
7096 * Flags (letter symbols) shown in recent changes and watchlist to indicate
7097 * certain types of edits.
7098 *
7099 * To register a new one:
7100 * @code
7101 * $wgRecentChangesFlags['flag'] => [
7102 * // message for the letter displayed next to rows on changes lists
7103 * 'letter' => 'letter-msg',
7104 * // message for the tooltip of the letter
7105 * 'title' => 'tooltip-msg',
7106 * // optional (defaults to 'tooltip-msg'), message to use in the legend box
7107 * 'legend' => 'legend-msg',
7108 * // optional (defaults to 'flag'), CSS class to put on changes lists rows
7109 * 'class' => 'css-class',
7110 * // optional (defaults to 'any'), how top-level flag is determined. 'any'
7111 * // will set the top-level flag if any line contains the flag, 'all' will
7112 * // only be set if all lines contain the flag.
7113 * 'grouping' => 'any',
7114 * ];
7115 * @endcode
7116 *
7117 * @since 1.22
7118 */
7119 $wgRecentChangesFlags = [
7120 'newpage' => [
7121 'letter' => 'newpageletter',
7122 'title' => 'recentchanges-label-newpage',
7123 'legend' => 'recentchanges-legend-newpage',
7124 'grouping' => 'any',
7125 ],
7126 'minor' => [
7127 'letter' => 'minoreditletter',
7128 'title' => 'recentchanges-label-minor',
7129 'legend' => 'recentchanges-legend-minor',
7130 'class' => 'minoredit',
7131 'grouping' => 'all',
7132 ],
7133 'bot' => [
7134 'letter' => 'boteditletter',
7135 'title' => 'recentchanges-label-bot',
7136 'legend' => 'recentchanges-legend-bot',
7137 'class' => 'botedit',
7138 'grouping' => 'all',
7139 ],
7140 'unpatrolled' => [
7141 'letter' => 'unpatrolledletter',
7142 'title' => 'recentchanges-label-unpatrolled',
7143 'legend' => 'recentchanges-legend-unpatrolled',
7144 'grouping' => 'any',
7145 ],
7146 ];
7147
7148 /** @} */ # end RC/watchlist }
7149
7150 /************************************************************************//**
7151 * @name Copyright and credits settings
7152 * @{
7153 */
7154
7155 /**
7156 * Override for copyright metadata.
7157 *
7158 * This is the name of the page containing information about the wiki's copyright status,
7159 * which will be added as a link in the footer if it is specified. It overrides
7160 * $wgRightsUrl if both are specified.
7161 */
7162 $wgRightsPage = null;
7163
7164 /**
7165 * Set this to specify an external URL containing details about the content license used on your
7166 * wiki.
7167 * If $wgRightsPage is set then this setting is ignored.
7168 */
7169 $wgRightsUrl = null;
7170
7171 /**
7172 * If either $wgRightsUrl or $wgRightsPage is specified then this variable gives the text for the
7173 * link. Otherwise, it will be treated as raw HTML.
7174 * If using $wgRightsUrl then this value must be specified. If using $wgRightsPage then the name
7175 * of the page will also be used as the link if this variable is not set.
7176 */
7177 $wgRightsText = null;
7178
7179 /**
7180 * Override for copyright metadata.
7181 */
7182 $wgRightsIcon = null;
7183
7184 /**
7185 * Set this to true if you want detailed copyright information forms on Upload.
7186 */
7187 $wgUseCopyrightUpload = false;
7188
7189 /**
7190 * Set this to the number of authors that you want to be credited below an
7191 * article text. Set it to zero to hide the attribution block, and a negative
7192 * number (like -1) to show all authors. Note that this will require 2-3 extra
7193 * database hits, which can have a not insignificant impact on performance for
7194 * large wikis.
7195 */
7196 $wgMaxCredits = 0;
7197
7198 /**
7199 * If there are more than $wgMaxCredits authors, show $wgMaxCredits of them.
7200 * Otherwise, link to a separate credits page.
7201 */
7202 $wgShowCreditsIfMax = true;
7203
7204 /** @} */ # end of copyright and credits settings }
7205
7206 /************************************************************************//**
7207 * @name Import / Export
7208 * @{
7209 */
7210
7211 /**
7212 * List of interwiki prefixes for wikis we'll accept as sources for
7213 * Special:Import and API action=import. Since complete page history can be
7214 * imported, these should be 'trusted'.
7215 *
7216 * This can either be a regular array, or an associative map specifying
7217 * subprojects on the interwiki map of the target wiki, or a mix of the two,
7218 * e.g.
7219 * @code
7220 * $wgImportSources = [
7221 * 'wikipedia' => [ 'cs', 'en', 'fr', 'zh' ],
7222 * 'wikispecies',
7223 * 'wikia' => [ 'animanga', 'brickipedia', 'desserts' ],
7224 * ];
7225 * @endcode
7226 *
7227 * If you have a very complex import sources setup, you can lazy-load it using
7228 * the ImportSources hook.
7229 *
7230 * If a user has the 'import' permission but not the 'importupload' permission,
7231 * they will only be able to run imports through this transwiki interface.
7232 */
7233 $wgImportSources = [];
7234
7235 /**
7236 * Optional default target namespace for interwiki imports.
7237 * Can use this to create an incoming "transwiki"-style queue.
7238 * Set to numeric key, not the name.
7239 *
7240 * Users may override this in the Special:Import dialog.
7241 */
7242 $wgImportTargetNamespace = null;
7243
7244 /**
7245 * If set to false, disables the full-history option on Special:Export.
7246 * This is currently poorly optimized for long edit histories, so is
7247 * disabled on Wikimedia's sites.
7248 */
7249 $wgExportAllowHistory = true;
7250
7251 /**
7252 * If set nonzero, Special:Export requests for history of pages with
7253 * more revisions than this will be rejected. On some big sites things
7254 * could get bogged down by very very long pages.
7255 */
7256 $wgExportMaxHistory = 0;
7257
7258 /**
7259 * Return distinct author list (when not returning full history)
7260 */
7261 $wgExportAllowListContributors = false;
7262
7263 /**
7264 * If non-zero, Special:Export accepts a "pagelink-depth" parameter
7265 * up to this specified level, which will cause it to include all
7266 * pages linked to from the pages you specify. Since this number
7267 * can become *insanely large* and could easily break your wiki,
7268 * it's disabled by default for now.
7269 *
7270 * @warning There's a HARD CODED limit of 5 levels of recursion to prevent a
7271 * crazy-big export from being done by someone setting the depth number too
7272 * high. In other words, last resort safety net.
7273 */
7274 $wgExportMaxLinkDepth = 0;
7275
7276 /**
7277 * Whether to allow the "export all pages in namespace" option
7278 */
7279 $wgExportFromNamespaces = false;
7280
7281 /**
7282 * Whether to allow exporting the entire wiki into a single file
7283 */
7284 $wgExportAllowAll = false;
7285
7286 /**
7287 * Maximum number of pages returned by the GetPagesFromCategory and
7288 * GetPagesFromNamespace functions.
7289 *
7290 * @since 1.27
7291 */
7292 $wgExportPagelistLimit = 5000;
7293
7294 /** @} */ # end of import/export }
7295
7296 /*************************************************************************//**
7297 * @name Extensions
7298 * @{
7299 */
7300
7301 /**
7302 * A list of callback functions which are called once MediaWiki is fully
7303 * initialised
7304 */
7305 $wgExtensionFunctions = [];
7306
7307 /**
7308 * Extension messages files.
7309 *
7310 * Associative array mapping extension name to the filename where messages can be
7311 * found. The file should contain variable assignments. Any of the variables
7312 * present in languages/messages/MessagesEn.php may be defined, but $messages
7313 * is the most common.
7314 *
7315 * Variables defined in extensions will override conflicting variables defined
7316 * in the core.
7317 *
7318 * Since MediaWiki 1.23, use of this variable to define messages is discouraged; instead, store
7319 * messages in JSON format and use $wgMessagesDirs. For setting other variables than
7320 * $messages, $wgExtensionMessagesFiles should still be used. Use a DIFFERENT key because
7321 * any entry having a key that also exists in $wgMessagesDirs will be ignored.
7322 *
7323 * Extensions using the JSON message format can preserve backward compatibility with
7324 * earlier versions of MediaWiki by using a compatibility shim, such as one generated
7325 * by the generateJsonI18n.php maintenance script, listing it under the SAME key
7326 * as for the $wgMessagesDirs entry.
7327 *
7328 * @par Example:
7329 * @code
7330 * $wgExtensionMessagesFiles['ConfirmEdit'] = __DIR__.'/ConfirmEdit.i18n.php';
7331 * @endcode
7332 */
7333 $wgExtensionMessagesFiles = [];
7334
7335 /**
7336 * Extension messages directories.
7337 *
7338 * Associative array mapping extension name to the path of the directory where message files can
7339 * be found. The message files are expected to be JSON files named for their language code, e.g.
7340 * en.json, de.json, etc. Extensions with messages in multiple places may specify an array of
7341 * message directories.
7342 *
7343 * Message directories in core should be added to LocalisationCache::getMessagesDirs()
7344 *
7345 * @par Simple example:
7346 * @code
7347 * $wgMessagesDirs['Example'] = __DIR__ . '/i18n';
7348 * @endcode
7349 *
7350 * @par Complex example:
7351 * @code
7352 * $wgMessagesDirs['Example'] = [
7353 * __DIR__ . '/lib/ve/i18n',
7354 * __DIR__ . '/lib/ooui/i18n',
7355 * __DIR__ . '/i18n',
7356 * ]
7357 * @endcode
7358 * @since 1.23
7359 */
7360 $wgMessagesDirs = [];
7361
7362 /**
7363 * Array of files with list(s) of extension entry points to be used in
7364 * maintenance/mergeMessageFileList.php
7365 * @since 1.22
7366 */
7367 $wgExtensionEntryPointListFiles = [];
7368
7369 /**
7370 * Parser output hooks.
7371 * This is an associative array where the key is an extension-defined tag
7372 * (typically the extension name), and the value is a PHP callback.
7373 * These will be called as an OutputPageParserOutput hook, if the relevant
7374 * tag has been registered with the parser output object.
7375 *
7376 * Registration is done with $pout->addOutputHook( $tag, $data ).
7377 *
7378 * The callback has the form:
7379 * @code
7380 * function outputHook( $outputPage, $parserOutput, $data ) { ... }
7381 * @endcode
7382 */
7383 $wgParserOutputHooks = [];
7384
7385 /**
7386 * Whether to include the NewPP limit report as a HTML comment
7387 */
7388 $wgEnableParserLimitReporting = true;
7389
7390 /**
7391 * List of valid skin names
7392 *
7393 * The key should be the name in all lower case, the value should be a properly
7394 * cased name for the skin. This value will be prefixed with "Skin" to create
7395 * the class name of the skin to load. Use Skin::getSkinNames() as an accessor
7396 * if you wish to have access to the full list.
7397 */
7398 $wgValidSkinNames = [];
7399
7400 /**
7401 * Special page list. This is an associative array mapping the (canonical) names of
7402 * special pages to either a class name to be instantiated, or a callback to use for
7403 * creating the special page object. In both cases, the result must be an instance of
7404 * SpecialPage.
7405 */
7406 $wgSpecialPages = [];
7407
7408 /**
7409 * Array mapping class names to filenames, for autoloading.
7410 */
7411 $wgAutoloadClasses = [];
7412
7413 /**
7414 * Switch controlling legacy case-insensitive classloading.
7415 * Do not disable if your wiki must support data created by PHP4, or by
7416 * MediaWiki 1.4 or earlier.
7417 */
7418 $wgAutoloadAttemptLowercase = true;
7419
7420 /**
7421 * An array of information about installed extensions keyed by their type.
7422 *
7423 * All but 'name', 'path' and 'author' can be omitted.
7424 *
7425 * @code
7426 * $wgExtensionCredits[$type][] = [
7427 * 'path' => __FILE__,
7428 * 'name' => 'Example extension',
7429 * 'namemsg' => 'exampleextension-name',
7430 * 'author' => [
7431 * 'Foo Barstein',
7432 * ],
7433 * 'version' => '1.9.0',
7434 * 'url' => 'https://example.org/example-extension/',
7435 * 'descriptionmsg' => 'exampleextension-desc',
7436 * 'license-name' => 'GPL-2.0-or-later',
7437 * ];
7438 * @endcode
7439 *
7440 * The extensions are listed on Special:Version. This page also looks for a file
7441 * named COPYING or LICENSE (optional .txt extension) and provides a link to
7442 * view said file. When the 'license-name' key is specified, this file is
7443 * interpreted as wikitext.
7444 *
7445 * - $type: One of 'specialpage', 'parserhook', 'variable', 'media', 'antispam',
7446 * 'skin', 'api', or 'other', or any additional types as specified through the
7447 * ExtensionTypes hook as used in SpecialVersion::getExtensionTypes().
7448 *
7449 * - name: Name of extension as an inline string instead of localizable message.
7450 * Do not omit this even if 'namemsg' is provided, as it is used to override
7451 * the path Special:Version uses to find extension's license info, and is
7452 * required for backwards-compatibility with MediaWiki 1.23 and older.
7453 *
7454 * - namemsg (since MW 1.24): A message key for a message containing the
7455 * extension's name, if the name is localizable. (For example, skin names
7456 * usually are.)
7457 *
7458 * - author: A string or an array of strings. Authors can be linked using
7459 * the regular wikitext link syntax. To have an internationalized version of
7460 * "and others" show, add an element "...". This element can also be linked,
7461 * for instance "[https://example ...]".
7462 *
7463 * - descriptionmsg: A message key or an an array with message key and parameters:
7464 * `'descriptionmsg' => 'exampleextension-desc',`
7465 *
7466 * - description: Description of extension as an inline string instead of
7467 * localizable message (omit in favour of 'descriptionmsg').
7468 *
7469 * - license-name: Short name of the license (used as label for the link), such
7470 * as "GPL-2.0-or-later" or "MIT" (https://spdx.org/licenses/ for a list of identifiers).
7471 */
7472 $wgExtensionCredits = [];
7473
7474 /**
7475 * Authentication plugin.
7476 * @var $wgAuth AuthPlugin
7477 * @deprecated since 1.27 use $wgAuthManagerConfig instead
7478 */
7479 $wgAuth = null;
7480
7481 /**
7482 * Global list of hooks.
7483 *
7484 * The key is one of the events made available by MediaWiki, you can find
7485 * a description for most of them in docs/hooks.txt. The array is used
7486 * internally by Hook:run().
7487 *
7488 * The value can be one of:
7489 *
7490 * - A function name:
7491 * @code
7492 * $wgHooks['event_name'][] = $function;
7493 * @endcode
7494 * - A function with some data:
7495 * @code
7496 * $wgHooks['event_name'][] = [ $function, $data ];
7497 * @endcode
7498 * - A an object method:
7499 * @code
7500 * $wgHooks['event_name'][] = [ $object, 'method' ];
7501 * @endcode
7502 * - A closure:
7503 * @code
7504 * $wgHooks['event_name'][] = function ( $hookParam ) {
7505 * // Handler code goes here.
7506 * };
7507 * @endcode
7508 *
7509 * @warning You should always append to an event array or you will end up
7510 * deleting a previous registered hook.
7511 *
7512 * @warning Hook handlers should be registered at file scope. Registering
7513 * handlers after file scope can lead to unexpected results due to caching.
7514 */
7515 $wgHooks = [];
7516
7517 /**
7518 * List of service wiring files to be loaded by the default instance of MediaWikiServices.
7519 * Each file listed here is expected to return an associative array mapping service names
7520 * to instantiator functions. Extensions may add wiring files to define their own services.
7521 * However, this cannot be used to replace existing services - use the MediaWikiServices
7522 * hook for that.
7523 *
7524 * @see MediaWikiServices
7525 * @see ServiceContainer::loadWiringFiles() for details on loading service instantiator functions.
7526 * @see docs/injection.txt for an overview of dependency injection in MediaWiki.
7527 */
7528 $wgServiceWiringFiles = [
7529 __DIR__ . '/ServiceWiring.php'
7530 ];
7531
7532 /**
7533 * Maps jobs to their handlers; extensions
7534 * can add to this to provide custom jobs.
7535 * A job handler should either be a class name to be instantiated,
7536 * or (since 1.30) a callback to use for creating the job object.
7537 */
7538 $wgJobClasses = [
7539 'deletePage' => DeletePageJob::class,
7540 'refreshLinks' => RefreshLinksJob::class,
7541 'deleteLinks' => DeleteLinksJob::class,
7542 'htmlCacheUpdate' => HTMLCacheUpdateJob::class,
7543 'sendMail' => EmaillingJob::class,
7544 'enotifNotify' => EnotifNotifyJob::class,
7545 'fixDoubleRedirect' => DoubleRedirectJob::class,
7546 'AssembleUploadChunks' => AssembleUploadChunksJob::class,
7547 'PublishStashedFile' => PublishStashedFileJob::class,
7548 'ThumbnailRender' => ThumbnailRenderJob::class,
7549 'recentChangesUpdate' => RecentChangesUpdateJob::class,
7550 'refreshLinksPrioritized' => RefreshLinksJob::class,
7551 'refreshLinksDynamic' => RefreshLinksJob::class,
7552 'activityUpdateJob' => ActivityUpdateJob::class,
7553 'categoryMembershipChange' => function ( Title $title, $params = [] ) {
7554 $pc = MediaWikiServices::getInstance()->getParserCache();
7555 return new CategoryMembershipChangeJob( $pc, $title, $params );
7556 },
7557 'clearUserWatchlist' => ClearUserWatchlistJob::class,
7558 'cdnPurge' => CdnPurgeJob::class,
7559 'userGroupExpiry' => UserGroupExpiryJob::class,
7560 'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class,
7561 'enqueue' => EnqueueJob::class, // local queue for multi-DC setups
7562 'null' => NullJob::class,
7563 ];
7564
7565 /**
7566 * Jobs that must be explicitly requested, i.e. aren't run by job runners unless
7567 * special flags are set. The values here are keys of $wgJobClasses.
7568 *
7569 * These can be:
7570 * - Very long-running jobs.
7571 * - Jobs that you would never want to run as part of a page rendering request.
7572 * - Jobs that you want to run on specialized machines ( like transcoding, or a particular
7573 * machine on your cluster has 'outside' web access you could restrict uploadFromUrl )
7574 * These settings should be global to all wikis.
7575 */
7576 $wgJobTypesExcludedFromDefaultQueue = [ 'AssembleUploadChunks', 'PublishStashedFile' ];
7577
7578 /**
7579 * Map of job types to how many job "work items" should be run per second
7580 * on each job runner process. The meaning of "work items" varies per job,
7581 * but typically would be something like "pages to update". A single job
7582 * may have a variable number of work items, as is the case with batch jobs.
7583 * This is used by runJobs.php and not jobs run via $wgJobRunRate.
7584 * These settings should be global to all wikis.
7585 * @var float[]
7586 */
7587 $wgJobBackoffThrottling = [];
7588
7589 /**
7590 * Make job runners commit changes for replica DB-lag prone jobs one job at a time.
7591 * This is useful if there are many job workers that race on replica DB lag checks.
7592 * If set, jobs taking this many seconds of DB write time have serialized commits.
7593 *
7594 * Note that affected jobs may have worse lock contention. Also, if they affect
7595 * several DBs at once they may have a smaller chance of being atomic due to the
7596 * possibility of connection loss while queueing up to commit. Affected jobs may
7597 * also fail due to the commit lock acquisition timeout.
7598 *
7599 * @var float|bool
7600 * @since 1.26
7601 */
7602 $wgJobSerialCommitThreshold = false;
7603
7604 /**
7605 * Map of job types to configuration arrays.
7606 * This determines which queue class and storage system is used for each job type.
7607 * Job types that do not have explicit configuration will use the 'default' config.
7608 * These settings should be global to all wikis.
7609 */
7610 $wgJobTypeConf = [
7611 'default' => [ 'class' => JobQueueDB::class, 'order' => 'random', 'claimTTL' => 3600 ],
7612 ];
7613
7614 /**
7615 * Which aggregator to use for tracking which queues have jobs.
7616 * These settings should be global to all wikis.
7617 */
7618 $wgJobQueueAggregator = [
7619 'class' => JobQueueAggregatorNull::class
7620 ];
7621
7622 /**
7623 * Whether to include the number of jobs that are queued
7624 * for the API's maxlag parameter.
7625 * The total number of jobs will be divided by this to get an
7626 * estimated second of maxlag. Typically bots backoff at maxlag=5,
7627 * so setting this to the max number of jobs that should be in your
7628 * queue divided by 5 should have the effect of stopping bots once
7629 * that limit is hit.
7630 *
7631 * @since 1.29
7632 */
7633 $wgJobQueueIncludeInMaxLagFactor = false;
7634
7635 /**
7636 * Additional functions to be performed with updateSpecialPages.
7637 * Expensive Querypages are already updated.
7638 */
7639 $wgSpecialPageCacheUpdates = [
7640 'Statistics' => [ SiteStatsUpdate::class, 'cacheUpdate' ]
7641 ];
7642
7643 /**
7644 * Page property link table invalidation lists. When a page property
7645 * changes, this may require other link tables to be updated (eg
7646 * adding __HIDDENCAT__ means the hiddencat tracking category will
7647 * have been added, so the categorylinks table needs to be rebuilt).
7648 * This array can be added to by extensions.
7649 */
7650 $wgPagePropLinkInvalidations = [
7651 'hiddencat' => 'categorylinks',
7652 ];
7653
7654 /** @} */ # End extensions }
7655
7656 /*************************************************************************//**
7657 * @name Categories
7658 * @{
7659 */
7660
7661 /**
7662 * Use experimental, DMOZ-like category browser
7663 */
7664 $wgUseCategoryBrowser = false;
7665
7666 /**
7667 * On category pages, show thumbnail gallery for images belonging to that
7668 * category instead of listing them as articles.
7669 */
7670 $wgCategoryMagicGallery = true;
7671
7672 /**
7673 * Paging limit for categories
7674 */
7675 $wgCategoryPagingLimit = 200;
7676
7677 /**
7678 * Specify how category names should be sorted, when listed on a category page.
7679 * A sorting scheme is also known as a collation.
7680 *
7681 * Available values are:
7682 *
7683 * - uppercase: Converts the category name to upper case, and sorts by that.
7684 *
7685 * - identity: Does no conversion. Sorts by binary value of the string.
7686 *
7687 * - uca-default: Provides access to the Unicode Collation Algorithm with
7688 * the default element table. This is a compromise collation which sorts
7689 * all languages in a mediocre way. However, it is better than "uppercase".
7690 *
7691 * To use the uca-default collation, you must have PHP's intl extension
7692 * installed. See https://secure.php.net/manual/en/intl.setup.php . The details of the
7693 * resulting collation will depend on the version of ICU installed on the
7694 * server.
7695 *
7696 * After you change this, you must run maintenance/updateCollation.php to fix
7697 * the sort keys in the database.
7698 *
7699 * Extensions can define there own collations by subclassing Collation
7700 * and using the Collation::factory hook.
7701 */
7702 $wgCategoryCollation = 'uppercase';
7703
7704 /** @} */ # End categories }
7705
7706 /*************************************************************************//**
7707 * @name Logging
7708 * @{
7709 */
7710
7711 /**
7712 * The logging system has two levels: an event type, which describes the
7713 * general category and can be viewed as a named subset of all logs; and
7714 * an action, which is a specific kind of event that can exist in that
7715 * log type.
7716 *
7717 * Note that code should call LogPage::validTypes() to get a list of valid
7718 * log types instead of checking the global variable.
7719 */
7720 $wgLogTypes = [
7721 '',
7722 'block',
7723 'protect',
7724 'rights',
7725 'delete',
7726 'upload',
7727 'move',
7728 'import',
7729 'patrol',
7730 'merge',
7731 'suppress',
7732 'tag',
7733 'managetags',
7734 'contentmodel',
7735 ];
7736
7737 /**
7738 * This restricts log access to those who have a certain right
7739 * Users without this will not see it in the option menu and can not view it
7740 * Restricted logs are not added to recent changes
7741 * Logs should remain non-transcludable
7742 * Format: logtype => permissiontype
7743 */
7744 $wgLogRestrictions = [
7745 'suppress' => 'suppressionlog'
7746 ];
7747
7748 /**
7749 * Show/hide links on Special:Log will be shown for these log types.
7750 *
7751 * This is associative array of log type => boolean "hide by default"
7752 *
7753 * See $wgLogTypes for a list of available log types.
7754 *
7755 * @par Example:
7756 * @code
7757 * $wgFilterLogTypes = [ 'move' => true, 'import' => false ];
7758 * @endcode
7759 *
7760 * Will display show/hide links for the move and import logs. Move logs will be
7761 * hidden by default unless the link is clicked. Import logs will be shown by
7762 * default, and hidden when the link is clicked.
7763 *
7764 * A message of the form logeventslist-[type]-log should be added, and will be
7765 * used for the link text.
7766 */
7767 $wgFilterLogTypes = [
7768 'patrol' => true,
7769 'tag' => true,
7770 ];
7771
7772 /**
7773 * Lists the message key string for each log type. The localized messages
7774 * will be listed in the user interface.
7775 *
7776 * Extensions with custom log types may add to this array.
7777 *
7778 * @since 1.19, if you follow the naming convention log-name-TYPE,
7779 * where TYPE is your log type, yoy don't need to use this array.
7780 */
7781 $wgLogNames = [
7782 '' => 'all-logs-page',
7783 'block' => 'blocklogpage',
7784 'protect' => 'protectlogpage',
7785 'rights' => 'rightslog',
7786 'delete' => 'dellogpage',
7787 'upload' => 'uploadlogpage',
7788 'move' => 'movelogpage',
7789 'import' => 'importlogpage',
7790 'patrol' => 'patrol-log-page',
7791 'merge' => 'mergelog',
7792 'suppress' => 'suppressionlog',
7793 ];
7794
7795 /**
7796 * Lists the message key string for descriptive text to be shown at the
7797 * top of each log type.
7798 *
7799 * Extensions with custom log types may add to this array.
7800 *
7801 * @since 1.19, if you follow the naming convention log-description-TYPE,
7802 * where TYPE is your log type, yoy don't need to use this array.
7803 */
7804 $wgLogHeaders = [
7805 '' => 'alllogstext',
7806 'block' => 'blocklogtext',
7807 'delete' => 'dellogpagetext',
7808 'import' => 'importlogpagetext',
7809 'merge' => 'mergelogpagetext',
7810 'move' => 'movelogpagetext',
7811 'patrol' => 'patrol-log-header',
7812 'protect' => 'protectlogtext',
7813 'rights' => 'rightslogtext',
7814 'suppress' => 'suppressionlogtext',
7815 'upload' => 'uploadlogpagetext',
7816 ];
7817
7818 /**
7819 * Lists the message key string for formatting individual events of each
7820 * type and action when listed in the logs.
7821 *
7822 * Extensions with custom log types may add to this array.
7823 */
7824 $wgLogActions = [];
7825
7826 /**
7827 * The same as above, but here values are names of classes,
7828 * not messages.
7829 * @see LogPage::actionText
7830 * @see LogFormatter
7831 */
7832 $wgLogActionsHandlers = [
7833 'block/block' => BlockLogFormatter::class,
7834 'block/reblock' => BlockLogFormatter::class,
7835 'block/unblock' => BlockLogFormatter::class,
7836 'contentmodel/change' => ContentModelLogFormatter::class,
7837 'contentmodel/new' => ContentModelLogFormatter::class,
7838 'delete/delete' => DeleteLogFormatter::class,
7839 'delete/delete_redir' => DeleteLogFormatter::class,
7840 'delete/event' => DeleteLogFormatter::class,
7841 'delete/restore' => DeleteLogFormatter::class,
7842 'delete/revision' => DeleteLogFormatter::class,
7843 'import/interwiki' => ImportLogFormatter::class,
7844 'import/upload' => ImportLogFormatter::class,
7845 'managetags/activate' => LogFormatter::class,
7846 'managetags/create' => LogFormatter::class,
7847 'managetags/deactivate' => LogFormatter::class,
7848 'managetags/delete' => LogFormatter::class,
7849 'merge/merge' => MergeLogFormatter::class,
7850 'move/move' => MoveLogFormatter::class,
7851 'move/move_redir' => MoveLogFormatter::class,
7852 'patrol/patrol' => PatrolLogFormatter::class,
7853 'patrol/autopatrol' => PatrolLogFormatter::class,
7854 'protect/modify' => ProtectLogFormatter::class,
7855 'protect/move_prot' => ProtectLogFormatter::class,
7856 'protect/protect' => ProtectLogFormatter::class,
7857 'protect/unprotect' => ProtectLogFormatter::class,
7858 'rights/autopromote' => RightsLogFormatter::class,
7859 'rights/rights' => RightsLogFormatter::class,
7860 'suppress/block' => BlockLogFormatter::class,
7861 'suppress/delete' => DeleteLogFormatter::class,
7862 'suppress/event' => DeleteLogFormatter::class,
7863 'suppress/reblock' => BlockLogFormatter::class,
7864 'suppress/revision' => DeleteLogFormatter::class,
7865 'tag/update' => TagLogFormatter::class,
7866 'upload/overwrite' => UploadLogFormatter::class,
7867 'upload/revert' => UploadLogFormatter::class,
7868 'upload/upload' => UploadLogFormatter::class,
7869 ];
7870
7871 /**
7872 * List of log types that can be filtered by action types
7873 *
7874 * To each action is associated the list of log_action
7875 * subtypes to search for, usually one, but not necessarily so
7876 * Extensions may append to this array
7877 * @since 1.27
7878 */
7879 $wgActionFilteredLogs = [
7880 'block' => [
7881 'block' => [ 'block' ],
7882 'reblock' => [ 'reblock' ],
7883 'unblock' => [ 'unblock' ],
7884 ],
7885 'contentmodel' => [
7886 'change' => [ 'change' ],
7887 'new' => [ 'new' ],
7888 ],
7889 'delete' => [
7890 'delete' => [ 'delete' ],
7891 'delete_redir' => [ 'delete_redir' ],
7892 'restore' => [ 'restore' ],
7893 'event' => [ 'event' ],
7894 'revision' => [ 'revision' ],
7895 ],
7896 'import' => [
7897 'interwiki' => [ 'interwiki' ],
7898 'upload' => [ 'upload' ],
7899 ],
7900 'managetags' => [
7901 'create' => [ 'create' ],
7902 'delete' => [ 'delete' ],
7903 'activate' => [ 'activate' ],
7904 'deactivate' => [ 'deactivate' ],
7905 ],
7906 'move' => [
7907 'move' => [ 'move' ],
7908 'move_redir' => [ 'move_redir' ],
7909 ],
7910 'newusers' => [
7911 'create' => [ 'create', 'newusers' ],
7912 'create2' => [ 'create2' ],
7913 'autocreate' => [ 'autocreate' ],
7914 'byemail' => [ 'byemail' ],
7915 ],
7916 'protect' => [
7917 'protect' => [ 'protect' ],
7918 'modify' => [ 'modify' ],
7919 'unprotect' => [ 'unprotect' ],
7920 'move_prot' => [ 'move_prot' ],
7921 ],
7922 'rights' => [
7923 'rights' => [ 'rights' ],
7924 'autopromote' => [ 'autopromote' ],
7925 ],
7926 'suppress' => [
7927 'event' => [ 'event' ],
7928 'revision' => [ 'revision' ],
7929 'delete' => [ 'delete' ],
7930 'block' => [ 'block' ],
7931 'reblock' => [ 'reblock' ],
7932 ],
7933 'upload' => [
7934 'upload' => [ 'upload' ],
7935 'overwrite' => [ 'overwrite' ],
7936 ],
7937 ];
7938
7939 /**
7940 * Maintain a log of newusers at Special:Log/newusers?
7941 */
7942 $wgNewUserLog = true;
7943
7944 /**
7945 * Maintain a log of page creations at Special:Log/create?
7946 * @since 1.32
7947 */
7948 $wgPageCreationLog = true;
7949
7950 /** @} */ # end logging }
7951
7952 /*************************************************************************//**
7953 * @name Special pages (general and miscellaneous)
7954 * @{
7955 */
7956
7957 /**
7958 * Allow special page inclusions such as {{Special:Allpages}}
7959 */
7960 $wgAllowSpecialInclusion = true;
7961
7962 /**
7963 * Set this to an array of special page names to prevent
7964 * maintenance/updateSpecialPages.php from updating those pages.
7965 */
7966 $wgDisableQueryPageUpdate = false;
7967
7968 /**
7969 * On Special:Unusedimages, consider images "used", if they are put
7970 * into a category. Default (false) is not to count those as used.
7971 */
7972 $wgCountCategorizedImagesAsUsed = false;
7973
7974 /**
7975 * Maximum number of links to a redirect page listed on
7976 * Special:Whatlinkshere/RedirectDestination
7977 */
7978 $wgMaxRedirectLinksRetrieved = 500;
7979
7980 /** @} */ # end special pages }
7981
7982 /*************************************************************************//**
7983 * @name Actions
7984 * @{
7985 */
7986
7987 /**
7988 * Array of allowed values for the "title=foo&action=<action>" parameter. Syntax is:
7989 * 'foo' => 'ClassName' Load the specified class which subclasses Action
7990 * 'foo' => true Load the class FooAction which subclasses Action
7991 * If something is specified in the getActionOverrides()
7992 * of the relevant Page object it will be used
7993 * instead of the default class.
7994 * 'foo' => false The action is disabled; show an error message
7995 * Unsetting core actions will probably cause things to complain loudly.
7996 */
7997 $wgActions = [
7998 'credits' => true,
7999 'delete' => true,
8000 'edit' => true,
8001 'editchangetags' => SpecialPageAction::class,
8002 'history' => true,
8003 'info' => true,
8004 'markpatrolled' => true,
8005 'mcrundo' => McrUndoAction::class,
8006 'mcrrestore' => McrRestoreAction::class,
8007 'protect' => true,
8008 'purge' => true,
8009 'raw' => true,
8010 'render' => true,
8011 'revert' => true,
8012 'revisiondelete' => SpecialPageAction::class,
8013 'rollback' => true,
8014 'submit' => true,
8015 'unprotect' => true,
8016 'unwatch' => true,
8017 'view' => true,
8018 'watch' => true,
8019 ];
8020
8021 /** @} */ # end actions }
8022
8023 /*************************************************************************//**
8024 * @name Robot (search engine crawler) policy
8025 * See also $wgNoFollowLinks.
8026 * @{
8027 */
8028
8029 /**
8030 * Default robot policy. The default policy is to encourage indexing and fol-
8031 * lowing of links. It may be overridden on a per-namespace and/or per-page
8032 * basis.
8033 */
8034 $wgDefaultRobotPolicy = 'index,follow';
8035
8036 /**
8037 * Robot policies per namespaces. The default policy is given above, the array
8038 * is made of namespace constants as defined in includes/Defines.php. You can-
8039 * not specify a different default policy for NS_SPECIAL: it is always noindex,
8040 * nofollow. This is because a number of special pages (e.g., ListPages) have
8041 * many permutations of options that display the same data under redundant
8042 * URLs, so search engine spiders risk getting lost in a maze of twisty special
8043 * pages, all alike, and never reaching your actual content.
8044 *
8045 * @par Example:
8046 * @code
8047 * $wgNamespaceRobotPolicies = [ NS_TALK => 'noindex' ];
8048 * @endcode
8049 */
8050 $wgNamespaceRobotPolicies = [];
8051
8052 /**
8053 * Robot policies per article. These override the per-namespace robot policies.
8054 * Must be in the form of an array where the key part is a properly canonicalised
8055 * text form title and the value is a robot policy.
8056 *
8057 * @par Example:
8058 * @code
8059 * $wgArticleRobotPolicies = [
8060 * 'Main Page' => 'noindex,follow',
8061 * 'User:Bob' => 'index,follow',
8062 * ];
8063 * @endcode
8064 *
8065 * @par Example that DOES NOT WORK because the names are not canonical text
8066 * forms:
8067 * @code
8068 * $wgArticleRobotPolicies = [
8069 * # Underscore, not space!
8070 * 'Main_Page' => 'noindex,follow',
8071 * # "Project", not the actual project name!
8072 * 'Project:X' => 'index,follow',
8073 * # Needs to be "Abc", not "abc" (unless $wgCapitalLinks is false for that namespace)!
8074 * 'abc' => 'noindex,nofollow'
8075 * ];
8076 * @endcode
8077 */
8078 $wgArticleRobotPolicies = [];
8079
8080 /**
8081 * An array of namespace keys in which the __INDEX__/__NOINDEX__ magic words
8082 * will not function, so users can't decide whether pages in that namespace are
8083 * indexed by search engines. If set to null, default to $wgContentNamespaces.
8084 *
8085 * @par Example:
8086 * @code
8087 * $wgExemptFromUserRobotsControl = [ NS_MAIN, NS_TALK, NS_PROJECT ];
8088 * @endcode
8089 */
8090 $wgExemptFromUserRobotsControl = null;
8091
8092 /** @} */ # End robot policy }
8093
8094 /************************************************************************//**
8095 * @name AJAX and API
8096 * Note: The AJAX entry point which this section refers to is gradually being
8097 * replaced by the API entry point, api.php. They are essentially equivalent.
8098 * Both of them are used for dynamic client-side features, via XHR.
8099 * @{
8100 */
8101
8102 /**
8103 *
8104 * WARNING: SECURITY THREAT - debug use only
8105 *
8106 * Disables many security checks in the API for debugging purposes.
8107 * This flag should never be used on the production servers, as it introduces
8108 * a number of potential security holes. Even when enabled, the validation
8109 * will still be performed, but instead of failing, API will return a warning.
8110 * Also, there will always be a warning notifying that this flag is set.
8111 * At this point, the flag allows GET requests to go through for modules
8112 * requiring POST.
8113 *
8114 * @since 1.21
8115 */
8116 $wgDebugAPI = false;
8117
8118 /**
8119 * API module extensions.
8120 *
8121 * Associative array mapping module name to modules specs;
8122 * Each module spec is an associative array containing at least
8123 * the 'class' key for the module's class, and optionally a
8124 * 'factory' key for the factory function to use for the module.
8125 *
8126 * That factory function will be called with two parameters,
8127 * the parent module (an instance of ApiBase, usually ApiMain)
8128 * and the name the module was registered under. The return
8129 * value must be an instance of the class given in the 'class'
8130 * field.
8131 *
8132 * For backward compatibility, the module spec may also be a
8133 * simple string containing the module's class name. In that
8134 * case, the class' constructor will be called with the parent
8135 * module and module name as parameters, as described above.
8136 *
8137 * Examples for registering API modules:
8138 *
8139 * @code
8140 * $wgAPIModules['foo'] = 'ApiFoo';
8141 * $wgAPIModules['bar'] = [
8142 * 'class' => ApiBar::class,
8143 * 'factory' => function( $main, $name ) { ... }
8144 * ];
8145 * $wgAPIModules['xyzzy'] = [
8146 * 'class' => ApiXyzzy::class,
8147 * 'factory' => [ XyzzyFactory::class, 'newApiModule' ]
8148 * ];
8149 * @endcode
8150 *
8151 * Extension modules may override the core modules.
8152 * See ApiMain::$Modules for a list of the core modules.
8153 */
8154 $wgAPIModules = [];
8155
8156 /**
8157 * API format module extensions.
8158 * Associative array mapping format module name to module specs (see $wgAPIModules).
8159 * Extension modules may override the core modules.
8160 *
8161 * See ApiMain::$Formats for a list of the core format modules.
8162 */
8163 $wgAPIFormatModules = [];
8164
8165 /**
8166 * API Query meta module extensions.
8167 * Associative array mapping meta module name to module specs (see $wgAPIModules).
8168 * Extension modules may override the core modules.
8169 *
8170 * See ApiQuery::$QueryMetaModules for a list of the core meta modules.
8171 */
8172 $wgAPIMetaModules = [];
8173
8174 /**
8175 * API Query prop module extensions.
8176 * Associative array mapping prop module name to module specs (see $wgAPIModules).
8177 * Extension modules may override the core modules.
8178 *
8179 * See ApiQuery::$QueryPropModules for a list of the core prop modules.
8180 */
8181 $wgAPIPropModules = [];
8182
8183 /**
8184 * API Query list module extensions.
8185 * Associative array mapping list module name to module specs (see $wgAPIModules).
8186 * Extension modules may override the core modules.
8187 *
8188 * See ApiQuery::$QueryListModules for a list of the core list modules.
8189 */
8190 $wgAPIListModules = [];
8191
8192 /**
8193 * Maximum amount of rows to scan in a DB query in the API
8194 * The default value is generally fine
8195 */
8196 $wgAPIMaxDBRows = 5000;
8197
8198 /**
8199 * The maximum size (in bytes) of an API result.
8200 * @warning Do not set this lower than $wgMaxArticleSize*1024
8201 */
8202 $wgAPIMaxResultSize = 8388608;
8203
8204 /**
8205 * The maximum number of uncached diffs that can be retrieved in one API
8206 * request. Set this to 0 to disable API diffs altogether
8207 */
8208 $wgAPIMaxUncachedDiffs = 1;
8209
8210 /**
8211 * Maximum amount of DB lag on a majority of DB replica DBs to tolerate
8212 * before forcing bots to retry any write requests via API errors.
8213 * This should be lower than the 'max lag' value in $wgLBFactoryConf.
8214 */
8215 $wgAPIMaxLagThreshold = 7;
8216
8217 /**
8218 * Log file or URL (TCP or UDP) to log API requests to, or false to disable
8219 * API request logging
8220 */
8221 $wgAPIRequestLog = false;
8222
8223 /**
8224 * Set the timeout for the API help text cache. If set to 0, caching disabled
8225 */
8226 $wgAPICacheHelpTimeout = 60 * 60;
8227
8228 /**
8229 * The ApiQueryQueryPages module should skip pages that are redundant to true
8230 * API queries.
8231 */
8232 $wgAPIUselessQueryPages = [
8233 'MIMEsearch', // aiprop=mime
8234 'LinkSearch', // list=exturlusage
8235 'FileDuplicateSearch', // prop=duplicatefiles
8236 ];
8237
8238 /**
8239 * Enable AJAX framework
8240 *
8241 * @deprecated (officially) since MediaWiki 1.31 and ignored since 1.32
8242 */
8243 $wgUseAjax = true;
8244
8245 /**
8246 * List of Ajax-callable functions.
8247 * Extensions acting as Ajax callbacks must register here
8248 * @deprecated (officially) since 1.27; use the API instead
8249 */
8250 $wgAjaxExportList = [];
8251
8252 /**
8253 * Enable AJAX check for file overwrite, pre-upload
8254 */
8255 $wgAjaxUploadDestCheck = true;
8256
8257 /**
8258 * Enable previewing licences via AJAX.
8259 */
8260 $wgAjaxLicensePreview = true;
8261
8262 /**
8263 * Have clients send edits to be prepared when filling in edit summaries.
8264 * This gives the server a head start on the expensive parsing operation.
8265 */
8266 $wgAjaxEditStash = true;
8267
8268 /**
8269 * Settings for incoming cross-site AJAX requests:
8270 * Newer browsers support cross-site AJAX when the target resource allows requests
8271 * from the origin domain by the Access-Control-Allow-Origin header.
8272 * This is currently only used by the API (requests to api.php)
8273 * $wgCrossSiteAJAXdomains can be set using a wildcard syntax:
8274 *
8275 * - '*' matches any number of characters
8276 * - '?' matches any 1 character
8277 *
8278 * @par Example:
8279 * @code
8280 * $wgCrossSiteAJAXdomains = [
8281 * 'www.mediawiki.org',
8282 * '*.wikipedia.org',
8283 * '*.wikimedia.org',
8284 * '*.wiktionary.org',
8285 * ];
8286 * @endcode
8287 */
8288 $wgCrossSiteAJAXdomains = [];
8289
8290 /**
8291 * Domains that should not be allowed to make AJAX requests,
8292 * even if they match one of the domains allowed by $wgCrossSiteAJAXdomains
8293 * Uses the same syntax as $wgCrossSiteAJAXdomains
8294 */
8295 $wgCrossSiteAJAXdomainExceptions = [];
8296
8297 /** @} */ # End AJAX and API }
8298
8299 /************************************************************************//**
8300 * @name Shell and process control
8301 * @{
8302 */
8303
8304 /**
8305 * Maximum amount of virtual memory available to shell processes under linux, in KB.
8306 */
8307 $wgMaxShellMemory = 307200;
8308
8309 /**
8310 * Maximum file size created by shell processes under linux, in KB
8311 * ImageMagick convert for example can be fairly hungry for scratch space
8312 */
8313 $wgMaxShellFileSize = 102400;
8314
8315 /**
8316 * Maximum CPU time in seconds for shell processes under Linux
8317 */
8318 $wgMaxShellTime = 180;
8319
8320 /**
8321 * Maximum wall clock time (i.e. real time, of the kind the clock on the wall
8322 * would measure) in seconds for shell processes under Linux
8323 */
8324 $wgMaxShellWallClockTime = 180;
8325
8326 /**
8327 * Under Linux: a cgroup directory used to constrain memory usage of shell
8328 * commands. The directory must be writable by the user which runs MediaWiki.
8329 *
8330 * If specified, this is used instead of ulimit, which is inaccurate, and
8331 * causes malloc() to return NULL, which exposes bugs in C applications, making
8332 * them segfault or deadlock.
8333 *
8334 * A wrapper script will create a cgroup for each shell command that runs, as
8335 * a subgroup of the specified cgroup. If the memory limit is exceeded, the
8336 * kernel will send a SIGKILL signal to a process in the subgroup.
8337 *
8338 * @par Example:
8339 * @code
8340 * mkdir -p /sys/fs/cgroup/memory/mediawiki
8341 * mkdir -m 0777 /sys/fs/cgroup/memory/mediawiki/job
8342 * echo '$wgShellCgroup = "/sys/fs/cgroup/memory/mediawiki/job";' >> LocalSettings.php
8343 * @endcode
8344 *
8345 * The reliability of cgroup cleanup can be improved by installing a
8346 * notify_on_release script in the root cgroup, see e.g.
8347 * https://gerrit.wikimedia.org/r/#/c/40784
8348 */
8349 $wgShellCgroup = false;
8350
8351 /**
8352 * Executable path of the PHP cli binary. Should be set up on install.
8353 */
8354 $wgPhpCli = '/usr/bin/php';
8355
8356 /**
8357 * Locale for LC_ALL, to provide a known environment for locale-sensitive operations
8358 *
8359 * For Unix-like operating systems, this should be set to C.UTF-8 or an
8360 * equivalent to provide the most consistent behavior for locale-sensitive
8361 * C library operations across different-language wikis. If that locale is not
8362 * available, use another locale that has a UTF-8 character set.
8363 *
8364 * This setting mainly affects the behavior of C library functions, including:
8365 * - String collation (order when sorting using locale-sensitive comparison)
8366 * - For example, whether "Å" and "A" are considered to be the same letter or
8367 * different letters and if different whether it comes after "A" or after
8368 * "Z", and whether sorting is case sensitive.
8369 * - String character set (how characters beyond basic ASCII are represented)
8370 * - We need this to be a UTF-8 character set to work around
8371 * https://bugs.php.net/bug.php?id=45132
8372 * - Language used for low-level error messages.
8373 * - Formatting of date/time and numeric values (e.g. '.' versus ',' as the
8374 * decimal separator)
8375 *
8376 * MediaWiki provides its own methods and classes to perform many
8377 * locale-sensitive operations, which are designed to be able to vary locale
8378 * based on wiki language or user preference:
8379 * - MediaWiki's Collation class should generally be used instead of the C
8380 * library collation functions when locale-sensitive sorting is needed.
8381 * - MediaWiki's Message class should be used for localization of messages
8382 * displayed to the user.
8383 * - MediaWiki's Language class should be used for formatting numeric and
8384 * date/time values.
8385 *
8386 * @note If multiple wikis are being served from the same process (e.g. the
8387 * same fastCGI or Apache server), this setting must be the same on all those
8388 * wikis.
8389 */
8390 $wgShellLocale = 'C.UTF-8';
8391
8392 /**
8393 * Method to use to restrict shell commands
8394 *
8395 * Supported options:
8396 * - 'autodetect': Autodetect if any restriction methods are available
8397 * - 'firejail': Use firejail <https://firejail.wordpress.com/>
8398 * - false: Don't use any restrictions
8399 *
8400 * @note If using firejail with MediaWiki running in a home directory different
8401 * from the webserver user, firejail 0.9.44+ is required.
8402 *
8403 * @since 1.31
8404 * @var string|bool
8405 */
8406 $wgShellRestrictionMethod = false;
8407
8408 /** @} */ # End shell }
8409
8410 /************************************************************************//**
8411 * @name HTTP client
8412 * @{
8413 */
8414
8415 /**
8416 * Timeout for HTTP requests done internally, in seconds.
8417 * @var int
8418 */
8419 $wgHTTPTimeout = 25;
8420
8421 /**
8422 * Timeout for HTTP requests done internally for transwiki imports, in seconds.
8423 * @since 1.29
8424 */
8425 $wgHTTPImportTimeout = 25;
8426
8427 /**
8428 * Timeout for Asynchronous (background) HTTP requests, in seconds.
8429 */
8430 $wgAsyncHTTPTimeout = 25;
8431
8432 /**
8433 * Proxy to use for CURL requests.
8434 */
8435 $wgHTTPProxy = false;
8436
8437 /**
8438 * Local virtual hosts.
8439 *
8440 * This lists domains that are configured as virtual hosts on the same machine.
8441 *
8442 * This affects the following:
8443 * - MWHttpRequest: If a request is to be made to a domain listed here, or any
8444 * subdomain thereof, then no proxy will be used.
8445 * Command-line scripts are not affected by this setting and will always use
8446 * the proxy if it is configured.
8447 *
8448 * @since 1.25
8449 */
8450 $wgLocalVirtualHosts = [];
8451
8452 /**
8453 * Timeout for connections done internally (in seconds)
8454 * Only works for curl
8455 */
8456 $wgHTTPConnectTimeout = 5e0;
8457
8458 /** @} */ # End HTTP client }
8459
8460 /************************************************************************//**
8461 * @name Job queue
8462 * @{
8463 */
8464
8465 /**
8466 * Number of jobs to perform per request. May be less than one in which case
8467 * jobs are performed probabalistically. If this is zero, jobs will not be done
8468 * during ordinary apache requests. In this case, maintenance/runJobs.php should
8469 * be run periodically.
8470 */
8471 $wgJobRunRate = 1;
8472
8473 /**
8474 * When $wgJobRunRate > 0, try to run jobs asynchronously, spawning a new process
8475 * to handle the job execution, instead of blocking the request until the job
8476 * execution finishes.
8477 *
8478 * @since 1.23
8479 */
8480 $wgRunJobsAsync = false;
8481
8482 /**
8483 * Number of rows to update per job
8484 */
8485 $wgUpdateRowsPerJob = 300;
8486
8487 /**
8488 * Number of rows to update per query
8489 */
8490 $wgUpdateRowsPerQuery = 100;
8491
8492 /** @} */ # End job queue }
8493
8494 /************************************************************************//**
8495 * @name Miscellaneous
8496 * @{
8497 */
8498
8499 /**
8500 * Name of the external diff engine to use. Supported values:
8501 * * string: path to an external diff executable
8502 * * false: wikidiff2 PHP/HHVM module if installed, otherwise the default PHP implementation
8503 * * 'wikidiff', 'wikidiff2', and 'wikidiff3' are treated as false for backwards compatibility
8504 */
8505 $wgExternalDiffEngine = false;
8506
8507 /**
8508 * wikidiff2 supports detection of changes in moved paragraphs.
8509 * This setting controls the maximum number of paragraphs to compare before it bails out.
8510 * Supported values:
8511 * * 0: detection of moved paragraphs is disabled
8512 * * int > 0: maximum number of paragraphs to compare
8513 * Note: number of paragraph comparisons is in O(n^2).
8514 * This setting is only effective if the wikidiff2 PHP/HHVM module is used as diffengine.
8515 * See $wgExternalDiffEngine.
8516 *
8517 * @since 1.30
8518 */
8519 $wgWikiDiff2MovedParagraphDetectionCutoff = 0;
8520
8521 /**
8522 * Disable redirects to special pages and interwiki redirects, which use a 302
8523 * and have no "redirected from" link.
8524 *
8525 * @note This is only for articles with #REDIRECT in them. URL's containing a
8526 * local interwiki prefix (or a non-canonical special page name) are still hard
8527 * redirected regardless of this setting.
8528 */
8529 $wgDisableHardRedirects = false;
8530
8531 /**
8532 * LinkHolderArray batch size
8533 * For debugging
8534 */
8535 $wgLinkHolderBatchSize = 1000;
8536
8537 /**
8538 * By default MediaWiki does not register links pointing to same server in
8539 * externallinks dataset, use this value to override:
8540 */
8541 $wgRegisterInternalExternals = false;
8542
8543 /**
8544 * Maximum number of pages to move at once when moving subpages with a page.
8545 */
8546 $wgMaximumMovedPages = 100;
8547
8548 /**
8549 * Fix double redirects after a page move.
8550 * Tends to conflict with page move vandalism, use only on a private wiki.
8551 */
8552 $wgFixDoubleRedirects = false;
8553
8554 /**
8555 * Allow redirection to another page when a user logs in.
8556 * To enable, set to a string like 'Main Page'
8557 */
8558 $wgRedirectOnLogin = null;
8559
8560 /**
8561 * Configuration for processing pool control, for use in high-traffic wikis.
8562 * An implementation is provided in the PoolCounter extension.
8563 *
8564 * This configuration array maps pool types to an associative array. The only
8565 * defined key in the associative array is "class", which gives the class name.
8566 * The remaining elements are passed through to the class as constructor
8567 * parameters.
8568 *
8569 * @par Example using local redis instance:
8570 * @code
8571 * $wgPoolCounterConf = [ 'ArticleView' => [
8572 * 'class' => PoolCounterRedis::class,
8573 * 'timeout' => 15, // wait timeout in seconds
8574 * 'workers' => 1, // maximum number of active threads in each pool
8575 * 'maxqueue' => 5, // maximum number of total threads in each pool
8576 * 'servers' => [ '127.0.0.1' ],
8577 * 'redisConfig' => []
8578 * ] ];
8579 * @endcode
8580 *
8581 * @par Example using C daemon from https://www.mediawiki.org/wiki/Extension:PoolCounter:
8582 * @code
8583 * $wgPoolCounterConf = [ 'ArticleView' => [
8584 * 'class' => PoolCounter_Client::class,
8585 * 'timeout' => 15, // wait timeout in seconds
8586 * 'workers' => 5, // maximum number of active threads in each pool
8587 * 'maxqueue' => 50, // maximum number of total threads in each pool
8588 * ... any extension-specific options...
8589 * ] ];
8590 * @endcode
8591 */
8592 $wgPoolCounterConf = null;
8593
8594 /**
8595 * To disable file delete/restore temporarily
8596 */
8597 $wgUploadMaintenance = false;
8598
8599 /**
8600 * Associative array mapping namespace IDs to the name of the content model pages in that namespace
8601 * should have by default (use the CONTENT_MODEL_XXX constants). If no special content type is
8602 * defined for a given namespace, pages in that namespace will use the CONTENT_MODEL_WIKITEXT
8603 * (except for the special case of JS and CS pages).
8604 *
8605 * @note To determine the default model for a new page's main slot, or any slot in general,
8606 * use SlotRoleHandler::getDefaultModel() together with SlotRoleRegistry::getRoleHandler().
8607 *
8608 * @since 1.21
8609 */
8610 $wgNamespaceContentModels = [];
8611
8612 /**
8613 * How to react if a plain text version of a non-text Content object is requested using
8614 * ContentHandler::getContentText():
8615 *
8616 * * 'ignore': return null
8617 * * 'fail': throw an MWException
8618 * * 'serialize': serialize to default format
8619 *
8620 * @since 1.21
8621 */
8622 $wgContentHandlerTextFallback = 'ignore';
8623
8624 /**
8625 * Set to false to disable use of the database fields introduced by the ContentHandler facility.
8626 * This way, the ContentHandler facility can be used without any additional information in the
8627 * database. A page's content model is then derived solely from the page's title. This however
8628 * means that changing a page's default model (e.g. using $wgNamespaceContentModels) will break
8629 * the page and/or make the content inaccessible. This also means that pages can not be moved to
8630 * a title that would default to a different content model.
8631 *
8632 * Overall, with $wgContentHandlerUseDB = false, no database updates are needed, but content
8633 * handling is less robust and less flexible.
8634 *
8635 * @since 1.21
8636 */
8637 $wgContentHandlerUseDB = true;
8638
8639 /**
8640 * Determines which types of text are parsed as wikitext. This does not imply that these kinds
8641 * of texts are also rendered as wikitext, it only means that links, magic words, etc will have
8642 * the effect on the database they would have on a wikitext page.
8643 *
8644 * @todo On the long run, it would be nice to put categories etc into a separate structure,
8645 * or at least parse only the contents of comments in the scripts.
8646 *
8647 * @since 1.21
8648 */
8649 $wgTextModelsToParse = [
8650 CONTENT_MODEL_WIKITEXT, // Just for completeness, wikitext will always be parsed.
8651 CONTENT_MODEL_JAVASCRIPT, // Make categories etc work, people put them into comments.
8652 CONTENT_MODEL_CSS, // Make categories etc work, people put them into comments.
8653 ];
8654
8655 /**
8656 * Register handlers for specific types of sites.
8657 *
8658 * @since 1.20
8659 */
8660 $wgSiteTypes = [
8661 'mediawiki' => MediaWikiSite::class,
8662 ];
8663
8664 /**
8665 * Whether the page_props table has a pp_sortkey column. Set to false in case
8666 * the respective database schema change was not applied.
8667 * @since 1.23
8668 */
8669 $wgPagePropsHaveSortkey = true;
8670
8671 /**
8672 * For installations where the canonical server is HTTP but HTTPS is optionally
8673 * supported, you can specify a non-standard HTTPS port here. $wgServer should
8674 * be a protocol-relative URL.
8675 *
8676 * If HTTPS is always used, just specify the port number in $wgServer.
8677 *
8678 * @see https://phabricator.wikimedia.org/T67184
8679 *
8680 * @since 1.24
8681 */
8682 $wgHttpsPort = 443;
8683
8684 /**
8685 * Secret for session storage.
8686 * This should be set in LocalSettings.php, otherwise wgSecretKey will
8687 * be used.
8688 * @since 1.27
8689 */
8690 $wgSessionSecret = false;
8691
8692 /**
8693 * If for some reason you can't install the PHP OpenSSL or mcrypt extensions,
8694 * you can set this to true to make MediaWiki work again at the cost of storing
8695 * sensitive session data insecurely. But it would be much more secure to just
8696 * install the OpenSSL extension.
8697 * @since 1.27
8698 */
8699 $wgSessionInsecureSecrets = false;
8700
8701 /**
8702 * Secret for hmac-based key derivation function (fast,
8703 * cryptographically secure random numbers).
8704 * This should be set in LocalSettings.php, otherwise wgSecretKey will
8705 * be used.
8706 * See also: $wgHKDFAlgorithm
8707 * @since 1.24
8708 */
8709 $wgHKDFSecret = false;
8710
8711 /**
8712 * Algorithm for hmac-based key derivation function (fast,
8713 * cryptographically secure random numbers).
8714 * See also: $wgHKDFSecret
8715 * @since 1.24
8716 */
8717 $wgHKDFAlgorithm = 'sha256';
8718
8719 /**
8720 * Enable page language feature
8721 * Allows setting page language in database
8722 * @var bool
8723 * @since 1.24
8724 */
8725 $wgPageLanguageUseDB = false;
8726
8727 /**
8728 * Global configuration variable for Virtual REST Services.
8729 *
8730 * Use the 'path' key to define automatically mounted services. The value for this
8731 * key is a map of path prefixes to service configuration. The latter is an array of:
8732 * - class : the fully qualified class name
8733 * - options : map of arguments to the class constructor
8734 * Such services will be available to handle queries under their path from the VRS
8735 * singleton, e.g. MediaWikiServices::getInstance()->getVirtualRESTServiceClient();
8736 *
8737 * Auto-mounting example for Parsoid:
8738 *
8739 * $wgVirtualRestConfig['paths']['/parsoid/'] = [
8740 * 'class' => ParsoidVirtualRESTService::class,
8741 * 'options' => [
8742 * 'url' => 'http://localhost:8000',
8743 * 'prefix' => 'enwiki',
8744 * 'domain' => 'en.wikipedia.org'
8745 * ]
8746 * ];
8747 *
8748 * Parameters for different services can also be declared inside the 'modules' value,
8749 * which is to be treated as an associative array. The parameters in 'global' will be
8750 * merged with service-specific ones. The result will then be passed to
8751 * VirtualRESTService::__construct() in the module.
8752 *
8753 * Example config for Parsoid:
8754 *
8755 * $wgVirtualRestConfig['modules']['parsoid'] = [
8756 * 'url' => 'http://localhost:8000',
8757 * 'prefix' => 'enwiki',
8758 * 'domain' => 'en.wikipedia.org',
8759 * ];
8760 *
8761 * @var array
8762 * @since 1.25
8763 */
8764 $wgVirtualRestConfig = [
8765 'paths' => [],
8766 'modules' => [],
8767 'global' => [
8768 # Timeout in seconds
8769 'timeout' => 360,
8770 # 'domain' is set to $wgCanonicalServer in Setup.php
8771 'forwardCookies' => false,
8772 'HTTPProxy' => null
8773 ]
8774 ];
8775
8776 /**
8777 * Controls whether zero-result search queries with suggestions should display results for
8778 * these suggestions.
8779 *
8780 * @var bool
8781 * @since 1.26
8782 */
8783 $wgSearchRunSuggestedQuery = true;
8784
8785 /**
8786 * Where popular password file is located.
8787 *
8788 * Default in core contains 10,000 most popular. This config
8789 * allows you to change which file, in case you want to generate
8790 * a password file with > 10000 entries in it.
8791 *
8792 * @see maintenance/createCommonPasswordCdb.php
8793 * @since 1.27
8794 * @deprecated since 1.33
8795 * @var string path to file
8796 */
8797 $wgPopularPasswordFile = __DIR__ . '/password/commonpasswords.cdb';
8798
8799 /*
8800 * Max time (in seconds) a user-generated transaction can spend in writes.
8801 * If exceeded, the transaction is rolled back with an error instead of being committed.
8802 *
8803 * @var int|bool Disabled if false
8804 * @since 1.27
8805 */
8806 $wgMaxUserDBWriteDuration = false;
8807
8808 /*
8809 * Max time (in seconds) a job-generated transaction can spend in writes.
8810 * If exceeded, the transaction is rolled back with an error instead of being committed.
8811 *
8812 * @var int|bool Disabled if false
8813 * @since 1.30
8814 */
8815 $wgMaxJobDBWriteDuration = false;
8816
8817 /**
8818 * Controls Content-Security-Policy header [Experimental]
8819 *
8820 * @see https://www.w3.org/TR/CSP2/
8821 * @since 1.32
8822 * @var bool|array true to send default version, false to not send.
8823 * If an array, can have parameters:
8824 * 'default-src' If true or array (of additional urls) will set a default-src
8825 * directive, which limits what places things can load from. If false or not
8826 * set, will send a default-src directive allowing all sources.
8827 * 'includeCORS' If true or not set, will include urls from
8828 * $wgCrossSiteAJAXdomains as an allowed load sources.
8829 * 'unsafeFallback' Add unsafe-inline as a script source, as a fallback for
8830 * browsers that do not understand nonce-sources [default on].
8831 * 'useNonces' Require nonces on all inline scripts. If disabled and 'unsafeFallback'
8832 * is on, then all inline scripts will be allowed [default true].
8833 * 'script-src' Array of additional places that are allowed to have JS be loaded from.
8834 * 'report-uri' true to use MW api [default], false to disable, string for alternate uri
8835 * @warning May cause slowness on windows due to slow random number generator.
8836 */
8837 $wgCSPHeader = false;
8838
8839 /**
8840 * Controls Content-Security-Policy-Report-Only header
8841 *
8842 * @since 1.32
8843 * @var bool|array Same as $wgCSPHeader
8844 */
8845 $wgCSPReportOnlyHeader = false;
8846
8847 /**
8848 * List of messages which might contain raw HTML.
8849 * Extensions should add their messages here. The list is used for access control:
8850 * changing messages listed here will require editsitecss and editsitejs rights.
8851 *
8852 * Message names must be given with underscores rather than spaces and with lowercase first letter.
8853 *
8854 * @since 1.32
8855 * @var string[]
8856 */
8857 $wgRawHtmlMessages = [
8858 'copyright',
8859 'history_copyright',
8860 'googlesearch',
8861 'feedback-terms',
8862 'feedback-termsofuse',
8863 ];
8864
8865 /**
8866 * Mapping of event channels (or channel categories) to EventRelayer configuration.
8867 *
8868 * By setting up a PubSub system (like Kafka) and enabling a corresponding EventRelayer class
8869 * that uses it, MediaWiki can broadcast events to all subscribers. Certain features like WAN
8870 * cache purging and CDN cache purging will emit events to this system. Appropriate listers can
8871 * subscribe to the channel and take actions based on the events. For example, a local daemon
8872 * can run on each CDN cache node and perfom local purges based on the URL purge channel events.
8873 *
8874 * Some extensions may want to use "channel categories" so that different channels can also share
8875 * the same custom relayer instance (e.g. when it's likely to be overriden). They can use
8876 * EventRelayerGroup::getRelayer() based on the category but call notify() on various different
8877 * actual channels. One reason for this would be that some system have very different performance
8878 * vs durability needs, so one system (e.g. Kafka) may not be suitable for all uses.
8879 *
8880 * The 'default' key is for all channels (or channel categories) without an explicit entry here.
8881 *
8882 * @since 1.27
8883 */
8884 $wgEventRelayerConfig = [
8885 'default' => [
8886 'class' => EventRelayerNull::class,
8887 ]
8888 ];
8889
8890 /**
8891 * Share data about this installation with MediaWiki developers
8892 *
8893 * When set to true, MediaWiki will periodically ping https://www.mediawiki.org/ with basic
8894 * data about this MediaWiki instance. This data includes, for example, the type of system,
8895 * PHP version, and chosen database backend. The Wikimedia Foundation shares this data with
8896 * MediaWiki developers to help guide future development efforts.
8897 *
8898 * For details about what data is sent, see: https://www.mediawiki.org/wiki/Manual:$wgPingback
8899 *
8900 * @var bool
8901 * @since 1.28
8902 */
8903 $wgPingback = false;
8904
8905 /**
8906 * List of urls which appear often to be triggering CSP reports
8907 * but do not appear to be caused by actual content, but by client
8908 * software inserting scripts (i.e. Ad-Ware).
8909 * List based on results from Wikimedia logs.
8910 *
8911 * @since 1.28
8912 */
8913 $wgCSPFalsePositiveUrls = [
8914 'https://3hub.co' => true,
8915 'https://morepro.info' => true,
8916 'https://p.ato.mx' => true,
8917 'https://s.ato.mx' => true,
8918 'https://adserver.adtech.de' => true,
8919 'https://ums.adtechus.com' => true,
8920 'https://cas.criteo.com' => true,
8921 'https://cat.nl.eu.criteo.com' => true,
8922 'https://atpixel.alephd.com' => true,
8923 'https://rtb.metrigo.com' => true,
8924 'https://d5p.de17a.com' => true,
8925 'https://ad.lkqd.net/vpaid/vpaid.js' => true,
8926 'https://ad.lkqd.net/vpaid/vpaid.js?fusion=1.0' => true,
8927 'https://t.lkqd.net/t' => true,
8928 'chrome-extension' => true,
8929 ];
8930
8931 /**
8932 * Shortest CIDR limits that can be checked in any individual range check
8933 * at Special:Contributions.
8934 *
8935 * @var array
8936 * @since 1.30
8937 */
8938 $wgRangeContributionsCIDRLimit = [
8939 'IPv4' => 16,
8940 'IPv6' => 32,
8941 ];
8942
8943 /**
8944 * The following variables define 3 user experience levels:
8945 *
8946 * - newcomer: has not yet reached the 'learner' level
8947 *
8948 * - learner: has at least $wgLearnerEdits and has been
8949 * a member for $wgLearnerMemberSince days
8950 * but has not yet reached the 'experienced' level.
8951 *
8952 * - experienced: has at least $wgExperiencedUserEdits edits and
8953 * has been a member for $wgExperiencedUserMemberSince days.
8954 */
8955 $wgLearnerEdits = 10;
8956 $wgLearnerMemberSince = 4; # days
8957 $wgExperiencedUserEdits = 500;
8958 $wgExperiencedUserMemberSince = 30; # days
8959
8960 /**
8961 * Mapping of interwiki index prefixes to descriptors that
8962 * can be used to change the display of interwiki search results.
8963 *
8964 * Descriptors are appended to CSS classes of interwiki results
8965 * which using InterwikiSearchResultWidget.
8966 *
8967 * Predefined descriptors include the following words:
8968 * definition, textbook, news, quotation, book, travel, course
8969 *
8970 * @par Example:
8971 * @code
8972 * $wgInterwikiPrefixDisplayTypes = [
8973 * 'iwprefix' => 'definition'
8974 *];
8975 * @endcode
8976 */
8977 $wgInterwikiPrefixDisplayTypes = [];
8978
8979 /**
8980 * RevisionStore table schema migration stage (content, slots, content_models & slot_roles tables).
8981 * Use the SCHEMA_COMPAT_XXX flags. Supported values:
8982 *
8983 * - SCHEMA_COMPAT_OLD
8984 * - SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
8985 * - SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW
8986 * - SCHEMA_COMPAT_OLD
8987 *
8988 * Note that reading the old and new schema at the same time is not supported.
8989 * Attempting to set both read bits in $wgMultiContentRevisionSchemaMigrationStage
8990 * will result in an InvalidArgumentException.
8991 *
8992 * @see Task: https://phabricator.wikimedia.org/T174028
8993 * @see Commit: https://gerrit.wikimedia.org/r/#/c/378724/
8994 *
8995 * @since 1.32
8996 * @var int An appropriate combination of SCHEMA_COMPAT_XXX flags.
8997 */
8998 $wgMultiContentRevisionSchemaMigrationStage = SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW;
8999
9000 /**
9001 * Actor table schema migration stage.
9002 *
9003 * Use the SCHEMA_COMPAT_XXX flags. Supported values:
9004 * - SCHEMA_COMPAT_OLD
9005 * - SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
9006 * - SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW
9007 * - SCHEMA_COMPAT_NEW
9008 *
9009 * Note that reading the old and new schema at the same time is not supported
9010 * in 1.32, but was (with significant query performance issues) in 1.31.
9011 *
9012 * @since 1.31
9013 * @since 1.32 changed allowed flags
9014 * @var int An appropriate combination of SCHEMA_COMPAT_XXX flags.
9015 */
9016 $wgActorTableSchemaMigrationStage = SCHEMA_COMPAT_OLD;
9017
9018 /**
9019 * Flag to enable Partial Blocks. This allows an admin to prevent a user from editing specific pages
9020 * or namespaces.
9021 *
9022 * @since 1.33
9023 * @deprecated 1.33
9024 * @var bool
9025 */
9026 $wgEnablePartialBlocks = false;
9027
9028 /**
9029 * Enable confirmation prompt for rollback actions to prevent accidental rollbacks.
9030 * May be disabled to reduce number of clicks needed to perform rollbacks.
9031 *
9032 * @since 1.33
9033 * @var bool
9034 */
9035 $wgEnableRollbackConfirmationPrompt = true;
9036
9037 /**
9038 * Enable stats monitoring when Block Notices are displayed in different places around core
9039 * and extensions.
9040 *
9041 * @since 1.34
9042 * @deprecated 1.34
9043 * @var bool
9044 */
9045 $wgEnableBlockNoticeStats = false;
9046
9047 /**
9048 * Origin Trials tokens.
9049 *
9050 * @since 1.34
9051 * @var array
9052 */
9053 $wgOriginTrials = [];
9054
9055 /**
9056 * Enable client-side Priority Hints.
9057 *
9058 * @warning EXPERIMENTAL!
9059 *
9060 * @since 1.34
9061 * @var bool
9062 */
9063 $wgPriorityHints = false;
9064
9065 /**
9066 * For really cool vim folding this needs to be at the end:
9067 * vim: foldmarker=@{,@} foldmethod=marker
9068 * @}
9069 */