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