Bump and prep 1.34.0
[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';
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 must be set in LocalSettings.php. The MediaWiki installer does this
99 * automatically since 1.18.
100 *
101 * If you want to use protocol-relative URLs on your wiki, set this to a
102 * protocol-relative URL like '//example.com' and set $wgCanonicalServer
103 * to a fully qualified URL.
104 */
105 $wgServer = false;
106
107 /**
108 * Canonical URL of the server, to use in IRC feeds and notification e-mails.
109 * Must be fully qualified, even if $wgServer is protocol-relative.
110 *
111 * Defaults to $wgServer, expanded to a fully qualified http:// URL if needed.
112 * @since 1.18
113 */
114 $wgCanonicalServer = false;
115
116 /**
117 * Server name. This is automatically computed by parsing the bare
118 * hostname out of $wgCanonicalServer. It should not be customized.
119 * @since 1.24
120 */
121 $wgServerName = false;
122
123 /************************************************************************//**
124 * @name Script path settings
125 * @{
126 */
127
128 /**
129 * The path we should point to.
130 * It might be a virtual path in case with use apache mod_rewrite for example.
131 *
132 * This *needs* to be set correctly.
133 *
134 * Other paths will be set to defaults based on it unless they are directly
135 * set in LocalSettings.php
136 */
137 $wgScriptPath = '/wiki';
138
139 /**
140 * Whether to support URLs like index.php/Page_title These often break when PHP
141 * is set up in CGI mode. PATH_INFO *may* be correct if cgi.fix_pathinfo is set,
142 * but then again it may not; lighttpd converts incoming path data to lowercase
143 * on systems with case-insensitive filesystems, and there have been reports of
144 * problems on Apache as well.
145 *
146 * To be safe we'll continue to keep it off by default.
147 *
148 * Override this to false if $_SERVER['PATH_INFO'] contains unexpectedly
149 * incorrect garbage, or to true if it is really correct.
150 *
151 * The default $wgArticlePath will be set based on this value at runtime, but if
152 * you have customized it, having this incorrectly set to true can cause
153 * redirect loops when "pretty URLs" are used.
154 * @since 1.2.1
155 */
156 $wgUsePathInfo = ( strpos( PHP_SAPI, 'cgi' ) === false ) &&
157 ( strpos( PHP_SAPI, 'apache2filter' ) === false ) &&
158 ( strpos( PHP_SAPI, 'isapi' ) === false );
159
160 /** @} */
161
162 /************************************************************************//**
163 * @name URLs and file paths
164 *
165 * These various web and file path variables are set to their defaults
166 * in Setup.php if they are not explicitly set from LocalSettings.php.
167 *
168 * These will relatively rarely need to be set manually, unless you are
169 * splitting style sheets or images outside the main document root.
170 *
171 * In this section, a "path" is usually a host-relative URL, i.e. a URL without
172 * the host part, that starts with a slash. In most cases a full URL is also
173 * acceptable. A "directory" is a local file path.
174 *
175 * In both paths and directories, trailing slashes should not be included.
176 *
177 * @{
178 */
179
180 /**
181 * The URL path to index.php.
182 *
183 * Defaults to "{$wgScriptPath}/index.php".
184 */
185 $wgScript = false;
186
187 /**
188 * The URL path to load.php.
189 *
190 * Defaults to "{$wgScriptPath}/load.php".
191 * @since 1.17
192 */
193 $wgLoadScript = false;
194
195 /**
196 * The URL path to the REST API
197 * Defaults to "{$wgScriptPath}/rest.php"
198 * @since 1.34
199 */
200 $wgRestPath = false;
201
202 /**
203 * The URL path of the skins directory.
204 * Defaults to "{$wgResourceBasePath}/skins".
205 * @since 1.3
206 */
207 $wgStylePath = false;
208 $wgStyleSheetPath = &$wgStylePath;
209
210 /**
211 * The URL path of the skins directory. Should not point to an external domain.
212 * Defaults to "{$wgScriptPath}/skins".
213 * @since 1.17
214 */
215 $wgLocalStylePath = false;
216
217 /**
218 * The URL path of the extensions directory.
219 * Defaults to "{$wgResourceBasePath}/extensions".
220 * @since 1.16
221 */
222 $wgExtensionAssetsPath = false;
223
224 /**
225 * Filesystem extensions directory.
226 * Defaults to "{$IP}/extensions".
227 * @since 1.25
228 */
229 $wgExtensionDirectory = "{$IP}/extensions";
230
231 /**
232 * Filesystem stylesheets directory.
233 * Defaults to "{$IP}/skins".
234 * @since 1.3
235 */
236 $wgStyleDirectory = "{$IP}/skins";
237
238 /**
239 * The URL path for primary article page views. This path should contain $1,
240 * which is replaced by the article title.
241 *
242 * Defaults to "{$wgScript}/$1" or "{$wgScript}?title=$1",
243 * depending on $wgUsePathInfo.
244 */
245 $wgArticlePath = false;
246
247 /**
248 * The URL path for the images directory.
249 * Defaults to "{$wgScriptPath}/images".
250 */
251 $wgUploadPath = false;
252
253 /**
254 * The filesystem path of the images directory. Defaults to "{$IP}/images".
255 */
256 $wgUploadDirectory = false;
257
258 /**
259 * Directory where the cached page will be saved.
260 * Defaults to "{$wgUploadDirectory}/cache".
261 */
262 $wgFileCacheDirectory = false;
263
264 /**
265 * The URL path of the wiki logo. The logo size should be 135x135 pixels.
266 * Defaults to "$wgResourceBasePath/resources/assets/wiki.png".
267 */
268 $wgLogo = false;
269
270 /**
271 * Array with URL paths to HD versions of the wiki logo. The scaled logo size
272 * should be under 135x155 pixels.
273 * Only 1.5x and 2x versions are supported.
274 *
275 * @par Example:
276 * @code
277 * $wgLogoHD = [
278 * "1.5x" => "path/to/1.5x_version.png",
279 * "2x" => "path/to/2x_version.png"
280 * ];
281 * @endcode
282 *
283 * SVG is also supported but when enabled, it
284 * disables 1.5x and 2x as svg will already
285 * be optimised for screen resolution.
286 *
287 * @par Example:
288 * @code
289 * $wgLogoHD = [
290 * "svg" => "path/to/svg_version.svg",
291 * ];
292 * @endcode
293 *
294 * @since 1.25
295 */
296 $wgLogoHD = false;
297
298 /**
299 * The URL path of the shortcut icon.
300 * @since 1.6
301 */
302 $wgFavicon = '/favicon.ico';
303
304 /**
305 * The URL path of the icon for iPhone and iPod Touch web app bookmarks.
306 * Defaults to no icon.
307 * @since 1.12
308 */
309 $wgAppleTouchIcon = false;
310
311 /**
312 * Value for the referrer policy meta tag.
313 * One or more of the values defined in the Referrer Policy specification:
314 * https://w3c.github.io/webappsec-referrer-policy/
315 * ('no-referrer', 'no-referrer-when-downgrade', 'same-origin',
316 * 'origin', 'strict-origin', 'origin-when-cross-origin',
317 * 'strict-origin-when-cross-origin', or 'unsafe-url')
318 * Setting it to false prevents the meta tag from being output
319 * (which results in falling back to the Referrer-Policy header,
320 * or 'no-referrer-when-downgrade' if that's not set either.)
321 * Setting it to an array (supported since 1.31) will create a meta tag for
322 * each value, in the reverse of the order (meaning that the first array element
323 * will be the default and the others used as fallbacks for browsers which do not
324 * understand it).
325 *
326 * @var array|string|bool
327 * @since 1.25
328 */
329 $wgReferrerPolicy = false;
330
331 /**
332 * The local filesystem path to a temporary directory. This must not be web accessible.
333 *
334 * When this setting is set to false, its value will automatically be decided
335 * through the first call to wfTempDir(). See that method's implementation for
336 * the actual detection logic.
337 *
338 * To find the temporary path for the current wiki, developers must not use
339 * this variable directly. Use the global function wfTempDir() instead.
340 *
341 * The temporary directory is expected to be shared with other applications,
342 * including other MediaWiki instances (which might not run the same version
343 * or configution). When storing files here, take care to avoid conflicts
344 * with other instances of MediaWiki. For example, when caching the result
345 * of a computation, the file name should incorporate the input of the
346 * computation so that it cannot be confused for the result of a similar
347 * computation by another MediaWiki instance.
348 *
349 * @see wfTempDir()
350 * @note Default changed to false in MediaWiki 1.20.
351 */
352 $wgTmpDirectory = false;
353
354 /**
355 * If set, this URL is added to the start of $wgUploadPath to form a complete
356 * upload URL.
357 * @since 1.4
358 */
359 $wgUploadBaseUrl = '';
360
361 /**
362 * To enable remote on-demand scaling, set this to the thumbnail base URL.
363 * Full thumbnail URL will be like $wgUploadStashScalerBaseUrl/e/e6/Foo.jpg/123px-Foo.jpg
364 * where 'e6' are the first two characters of the MD5 hash of the file name.
365 * If $wgUploadStashScalerBaseUrl is set to false, thumbs are rendered locally as needed.
366 * @since 1.17
367 */
368 $wgUploadStashScalerBaseUrl = false;
369
370 /**
371 * To set 'pretty' URL paths for actions other than
372 * plain page views, add to this array.
373 *
374 * @par Example:
375 * Set pretty URL for the edit action:
376 * @code
377 * 'edit' => "$wgScriptPath/edit/$1"
378 * @endcode
379 *
380 * There must be an appropriate script or rewrite rule in place to handle these
381 * URLs.
382 * @since 1.5
383 */
384 $wgActionPaths = [];
385
386 /** @} */
387
388 /************************************************************************//**
389 * @name Files and file uploads
390 * @{
391 */
392
393 /**
394 * Allow users to upload files.
395 *
396 * Use $wgLocalFileRepo to control how and where uploads are stored.
397 * Disabled by default as for security reasons.
398 * See <https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads>.
399 *
400 * @since 1.5
401 */
402 $wgEnableUploads = false;
403
404 /**
405 * The maximum age of temporary (incomplete) uploaded files
406 */
407 $wgUploadStashMaxAge = 6 * 3600; // 6 hours
408
409 /**
410 * Allows to move images and other media files
411 */
412 $wgAllowImageMoving = true;
413
414 /**
415 * Enable deferred upload tasks that use the job queue.
416 * Only enable this if job runners are set up for both the
417 * 'AssembleUploadChunks' and 'PublishStashedFile' job types.
418 *
419 * @note If you use suhosin, this setting is incompatible with
420 * suhosin.session.encrypt.
421 */
422 $wgEnableAsyncUploads = false;
423
424 /**
425 * Additional characters that are not allowed in filenames. They are replaced with '-' when
426 * uploading. Like $wgLegalTitleChars, this is a regexp character class.
427 *
428 * Slashes and backslashes are disallowed regardless of this setting, but included here for
429 * completeness.
430 */
431 $wgIllegalFileChars = ":\\/\\\\";
432
433 /**
434 * What directory to place deleted uploads in.
435 * Defaults to "{$wgUploadDirectory}/deleted".
436 */
437 $wgDeletedDirectory = false;
438
439 /**
440 * Set this to true if you use img_auth and want the user to see details on why access failed.
441 */
442 $wgImgAuthDetails = false;
443
444 /**
445 * Map of relative URL directories to match to internal mwstore:// base storage paths.
446 * For img_auth.php requests, everything after "img_auth.php/" is checked to see
447 * if starts with any of the prefixes defined here. The prefixes should not overlap.
448 * The prefix that matches has a corresponding storage path, which the rest of the URL
449 * is assumed to be relative to. The file at that path (or a 404) is send to the client.
450 *
451 * Example:
452 * $wgImgAuthUrlPathMap['/timeline/'] = 'mwstore://local-fs/timeline-render/';
453 * The above maps ".../img_auth.php/timeline/X" to "mwstore://local-fs/timeline-render/".
454 * The name "local-fs" should correspond by name to an entry in $wgFileBackends.
455 *
456 * @see $wgFileBackends
457 */
458 $wgImgAuthUrlPathMap = [];
459
460 /**
461 * File repository structures
462 *
463 * $wgLocalFileRepo is a single repository structure, and $wgForeignFileRepos is
464 * an array of such structures. Each repository structure is an associative
465 * array of properties configuring the repository.
466 *
467 * Properties required for all repos:
468 * - class The class name for the repository. May come from the core or an extension.
469 * The core repository classes are FileRepo, LocalRepo, ForeignDBRepo.
470 *
471 * - name A unique name for the repository (but $wgLocalFileRepo should be 'local').
472 * The name should consist of alpha-numeric characters.
473 * - backend A file backend name (see $wgFileBackends).
474 *
475 * For most core repos:
476 * - zones Associative array of zone names that each map to an array with:
477 * container : backend container name the zone is in
478 * directory : root path within container for the zone
479 * url : base URL to the root of the zone
480 * urlsByExt : map of file extension types to base URLs
481 * (useful for using a different cache for videos)
482 * Zones default to using "<repo name>-<zone name>" as the container name
483 * and default to using the container root as the zone's root directory.
484 * Nesting of zone locations within other zones should be avoided.
485 * - url Public zone URL. The 'zones' settings take precedence.
486 * - hashLevels The number of directory levels for hash-based division of files
487 * - thumbScriptUrl The URL for thumb.php (optional, not recommended)
488 * - transformVia404 Whether to skip media file transformation on parse and rely on a 404
489 * handler instead.
490 * - initialCapital Equivalent to $wgCapitalLinks (or $wgCapitalLinkOverrides[NS_FILE],
491 * determines whether filenames implicitly start with a capital letter.
492 * The current implementation may give incorrect description page links
493 * when the local $wgCapitalLinks and initialCapital are mismatched.
494 * - pathDisclosureProtection
495 * May be 'paranoid' to remove all parameters from error messages, 'none' to
496 * leave the paths in unchanged, or 'simple' to replace paths with
497 * placeholders. Default for LocalRepo is 'simple'.
498 * - fileMode This allows wikis to set the file mode when uploading/moving files. Default
499 * is 0644.
500 * - directory The local filesystem directory where public files are stored. Not used for
501 * some remote repos.
502 * - thumbDir The base thumbnail directory. Defaults to "<directory>/thumb".
503 * - thumbUrl The base thumbnail URL. Defaults to "<url>/thumb".
504 * - isPrivate Set this if measures should always be taken to keep the files private.
505 * One should not trust this to assure that the files are not web readable;
506 * the server configuration should be done manually depending on the backend.
507 *
508 * These settings describe a foreign MediaWiki installation. They are optional, and will be ignored
509 * for local repositories:
510 * - descBaseUrl URL of image description pages, e.g. https://en.wikipedia.org/wiki/File:
511 * - scriptDirUrl URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g.
512 * https://en.wikipedia.org/w
513 * - articleUrl Equivalent to $wgArticlePath, e.g. https://en.wikipedia.org/wiki/$1
514 * - fetchDescription Fetch the text of the remote file description page and display them
515 * on the local wiki.
516 * - abbrvThreshold File names over this size will use the short form of thumbnail names.
517 * Short thumbnail names only have the width, parameters, and the extension.
518 *
519 * ForeignDBRepo:
520 * - dbType, dbServer, dbUser, dbPassword, dbName, dbFlags
521 * equivalent to the corresponding member of $wgDBservers
522 * - tablePrefix Table prefix, the foreign wiki's $wgDBprefix
523 * - hasSharedCache Set to true if the foreign wiki's $wgMainCacheType is identical to,
524 * and accessible from, this wiki.
525 *
526 * ForeignAPIRepo:
527 * - apibase Use for the foreign API's URL
528 * - apiThumbCacheExpiry How long to locally cache thumbs for
529 *
530 * If you leave $wgLocalFileRepo set to false, Setup will fill in appropriate values.
531 * Otherwise, set $wgLocalFileRepo to a repository structure as described above.
532 * If you set $wgUseInstantCommons to true, it will add an entry for Commons.
533 * If you set $wgForeignFileRepos to an array of repository structures, those will
534 * be searched after the local file repo.
535 * Otherwise, you will only have access to local media files.
536 *
537 * @see Setup.php for an example usage and default initialization.
538 */
539 $wgLocalFileRepo = false;
540
541 /**
542 * Enable the use of files from one or more other wikis.
543 *
544 * If you operate multiple wikis, you can declare a shared upload path here.
545 * Uploads to the local wiki will NOT be stored here - See $wgLocalFileRepo
546 * and $wgUploadDirectory for that.
547 *
548 * The wiki will only consider the foreign repository if no file of the given name
549 * is found in the local repository (e.g. via `[[File:..]]` syntax).
550 *
551 * @since 1.11
552 * @see $wgLocalFileRepo
553 */
554 $wgForeignFileRepos = [];
555
556 /**
557 * Use Wikimedia Commons as a foreign file repository.
558 *
559 * This is a shortcut for adding an entry to to $wgForeignFileRepos
560 * for https://commons.wikimedia.org, using ForeignAPIRepo with the
561 * default settings.
562 *
563 * @since 1.16
564 */
565 $wgUseInstantCommons = false;
566
567 /**
568 * Shortcut for adding an entry to $wgForeignFileRepos.
569 *
570 * Uses the following variables:
571 *
572 * - directory: $wgSharedUploadDirectory.
573 * - url: $wgSharedUploadPath.
574 * - hashLevels: Based on $wgHashedSharedUploadDirectory.
575 * - thumbScriptUrl: $wgSharedThumbnailScriptPath.
576 * - transformVia404: Based on $wgGenerateThumbnailOnParse.
577 * - descBaseUrl: $wgRepositoryBaseUrl.
578 * - fetchDescription: $wgFetchCommonsDescriptions.
579 *
580 * If $wgSharedUploadDBname is set, it uses the ForeignDBRepo
581 * class, with also the following variables:
582 *
583 * - dbName: $wgSharedUploadDBname.
584 * - dbType: $wgDBtype.
585 * - dbServer: $wgDBserver.
586 * - dbUser: $wgDBuser.
587 * - dbPassword: $wgDBpassword.
588 * - dbFlags: Based on $wgDebugDumpSql.
589 * - tablePrefix: $wgSharedUploadDBprefix,
590 * - hasSharedCache: $wgCacheSharedUploads.
591 *
592 * @var bool
593 * @since 1.3
594 */
595 $wgUseSharedUploads = false;
596
597 /**
598 * Shortcut for the 'directory' setting of $wgForeignFileRepos.
599 * Only used if $wgUseSharedUploads is enabled.
600 *
601 * @var string
602 * @since 1.3
603 */
604 $wgSharedUploadDirectory = null;
605
606 /**
607 * Shortcut for the 'url' setting of $wgForeignFileRepos.
608 * Only used if $wgUseSharedUploads is enabled.
609 *
610 * @var string
611 * @since 1.3
612 */
613 $wgSharedUploadPath = null;
614
615 /**
616 * Shortcut for the 'hashLevels' setting of $wgForeignFileRepos.
617 * Only used if $wgUseSharedUploads is enabled.
618 *
619 * @var bool
620 * @since 1.3
621 */
622 $wgHashedSharedUploadDirectory = true;
623
624 /**
625 * Shortcut for the 'descBaseUrl' setting of $wgForeignFileRepos.
626 * Only used if $wgUseSharedUploads is enabled.
627 *
628 * @since 1.5
629 */
630 $wgRepositoryBaseUrl = 'https://commons.wikimedia.org/wiki/File:';
631
632 /**
633 * Shortcut for the 'fetchDescription' setting of $wgForeignFileRepos.
634 * Only used if $wgUseSharedUploads is enabled.
635 *
636 * @var bool
637 * @since 1.5
638 */
639 $wgFetchCommonsDescriptions = false;
640
641 /**
642 * Shortcut for the ForeignDBRepo 'dbName' setting in $wgForeignFileRepos.
643 * Set this to false if the uploads do not come from a wiki.
644 * Only used if $wgUseSharedUploads is enabled.
645 *
646 * @var bool|string
647 * @since 1.4
648 */
649 $wgSharedUploadDBname = false;
650
651 /**
652 * Shortcut for the ForeignDBRepo 'tablePrefix' setting in $wgForeignFileRepos.
653 * Only used if $wgUseSharedUploads is enabled.
654 *
655 * @var string
656 * @since 1.5
657 */
658 $wgSharedUploadDBprefix = '';
659
660 /**
661 * Shortcut for the ForeignDBRepo 'hasSharedCache' setting in $wgForeignFileRepos.
662 * Only used if $wgUseSharedUploads is enabled.
663 *
664 * @var bool
665 * @since 1.5
666 */
667 $wgCacheSharedUploads = true;
668
669 /**
670 * Array of foreign file repo names (set in $wgForeignFileRepos above) that
671 * are allowable upload targets. These wikis must have some method of
672 * authentication (i.e. CentralAuth), and be CORS-enabled for this wiki.
673 * The string 'local' signifies the default local file repository.
674 *
675 * Example:
676 * $wgForeignUploadTargets = [ 'shared' ];
677 */
678 $wgForeignUploadTargets = [ 'local' ];
679
680 /**
681 * Configuration for file uploads using the embeddable upload dialog
682 * (https://www.mediawiki.org/wiki/Upload_dialog).
683 *
684 * This applies also to foreign uploads to this wiki (the configuration is loaded by remote wikis
685 * using the action=query&meta=siteinfo API).
686 *
687 * See below for documentation of each property. None of the properties may be omitted.
688 */
689 $wgUploadDialog = [
690 // Fields to make available in the dialog. `true` means that this field is visible, `false` means
691 // that it is hidden. The "Name" field can't be hidden. Note that you also have to add the
692 // matching replacement to the 'filepage' format key below to make use of these.
693 'fields' => [
694 'description' => true,
695 'date' => false,
696 'categories' => false,
697 ],
698 // Suffix of localisation messages used to describe the license under which the uploaded file will
699 // be released. The same value may be set for both 'local' and 'foreign' uploads.
700 'licensemessages' => [
701 // The 'local' messages are used for local uploads on this wiki:
702 // * upload-form-label-own-work-message-generic-local
703 // * upload-form-label-not-own-work-message-generic-local
704 // * upload-form-label-not-own-work-local-generic-local
705 'local' => 'generic-local',
706 // The 'foreign' messages are used for cross-wiki uploads from other wikis to this wiki:
707 // * upload-form-label-own-work-message-generic-foreign
708 // * upload-form-label-not-own-work-message-generic-foreign
709 // * upload-form-label-not-own-work-local-generic-foreign
710 'foreign' => 'generic-foreign',
711 ],
712 // Upload comments to use for 'local' and 'foreign' uploads. This can also be set to a single
713 // string value, in which case it is used for both kinds of uploads. Available replacements:
714 // * $HOST - domain name from which a cross-wiki upload originates
715 // * $PAGENAME - wiki page name from which an upload originates
716 'comment' => [
717 'local' => '',
718 'foreign' => '',
719 ],
720 // Format of the file page wikitext to be generated from the fields input by the user.
721 'format' => [
722 // Wrapper for the whole page. Available replacements:
723 // * $DESCRIPTION - file description, as input by the user (only if the 'description' field is
724 // enabled), wrapped as defined below in the 'description' key
725 // * $DATE - file creation date, as input by the user (only if the 'date' field is enabled)
726 // * $SOURCE - as defined below in the 'ownwork' key, may be extended in the future
727 // * $AUTHOR - linked user name, may be extended in the future
728 // * $LICENSE - as defined below in the 'license' key, may be extended in the future
729 // * $CATEGORIES - file categories wikitext, as input by the user (only if the 'categories'
730 // field is enabled), or if no input, as defined below in the 'uncategorized' key
731 'filepage' => '$DESCRIPTION',
732 // Wrapped for file description. Available replacements:
733 // * $LANGUAGE - source wiki's content language
734 // * $TEXT - input by the user
735 'description' => '$TEXT',
736 'ownwork' => '',
737 'license' => '',
738 'uncategorized' => '',
739 ],
740 ];
741
742 /**
743 * File backend structure configuration.
744 *
745 * This is an array of file backend configuration arrays.
746 * Each backend configuration has the following parameters:
747 * - name : A unique name for the backend
748 * - class : The file backend class to use
749 * - wikiId : A unique string that identifies the wiki (container prefix)
750 * - lockManager : The name of a lock manager (see $wgLockManagers) [optional]
751 * - fileJournal : File journal configuration for FileJournal::__construct() [optional]
752 *
753 * See FileBackend::__construct() for more details.
754 * Additional parameters are specific to the file backend class used.
755 * These settings should be global to all wikis when possible.
756 *
757 * FileBackendMultiWrite::__construct() is augmented with a 'template' option that
758 * can be used in any of the values of the 'backends' array. Its value is the name of
759 * another backend in $wgFileBackends. When set, it pre-fills the array with all of the
760 * configuration of the named backend. Explicitly set values in the array take precedence.
761 *
762 * There are two particularly important aspects about each backend:
763 * - a) Whether it is fully qualified or wiki-relative.
764 * By default, the paths of files are relative to the current wiki,
765 * which works via prefixing them with the current wiki ID when accessed.
766 * Setting 'domainId' forces the backend to be fully qualified by prefixing
767 * all paths with the specified value instead. This can be useful if
768 * multiple wikis need to share the same data. Note that 'name' is *not*
769 * part of any prefix and thus should not be relied upon for namespacing.
770 * - b) Whether it is only defined for some wikis or is defined on all
771 * wikis in the wiki farm. Defining a backend globally is useful
772 * if multiple wikis need to share the same data.
773 * One should be aware of these aspects when configuring a backend for use with
774 * any basic feature or plugin. For example, suppose an extension stores data for
775 * different wikis in different directories and sometimes needs to access data from
776 * a foreign wiki's directory in order to render a page on given wiki. The extension
777 * would need a fully qualified backend that is defined on all wikis in the wiki farm.
778 */
779 $wgFileBackends = [];
780
781 /**
782 * Array of configuration arrays for each lock manager.
783 * Each backend configuration has the following parameters:
784 * - name : A unique name for the lock manager
785 * - class : The lock manger class to use
786 *
787 * See LockManager::__construct() for more details.
788 * Additional parameters are specific to the lock manager class used.
789 * These settings should be global to all wikis.
790 */
791 $wgLockManagers = [];
792
793 /**
794 * Show Exif data, on by default if available.
795 * Requires PHP's Exif extension: https://www.php.net/manual/en/ref.exif.php
796 *
797 * @note FOR WINDOWS USERS:
798 * To enable Exif functions, add the following line to the "Windows
799 * extensions" section of php.ini:
800 * @code{.ini}
801 * extension=extensions/php_exif.dll
802 * @endcode
803 */
804 $wgShowEXIF = function_exists( 'exif_read_data' );
805
806 /**
807 * If to automatically update the img_metadata field
808 * if the metadata field is outdated but compatible with the current version.
809 * Defaults to false.
810 */
811 $wgUpdateCompatibleMetadata = false;
812
813 /**
814 * Allow for upload to be copied from an URL.
815 * The timeout for copy uploads is set by $wgCopyUploadTimeout.
816 * You have to assign the user right 'upload_by_url' to a user group, to use this.
817 */
818 $wgAllowCopyUploads = false;
819
820 /**
821 * A list of domains copy uploads can come from
822 *
823 * @since 1.20
824 */
825 $wgCopyUploadsDomains = [];
826
827 /**
828 * Enable copy uploads from Special:Upload. $wgAllowCopyUploads must also be
829 * true. If $wgAllowCopyUploads is true, but this is false, you will only be
830 * able to perform copy uploads from the API or extensions (e.g. UploadWizard).
831 */
832 $wgCopyUploadsFromSpecialUpload = false;
833
834 /**
835 * Proxy to use for copy upload requests.
836 * @since 1.20
837 */
838 $wgCopyUploadProxy = false;
839
840 /**
841 * Different timeout for upload by url
842 * This could be useful since when fetching large files, you may want a
843 * timeout longer than the default $wgHTTPTimeout. False means fallback
844 * to default.
845 *
846 * @var int|bool
847 *
848 * @since 1.22
849 */
850 $wgCopyUploadTimeout = false;
851
852 /**
853 * Max size for uploads, in bytes. If not set to an array, applies to all
854 * uploads. If set to an array, per upload type maximums can be set, using the
855 * file and url keys. If the * key is set this value will be used as maximum
856 * for non-specified types.
857 *
858 * @par Example:
859 * @code
860 * $wgMaxUploadSize = [
861 * '*' => 250 * 1024,
862 * 'url' => 500 * 1024,
863 * ];
864 * @endcode
865 * Sets the maximum for all uploads to 250 kB except for upload-by-url, which
866 * will have a maximum of 500 kB.
867 */
868 $wgMaxUploadSize = 1024 * 1024 * 100; # 100MB
869
870 /**
871 * Minimum upload chunk size, in bytes. When using chunked upload, non-final
872 * chunks smaller than this will be rejected. May be reduced based on the
873 * 'upload_max_filesize' or 'post_max_size' PHP settings.
874 * @since 1.26
875 */
876 $wgMinUploadChunkSize = 1024; # 1KB
877
878 /**
879 * Point the upload navigation link to an external URL
880 * Useful if you want to use a shared repository by default
881 * without disabling local uploads (use $wgEnableUploads = false for that).
882 *
883 * @par Example:
884 * @code
885 * $wgUploadNavigationUrl = 'https://commons.wikimedia.org/wiki/Special:Upload';
886 * @endcode
887 */
888 $wgUploadNavigationUrl = false;
889
890 /**
891 * Point the upload link for missing files to an external URL, as with
892 * $wgUploadNavigationUrl. The URL will get "(?|&)wpDestFile=<filename>"
893 * appended to it as appropriate.
894 */
895 $wgUploadMissingFileUrl = false;
896
897 /**
898 * Give a path here to use thumb.php for thumbnail generation on client
899 * request, instead of generating them on render and outputting a static URL.
900 * This is necessary if some of your apache servers don't have read/write
901 * access to the thumbnail path.
902 *
903 * @par Example:
904 * @code
905 * $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
906 * @endcode
907 */
908 $wgThumbnailScriptPath = false;
909
910 /**
911 * Shortcut for the 'thumbScriptUrl' setting of $wgForeignFileRepos.
912 * Only used if $wgUseSharedUploads is enabled.
913 *
914 * @var string
915 * @since 1.3
916 */
917 $wgSharedThumbnailScriptPath = false;
918
919 /**
920 * Set this to false if you do not want MediaWiki to divide your images
921 * directory into many subdirectories, for improved performance.
922 *
923 * It's almost always good to leave this enabled. In previous versions of
924 * MediaWiki, some users set this to false to allow images to be added to the
925 * wiki by simply copying them into $wgUploadDirectory and then running
926 * maintenance/rebuildImages.php to register them in the database. This is no
927 * longer recommended, use maintenance/importImages.php instead.
928 *
929 * @note That this variable may be ignored if $wgLocalFileRepo is set.
930 * @todo Deprecate the setting and ultimately remove it from Core.
931 */
932 $wgHashedUploadDirectory = true;
933
934 /**
935 * This is the list of preferred extensions for uploading files. Uploading files
936 * with extensions not in this list will trigger a warning.
937 *
938 * @warning If you add any OpenOffice or Microsoft Office file formats here,
939 * such as odt or doc, and untrusted users are allowed to upload files, then
940 * your wiki will be vulnerable to cross-site request forgery (CSRF).
941 */
942 $wgFileExtensions = [ 'png', 'gif', 'jpg', 'jpeg', 'webp' ];
943
944 /**
945 * Files with these extensions will never be allowed as uploads.
946 * An array of file extensions to blacklist. You should append to this array
947 * if you want to blacklist additional files.
948 */
949 $wgFileBlacklist = [
950 # HTML may contain cookie-stealing JavaScript and web bugs
951 'html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht',
952 # PHP scripts may execute arbitrary code on the server
953 'php', 'phtml', 'php3', 'php4', 'php5', 'phps', 'phar',
954 # Other types that may be interpreted by some servers
955 'shtml', 'jhtml', 'pl', 'py', 'cgi',
956 # May contain harmful executables for Windows victims
957 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' ];
958
959 /**
960 * Files with these MIME types will never be allowed as uploads
961 * if $wgVerifyMimeType is enabled.
962 */
963 $wgMimeTypeBlacklist = [
964 # HTML may contain cookie-stealing JavaScript and web bugs
965 'text/html', 'text/javascript', 'text/x-javascript', 'application/x-shellscript',
966 # PHP scripts may execute arbitrary code on the server
967 'application/x-php', 'text/x-php',
968 # Other types that may be interpreted by some servers
969 'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh',
970 # Client-side hazards on Internet Explorer
971 'text/scriptlet', 'application/x-msdownload',
972 # Windows metafile, client-side vulnerability on some systems
973 'application/x-msmetafile',
974 ];
975
976 /**
977 * Allow Java archive uploads.
978 * This is not recommended for public wikis since a maliciously-constructed
979 * applet running on the same domain as the wiki can steal the user's cookies.
980 */
981 $wgAllowJavaUploads = false;
982
983 /**
984 * This is a flag to determine whether or not to check file extensions on upload.
985 *
986 * @warning Setting this to false is insecure for public wikis.
987 */
988 $wgCheckFileExtensions = true;
989
990 /**
991 * If this is turned off, users may override the warning for files not covered
992 * by $wgFileExtensions.
993 *
994 * @warning Setting this to false is insecure for public wikis.
995 */
996 $wgStrictFileExtensions = true;
997
998 /**
999 * Setting this to true will disable the upload system's checks for HTML/JavaScript.
1000 *
1001 * @warning THIS IS VERY DANGEROUS on a publicly editable site, so USE
1002 * $wgGroupPermissions TO RESTRICT UPLOADING to only those that you trust
1003 */
1004 $wgDisableUploadScriptChecks = false;
1005
1006 /**
1007 * Warn if uploaded files are larger than this (in bytes), or false to disable
1008 */
1009 $wgUploadSizeWarning = false;
1010
1011 /**
1012 * list of trusted media-types and MIME types.
1013 * Use the MEDIATYPE_xxx constants to represent media types.
1014 * This list is used by File::isSafeFile
1015 *
1016 * Types not listed here will have a warning about unsafe content
1017 * displayed on the images description page. It would also be possible
1018 * to use this for further restrictions, like disabling direct
1019 * [[media:...]] links for non-trusted formats.
1020 */
1021 $wgTrustedMediaFormats = [
1022 MEDIATYPE_BITMAP, // all bitmap formats
1023 MEDIATYPE_AUDIO, // all audio formats
1024 MEDIATYPE_VIDEO, // all plain video formats
1025 "image/svg+xml", // svg (only needed if inline rendering of svg is not supported)
1026 "application/pdf", // PDF files
1027 # "application/x-shockwave-flash", //flash/shockwave movie
1028 ];
1029
1030 /**
1031 * Plugins for media file type handling.
1032 * Each entry in the array maps a MIME type to a class name
1033 *
1034 * Core media handlers are listed in MediaHandlerFactory,
1035 * and extensions should use extension.json.
1036 */
1037 $wgMediaHandlers = [];
1038
1039 /**
1040 * Media handler overrides for parser tests (they don't need to generate actual
1041 * thumbnails, so a mock will do)
1042 */
1043 $wgParserTestMediaHandlers = [
1044 'image/jpeg' => 'MockBitmapHandler',
1045 'image/png' => 'MockBitmapHandler',
1046 'image/gif' => 'MockBitmapHandler',
1047 'image/tiff' => 'MockBitmapHandler',
1048 'image/webp' => 'MockBitmapHandler',
1049 'image/x-ms-bmp' => 'MockBitmapHandler',
1050 'image/x-bmp' => 'MockBitmapHandler',
1051 'image/x-xcf' => 'MockBitmapHandler',
1052 'image/svg+xml' => 'MockSvgHandler',
1053 'image/vnd.djvu' => 'MockDjVuHandler',
1054 ];
1055
1056 /**
1057 * Plugins for page content model handling.
1058 * Each entry in the array maps a model id to a class name or callback
1059 * that creates an instance of the appropriate ContentHandler subclass.
1060 *
1061 * @since 1.21
1062 */
1063 $wgContentHandlers = [
1064 // the usual case
1065 CONTENT_MODEL_WIKITEXT => WikitextContentHandler::class,
1066 // dumb version, no syntax highlighting
1067 CONTENT_MODEL_JAVASCRIPT => JavaScriptContentHandler::class,
1068 // simple implementation, for use by extensions, etc.
1069 CONTENT_MODEL_JSON => JsonContentHandler::class,
1070 // dumb version, no syntax highlighting
1071 CONTENT_MODEL_CSS => CssContentHandler::class,
1072 // plain text, for use by extensions, etc.
1073 CONTENT_MODEL_TEXT => TextContentHandler::class,
1074 ];
1075
1076 /**
1077 * Whether to enable server-side image thumbnailing. If false, images will
1078 * always be sent to the client in full resolution, with appropriate width= and
1079 * height= attributes on the <img> tag for the client to do its own scaling.
1080 */
1081 $wgUseImageResize = true;
1082
1083 /**
1084 * Resizing can be done using PHP's internal image libraries or using
1085 * ImageMagick or another third-party converter, e.g. GraphicMagick.
1086 * These support more file formats than PHP, which only supports PNG,
1087 * GIF, JPG, XBM and WBMP.
1088 *
1089 * Use Image Magick instead of PHP builtin functions.
1090 */
1091 $wgUseImageMagick = false;
1092
1093 /**
1094 * The convert command shipped with ImageMagick
1095 */
1096 $wgImageMagickConvertCommand = '/usr/bin/convert';
1097
1098 /**
1099 * Array of max pixel areas for interlacing per MIME type
1100 * @since 1.27
1101 */
1102 $wgMaxInterlacingAreas = [];
1103
1104 /**
1105 * Sharpening parameter to ImageMagick
1106 */
1107 $wgSharpenParameter = '0x0.4';
1108
1109 /**
1110 * Reduction in linear dimensions below which sharpening will be enabled
1111 */
1112 $wgSharpenReductionThreshold = 0.85;
1113
1114 /**
1115 * Temporary directory used for ImageMagick. The directory must exist. Leave
1116 * this set to false to let ImageMagick decide for itself.
1117 */
1118 $wgImageMagickTempDir = false;
1119
1120 /**
1121 * Use another resizing converter, e.g. GraphicMagick
1122 * %s will be replaced with the source path, %d with the destination
1123 * %w and %h will be replaced with the width and height.
1124 *
1125 * @par Example for GraphicMagick:
1126 * @code
1127 * $wgCustomConvertCommand = "gm convert %s -resize %wx%h %d"
1128 * @endcode
1129 *
1130 * Leave as false to skip this.
1131 */
1132 $wgCustomConvertCommand = false;
1133
1134 /**
1135 * used for lossless jpeg rotation
1136 *
1137 * @since 1.21
1138 */
1139 $wgJpegTran = '/usr/bin/jpegtran';
1140
1141 /**
1142 * At default setting of 'yuv420', JPEG thumbnails will use 4:2:0 chroma
1143 * subsampling to reduce file size, at the cost of possible color fringing
1144 * at sharp edges.
1145 *
1146 * See https://en.wikipedia.org/wiki/Chroma_subsampling
1147 *
1148 * Supported values:
1149 * false - use scaling system's default (same as pre-1.27 behavior)
1150 * 'yuv444' - luma and chroma at same resolution
1151 * 'yuv422' - chroma at 1/2 resolution horizontally, full vertically
1152 * 'yuv420' - chroma at 1/2 resolution in both dimensions
1153 *
1154 * This setting is currently supported only for the ImageMagick backend;
1155 * others may default to 4:2:0 or 4:4:4 or maintaining the source file's
1156 * sampling in the thumbnail.
1157 *
1158 * @since 1.27
1159 */
1160 $wgJpegPixelFormat = 'yuv420';
1161
1162 /**
1163 * When scaling a JPEG thumbnail, this is the quality we request
1164 * from the backend. It should be an int between 1 and 100,
1165 * with 100 indicating 100% quality.
1166 *
1167 * @since 1.32
1168 */
1169 $wgJpegQuality = 80;
1170
1171 /**
1172 * Some tests and extensions use exiv2 to manipulate the Exif metadata in some
1173 * image formats.
1174 */
1175 $wgExiv2Command = '/usr/bin/exiv2';
1176
1177 /**
1178 * Path to exiftool binary. Used for lossless ICC profile swapping.
1179 *
1180 * @since 1.26
1181 */
1182 $wgExiftool = '/usr/bin/exiftool';
1183
1184 /**
1185 * Scalable Vector Graphics (SVG) may be uploaded as images.
1186 * Since SVG support is not yet standard in browsers, it is
1187 * necessary to rasterize SVGs to PNG as a fallback format.
1188 *
1189 * An external program is required to perform this conversion.
1190 * If set to an array, the first item is a PHP callable and any further items
1191 * are passed as parameters after $srcPath, $dstPath, $width, $height
1192 */
1193 $wgSVGConverters = [
1194 'ImageMagick' =>
1195 '$path/convert -background "#ffffff00" -thumbnail $widthx$height\! $input PNG:$output',
1196 'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
1197 'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
1198 'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d '
1199 . '$output $input',
1200 'rsvg' => '$path/rsvg-convert -w $width -h $height -o $output $input',
1201 'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
1202 'ImagickExt' => [ 'SvgHandler::rasterizeImagickExt' ],
1203 ];
1204
1205 /**
1206 * Pick a converter defined in $wgSVGConverters
1207 */
1208 $wgSVGConverter = 'ImageMagick';
1209
1210 /**
1211 * If not in the executable PATH, specify the SVG converter path.
1212 */
1213 $wgSVGConverterPath = '';
1214
1215 /**
1216 * Don't scale a SVG larger than this
1217 */
1218 $wgSVGMaxSize = 5120;
1219
1220 /**
1221 * Don't read SVG metadata beyond this point.
1222 * Default is 1024*256 bytes
1223 */
1224 $wgSVGMetadataCutoff = 262144;
1225
1226 /**
1227 * Obsolete, no longer used.
1228 * SVG file uploads now always allow <title> elements.
1229 *
1230 * @deprecated 1.34
1231 */
1232 $wgAllowTitlesInSVG = true;
1233
1234 /**
1235 * Whether thumbnails should be generated in target language (usually, same as
1236 * page language), if available.
1237 * Currently, applies only to SVG images that use the systemLanguage attribute
1238 * to specify text language.
1239 *
1240 * @since 1.33
1241 */
1242 $wgMediaInTargetLanguage = true;
1243
1244 /**
1245 * The maximum number of pixels a source image can have if it is to be scaled
1246 * down by a scaler that requires the full source image to be decompressed
1247 * and stored in decompressed form, before the thumbnail is generated.
1248 *
1249 * This provides a limit on memory usage for the decompression side of the
1250 * image scaler. The limit is used when scaling PNGs with any of the
1251 * built-in image scalers, such as ImageMagick or GD. It is ignored for
1252 * JPEGs with ImageMagick, and when using the VipsScaler extension.
1253 *
1254 * The default is 50 MB if decompressed to RGBA form, which corresponds to
1255 * 12.5 million pixels or 3500x3500.
1256 */
1257 $wgMaxImageArea = 1.25e7;
1258
1259 /**
1260 * Force thumbnailing of animated GIFs above this size to a single
1261 * frame instead of an animated thumbnail. As of MW 1.17 this limit
1262 * is checked against the total size of all frames in the animation.
1263 * It probably makes sense to keep this equal to $wgMaxImageArea.
1264 */
1265 $wgMaxAnimatedGifArea = 1.25e7;
1266
1267 /**
1268 * Browsers don't support TIFF inline generally...
1269 * For inline display, we need to convert to PNG or JPEG.
1270 * Note scaling should work with ImageMagick, but may not with GD scaling.
1271 *
1272 * @par Example:
1273 * @code
1274 * // PNG is lossless, but inefficient for photos
1275 * $wgTiffThumbnailType = [ 'png', 'image/png' ];
1276 * // JPEG is good for photos, but has no transparency support. Bad for diagrams.
1277 * $wgTiffThumbnailType = [ 'jpg', 'image/jpeg' ];
1278 * @endcode
1279 */
1280 $wgTiffThumbnailType = [];
1281
1282 /**
1283 * If rendered thumbnail files are older than this timestamp, they
1284 * will be rerendered on demand as if the file didn't already exist.
1285 * Update if there is some need to force thumbs and SVG rasterizations
1286 * to rerender, such as fixes to rendering bugs.
1287 */
1288 $wgThumbnailEpoch = '20030516000000';
1289
1290 /**
1291 * Certain operations are avoided if there were too many recent failures,
1292 * for example, thumbnail generation. Bump this value to invalidate all
1293 * memory of failed operations and thus allow further attempts to resume.
1294 * This is useful when a cause for the failures has been found and fixed.
1295 */
1296 $wgAttemptFailureEpoch = 1;
1297
1298 /**
1299 * If set, inline scaled images will still produce "<img>" tags ready for
1300 * output instead of showing an error message.
1301 *
1302 * This may be useful if errors are transitory, especially if the site
1303 * is configured to automatically render thumbnails on request.
1304 *
1305 * On the other hand, it may obscure error conditions from debugging.
1306 * Enable the debug log or the 'thumbnail' log group to make sure errors
1307 * are logged to a file for review.
1308 */
1309 $wgIgnoreImageErrors = false;
1310
1311 /**
1312 * Allow thumbnail rendering on page view. If this is false, a valid
1313 * thumbnail URL is still output, but no file will be created at
1314 * the target location. This may save some time if you have a
1315 * thumb.php or 404 handler set up which is faster than the regular
1316 * webserver(s).
1317 */
1318 $wgGenerateThumbnailOnParse = true;
1319
1320 /**
1321 * Show thumbnails for old images on the image description page
1322 */
1323 $wgShowArchiveThumbnails = true;
1324
1325 /**
1326 * If set to true, images that contain certain the exif orientation tag will
1327 * be rotated accordingly. If set to null, try to auto-detect whether a scaler
1328 * is available that can rotate.
1329 */
1330 $wgEnableAutoRotation = null;
1331
1332 /**
1333 * Internal name of virus scanner. This serves as a key to the
1334 * $wgAntivirusSetup array. Set this to NULL to disable virus scanning. If not
1335 * null, every file uploaded will be scanned for viruses.
1336 */
1337 $wgAntivirus = null;
1338
1339 /**
1340 * Configuration for different virus scanners. This an associative array of
1341 * associative arrays. It contains one setup array per known scanner type.
1342 * The entry is selected by $wgAntivirus, i.e.
1343 * valid values for $wgAntivirus are the keys defined in this array.
1344 *
1345 * The configuration array for each scanner contains the following keys:
1346 * "command", "codemap", "messagepattern":
1347 *
1348 * "command" is the full command to call the virus scanner - %f will be
1349 * replaced with the name of the file to scan. If not present, the filename
1350 * will be appended to the command. Note that this must be overwritten if the
1351 * scanner is not in the system path; in that case, please set
1352 * $wgAntivirusSetup[$wgAntivirus]['command'] to the desired command with full
1353 * path.
1354 *
1355 * "codemap" is a mapping of exit code to return codes of the detectVirus
1356 * function in SpecialUpload.
1357 * - An exit code mapped to AV_SCAN_FAILED causes the function to consider
1358 * the scan to be failed. This will pass the file if $wgAntivirusRequired
1359 * is not set.
1360 * - An exit code mapped to AV_SCAN_ABORTED causes the function to consider
1361 * the file to have an unsupported format, which is probably immune to
1362 * viruses. This causes the file to pass.
1363 * - An exit code mapped to AV_NO_VIRUS will cause the file to pass, meaning
1364 * no virus was found.
1365 * - All other codes (like AV_VIRUS_FOUND) will cause the function to report
1366 * a virus.
1367 * - You may use "*" as a key in the array to catch all exit codes not mapped otherwise.
1368 *
1369 * "messagepattern" is a perl regular expression to extract the meaningful part of the scanners
1370 * output. The relevant part should be matched as group one (\1).
1371 * If not defined or the pattern does not match, the full message is shown to the user.
1372 */
1373 $wgAntivirusSetup = [
1374
1375 # setup for clamav
1376 'clamav' => [
1377 'command' => 'clamscan --no-summary ',
1378 'codemap' => [
1379 "0" => AV_NO_VIRUS, # no virus
1380 "1" => AV_VIRUS_FOUND, # virus found
1381 "52" => AV_SCAN_ABORTED, # unsupported file format (probably immune)
1382 "*" => AV_SCAN_FAILED, # else scan failed
1383 ],
1384 'messagepattern' => '/.*?:(.*)/sim',
1385 ],
1386 ];
1387
1388 /**
1389 * Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected.
1390 */
1391 $wgAntivirusRequired = true;
1392
1393 /**
1394 * Determines if the MIME type of uploaded files should be checked
1395 */
1396 $wgVerifyMimeType = true;
1397
1398 /**
1399 * Determines whether extra checks for IE type detection should be applied.
1400 * This is a conservative check for exactly what IE 6 or so checked for,
1401 * and shouldn't trigger on for instance JPEG files containing links in EXIF
1402 * metadata.
1403 *
1404 * @since 1.34
1405 */
1406 $wgVerifyMimeTypeIE = true;
1407
1408 /**
1409 * Sets the MIME type definition file to use by includes/libs/mime/MimeAnalyzer.php.
1410 * Set to null, to use built-in defaults only.
1411 * example: $wgMimeTypeFile = '/etc/mime.types';
1412 */
1413 $wgMimeTypeFile = 'includes/mime.types';
1414
1415 /**
1416 * Sets the MIME type info file to use by includes/libs/mime/MimeAnalyzer.php.
1417 * Set to null, to use built-in defaults only.
1418 */
1419 $wgMimeInfoFile = 'includes/mime.info';
1420
1421 /**
1422 * Sets an external MIME detector program. The command must print only
1423 * the MIME type to standard output.
1424 * The name of the file to process will be appended to the command given here.
1425 * If not set or NULL, PHP's mime_content_type function will be used.
1426 *
1427 * @par Example:
1428 * @code
1429 * #$wgMimeDetectorCommand = "file -bi"; # use external MIME detector (Linux)
1430 * @endcode
1431 */
1432 $wgMimeDetectorCommand = null;
1433
1434 /**
1435 * Switch for trivial MIME detection. Used by thumb.php to disable all fancy
1436 * things, because only a few types of images are needed and file extensions
1437 * can be trusted.
1438 */
1439 $wgTrivialMimeDetection = false;
1440
1441 /**
1442 * Additional XML types we can allow via MIME-detection.
1443 * array = [ 'rootElement' => 'associatedMimeType' ]
1444 */
1445 $wgXMLMimeTypes = [
1446 'http://www.w3.org/2000/svg:svg' => 'image/svg+xml',
1447 'svg' => 'image/svg+xml',
1448 'http://www.lysator.liu.se/~alla/dia/:diagram' => 'application/x-dia-diagram',
1449 'http://www.w3.org/1999/xhtml:html' => 'text/html', // application/xhtml+xml?
1450 'html' => 'text/html', // application/xhtml+xml?
1451 ];
1452
1453 /**
1454 * Limit images on image description pages to a user-selectable limit. In order
1455 * to reduce disk usage, limits can only be selected from a list.
1456 * The user preference is saved as an array offset in the database, by default
1457 * the offset is set with $wgDefaultUserOptions['imagesize']. Make sure you
1458 * change it if you alter the array (see T10858).
1459 * This is the list of settings the user can choose from:
1460 */
1461 $wgImageLimits = [
1462 [ 320, 240 ],
1463 [ 640, 480 ],
1464 [ 800, 600 ],
1465 [ 1024, 768 ],
1466 [ 1280, 1024 ]
1467 ];
1468
1469 /**
1470 * Adjust thumbnails on image pages according to a user setting. In order to
1471 * reduce disk usage, the values can only be selected from a list. This is the
1472 * list of settings the user can choose from:
1473 */
1474 $wgThumbLimits = [
1475 120,
1476 150,
1477 180,
1478 200,
1479 250,
1480 300
1481 ];
1482
1483 /**
1484 * When defined, is an array of image widths used as buckets for thumbnail generation.
1485 * The goal is to save resources by generating thumbnails based on reference buckets instead of
1486 * always using the original. This will incur a speed gain but cause a quality loss.
1487 *
1488 * The buckets generation is chained, with each bucket generated based on the above bucket
1489 * when possible. File handlers have to opt into using that feature. For now only BitmapHandler
1490 * supports it.
1491 */
1492 $wgThumbnailBuckets = null;
1493
1494 /**
1495 * When using thumbnail buckets as defined above, this sets the minimum distance to the bucket
1496 * above the requested size. The distance represents how many extra pixels of width the bucket
1497 * needs in order to be used as the reference for a given thumbnail. For example, with the
1498 * following buckets:
1499 *
1500 * $wgThumbnailBuckets = [ 128, 256, 512 ];
1501 *
1502 * and a distance of 50:
1503 *
1504 * $wgThumbnailMinimumBucketDistance = 50;
1505 *
1506 * If we want to render a thumbnail of width 220px, the 512px bucket will be used,
1507 * because 220 + 50 = 270 and the closest bucket bigger than 270px is 512.
1508 */
1509 $wgThumbnailMinimumBucketDistance = 50;
1510
1511 /**
1512 * When defined, is an array of thumbnail widths to be rendered at upload time. The idea is to
1513 * prerender common thumbnail sizes, in order to avoid the necessity to render them on demand, which
1514 * has a performance impact for the first client to view a certain size.
1515 *
1516 * This obviously means that more disk space is needed per upload upfront.
1517 *
1518 * @since 1.25
1519 */
1520
1521 $wgUploadThumbnailRenderMap = [];
1522
1523 /**
1524 * The method through which the thumbnails will be prerendered for the entries in
1525 * $wgUploadThumbnailRenderMap
1526 *
1527 * The method can be either "http" or "jobqueue". The former uses an http request to hit the
1528 * thumbnail's URL.
1529 * This method only works if thumbnails are configured to be rendered by a 404 handler. The latter
1530 * option uses the job queue to render the thumbnail.
1531 *
1532 * @since 1.25
1533 */
1534 $wgUploadThumbnailRenderMethod = 'jobqueue';
1535
1536 /**
1537 * When using the "http" wgUploadThumbnailRenderMethod, lets one specify a custom Host HTTP header.
1538 *
1539 * @since 1.25
1540 */
1541 $wgUploadThumbnailRenderHttpCustomHost = false;
1542
1543 /**
1544 * When using the "http" wgUploadThumbnailRenderMethod, lets one specify a custom domain to send the
1545 * HTTP request to.
1546 *
1547 * @since 1.25
1548 */
1549 $wgUploadThumbnailRenderHttpCustomDomain = false;
1550
1551 /**
1552 * When this variable is true and JPGs use the sRGB ICC profile, swaps it for the more lightweight
1553 * (and free) TinyRGB profile when generating thumbnails.
1554 *
1555 * @since 1.26
1556 */
1557 $wgUseTinyRGBForJPGThumbnails = false;
1558
1559 /**
1560 * Parameters for the "<gallery>" tag.
1561 * Fields are:
1562 * - imagesPerRow: Default number of images per-row in the gallery. 0 -> Adapt to screensize
1563 * - imageWidth: Width of the cells containing images in galleries (in "px")
1564 * - imageHeight: Height of the cells containing images in galleries (in "px")
1565 * - captionLength: Length to truncate filename to in caption when using "showfilename".
1566 * A value of 'true' will truncate the filename to one line using CSS
1567 * and will be the behaviour after deprecation.
1568 * @deprecated since 1.28
1569 * - showBytes: Show the filesize in bytes in categories
1570 * - showDimensions: Show the dimensions (width x height) in categories
1571 * - mode: Gallery mode
1572 */
1573 $wgGalleryOptions = [];
1574
1575 /**
1576 * Adjust width of upright images when parameter 'upright' is used
1577 * This allows a nicer look for upright images without the need to fix the width
1578 * by hardcoded px in wiki sourcecode.
1579 */
1580 $wgThumbUpright = 0.75;
1581
1582 /**
1583 * Default value for chmoding of new directories.
1584 */
1585 $wgDirectoryMode = 0777;
1586
1587 /**
1588 * Generate and use thumbnails suitable for screens with 1.5 and 2.0 pixel densities.
1589 *
1590 * This means a 320x240 use of an image on the wiki will also generate 480x360 and 640x480
1591 * thumbnails, output via the srcset attribute.
1592 */
1593 $wgResponsiveImages = true;
1594
1595 /**
1596 * @name DJVU settings
1597 * @{
1598 */
1599
1600 /**
1601 * Path of the djvudump executable
1602 * Enable this and $wgDjvuRenderer to enable djvu rendering
1603 * example: $wgDjvuDump = 'djvudump';
1604 */
1605 $wgDjvuDump = null;
1606
1607 /**
1608 * Path of the ddjvu DJVU renderer
1609 * Enable this and $wgDjvuDump to enable djvu rendering
1610 * example: $wgDjvuRenderer = 'ddjvu';
1611 */
1612 $wgDjvuRenderer = null;
1613
1614 /**
1615 * Path of the djvutxt DJVU text extraction utility
1616 * Enable this and $wgDjvuDump to enable text layer extraction from djvu files
1617 * example: $wgDjvuTxt = 'djvutxt';
1618 */
1619 $wgDjvuTxt = null;
1620
1621 /**
1622 * Path of the djvutoxml executable
1623 * This works like djvudump except much, much slower as of version 3.5.
1624 *
1625 * For now we recommend you use djvudump instead. The djvuxml output is
1626 * probably more stable, so we'll switch back to it as soon as they fix
1627 * the efficiency problem.
1628 * https://sourceforge.net/tracker/index.php?func=detail&aid=1704049&group_id=32953&atid=406583
1629 *
1630 * @par Example:
1631 * @code
1632 * $wgDjvuToXML = 'djvutoxml';
1633 * @endcode
1634 */
1635 $wgDjvuToXML = null;
1636
1637 /**
1638 * Shell command for the DJVU post processor
1639 * Default: pnmtojpeg, since ddjvu generates ppm output
1640 * Set this to false to output the ppm file directly.
1641 */
1642 $wgDjvuPostProcessor = 'pnmtojpeg';
1643
1644 /**
1645 * File extension for the DJVU post processor output
1646 */
1647 $wgDjvuOutputExtension = 'jpg';
1648
1649 /** @} */ # end of DJvu }
1650
1651 /** @} */ # end of file uploads }
1652
1653 /************************************************************************//**
1654 * @name Email settings
1655 * @{
1656 */
1657
1658 /**
1659 * Site admin email address.
1660 *
1661 * Defaults to "wikiadmin@$wgServerName" (in Setup.php).
1662 */
1663 $wgEmergencyContact = false;
1664
1665 /**
1666 * Sender email address for e-mail notifications.
1667 *
1668 * The address we use as sender when a user requests a password reminder,
1669 * as well as other e-mail notifications.
1670 *
1671 * Defaults to "apache@$wgServerName" (in Setup.php).
1672 */
1673 $wgPasswordSender = false;
1674
1675 /**
1676 * Reply-To address for e-mail notifications.
1677 *
1678 * Defaults to $wgPasswordSender (in Setup.php).
1679 */
1680 $wgNoReplyAddress = false;
1681
1682 /**
1683 * Set to true to enable the e-mail basic features:
1684 * Password reminders, etc. If sending e-mail on your
1685 * server doesn't work, you might want to disable this.
1686 */
1687 $wgEnableEmail = true;
1688
1689 /**
1690 * Set to true to enable user-to-user e-mail.
1691 * This can potentially be abused, as it's hard to track.
1692 */
1693 $wgEnableUserEmail = true;
1694
1695 /**
1696 * Set to true to enable the Special Mute page. This allows users
1697 * to mute unwanted communications from other users, and is linked
1698 * to from emails originating from Special:Email.
1699 *
1700 * @since 1.34
1701 * @deprecated 1.34
1702 */
1703 $wgEnableSpecialMute = false;
1704
1705 /**
1706 * Set to true to enable user-to-user e-mail blacklist.
1707 *
1708 * @since 1.30
1709 */
1710 $wgEnableUserEmailBlacklist = false;
1711
1712 /**
1713 * If true put the sending user's email in a Reply-To header
1714 * instead of From (false). ($wgPasswordSender will be used as From.)
1715 *
1716 * Some mailers (eg SMTP) set the SMTP envelope sender to the From value,
1717 * which can cause problems with SPF validation and leak recipient addresses
1718 * when bounces are sent to the sender. In addition, DMARC restrictions
1719 * can cause emails to fail to be received when false.
1720 */
1721 $wgUserEmailUseReplyTo = true;
1722
1723 /**
1724 * Minimum time, in hours, which must elapse between password reminder
1725 * emails for a given account. This is to prevent abuse by mail flooding.
1726 */
1727 $wgPasswordReminderResendTime = 24;
1728
1729 /**
1730 * The time, in seconds, when an emailed temporary password expires.
1731 */
1732 $wgNewPasswordExpiry = 3600 * 24 * 7;
1733
1734 /**
1735 * The time, in seconds, when an email confirmation email expires
1736 */
1737 $wgUserEmailConfirmationTokenExpiry = 7 * 24 * 60 * 60;
1738
1739 /**
1740 * The number of days that a user's password is good for. After this number of days, the
1741 * user will be asked to reset their password. Set to false to disable password expiration.
1742 */
1743 $wgPasswordExpirationDays = false;
1744
1745 /**
1746 * If a user's password is expired, the number of seconds when they can still login,
1747 * and cancel their password change, but are sent to the password change form on each login.
1748 */
1749 $wgPasswordExpireGrace = 3600 * 24 * 7; // 7 days
1750
1751 /**
1752 * SMTP Mode.
1753 *
1754 * For using a direct (authenticated) SMTP server connection.
1755 * Default to false or fill an array :
1756 *
1757 * @code
1758 * $wgSMTP = [
1759 * 'host' => 'SMTP domain',
1760 * 'IDHost' => 'domain for MessageID',
1761 * 'port' => '25',
1762 * 'auth' => [true|false],
1763 * 'username' => [SMTP username],
1764 * 'password' => [SMTP password],
1765 * ];
1766 * @endcode
1767 */
1768 $wgSMTP = false;
1769
1770 /**
1771 * Additional email parameters, will be passed as the last argument to mail() call.
1772 */
1773 $wgAdditionalMailParams = null;
1774
1775 /**
1776 * For parts of the system that have been updated to provide HTML email content, send
1777 * both text and HTML parts as the body of the email
1778 */
1779 $wgAllowHTMLEmail = false;
1780
1781 /**
1782 * Allow sending of e-mail notifications with the editor's address as sender.
1783 *
1784 * This setting depends on $wgEnotifRevealEditorAddress also being enabled.
1785 * If both are enabled, notifications for actions from users that have opted-in,
1786 * will be sent to other users with their address as "From" instead of "Reply-To".
1787 *
1788 * If disabled, or not opted-in, notifications come from $wgPasswordSender.
1789 *
1790 * @var bool
1791 */
1792 $wgEnotifFromEditor = false;
1793
1794 // TODO move UPO to preferences probably ?
1795 # If set to true, users get a corresponding option in their preferences and can choose to
1796 # enable or disable at their discretion
1797 # If set to false, the corresponding input form on the user preference page is suppressed
1798 # It call this to be a "user-preferences-option (UPO)"
1799
1800 /**
1801 * Require email authentication before sending mail to an email address.
1802 * This is highly recommended. It prevents MediaWiki from being used as an open
1803 * spam relay.
1804 */
1805 $wgEmailAuthentication = true;
1806
1807 /**
1808 * Allow users to enable email notification ("enotif") on watchlist changes.
1809 */
1810 $wgEnotifWatchlist = false;
1811
1812 /**
1813 * Allow users to enable email notification ("enotif") when someone edits their
1814 * user talk page.
1815 *
1816 * The owner of the user talk page must also have the 'enotifusertalkpages' user
1817 * preference set to true.
1818 */
1819 $wgEnotifUserTalk = false;
1820
1821 /**
1822 * Allow sending of e-mail notifications with the editor's address in "Reply-To".
1823 *
1824 * Note, enabling this only actually uses it in notification e-mails if the user
1825 * opted-in to this feature. This feature flag also controls visibility of the
1826 * 'enotifrevealaddr' preference, which, if users opt into, will make e-mail
1827 * notifications about their actions use their address as "Reply-To".
1828 *
1829 * To set the address as "From" instead of "Reply-To", also enable $wgEnotifFromEditor.
1830 *
1831 * If disabled, or not opted-in, notifications come from $wgPasswordSender.
1832 *
1833 * @var bool
1834 */
1835 $wgEnotifRevealEditorAddress = false;
1836
1837 /**
1838 * Potentially send notification mails on minor edits to pages. This is enabled
1839 * by default. If this is false, users will never be notified on minor edits.
1840 *
1841 * If it is true, editors with the 'nominornewtalk' right (typically bots) will still not
1842 * trigger notifications for minor edits they make (to any page, not just user talk).
1843 *
1844 * Finally, if the watcher/recipient has the 'enotifminoredits' user preference set to
1845 * false, they will not receive notifications for minor edits.
1846 *
1847 * User talk notifications are also affected by $wgEnotifMinorEdits, the above settings,
1848 * $wgEnotifUserTalk, and the preference described there.
1849 */
1850 $wgEnotifMinorEdits = true;
1851
1852 /**
1853 * Send a generic mail instead of a personalised mail for each user. This
1854 * always uses UTC as the time zone, and doesn't include the username.
1855 *
1856 * For pages with many users watching, this can significantly reduce mail load.
1857 * Has no effect when using sendmail rather than SMTP.
1858 */
1859 $wgEnotifImpersonal = false;
1860
1861 /**
1862 * Maximum number of users to mail at once when using impersonal mail. Should
1863 * match the limit on your mail server.
1864 */
1865 $wgEnotifMaxRecips = 500;
1866
1867 /**
1868 * Use real name instead of username in e-mail "from" field.
1869 */
1870 $wgEnotifUseRealName = false;
1871
1872 /**
1873 * Array of usernames who will be sent a notification email for every change
1874 * which occurs on a wiki. Users will not be notified of their own changes.
1875 */
1876 $wgUsersNotifiedOnAllChanges = [];
1877
1878 /** @} */ # end of email settings
1879
1880 /************************************************************************//**
1881 * @name Database settings
1882 * @{
1883 */
1884
1885 /**
1886 * Current wiki database name
1887 *
1888 * Should be alphanumeric, without spaces nor hyphens.
1889 * This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain).
1890 *
1891 * This should still be set even if $wgLBFactoryConf is configured.
1892 */
1893 $wgDBname = 'my_wiki';
1894
1895 /**
1896 * Current wiki database schema name
1897 *
1898 * Should be alphanumeric, without spaces nor hyphens.
1899 * This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain).
1900 *
1901 * This should still be set even if $wgLBFactoryConf is configured.
1902 */
1903 $wgDBmwschema = null;
1904
1905 /**
1906 * Current wiki database table name prefix
1907 *
1908 * Should be alphanumeric, without spaces nor hyphens, preferably ending in an underscore.
1909 * This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain).
1910 *
1911 * This should still be set even if $wgLBFactoryConf is configured.
1912 */
1913 $wgDBprefix = '';
1914
1915 /**
1916 * Database host name or IP address
1917 */
1918 $wgDBserver = 'localhost';
1919
1920 /**
1921 * Database port number (for PostgreSQL and Microsoft SQL Server).
1922 */
1923 $wgDBport = 5432;
1924
1925 /**
1926 * Database username
1927 */
1928 $wgDBuser = 'wikiuser';
1929
1930 /**
1931 * Database user's password
1932 */
1933 $wgDBpassword = '';
1934
1935 /**
1936 * Database type
1937 */
1938 $wgDBtype = 'mysql';
1939
1940 /**
1941 * Whether to use SSL in DB connection.
1942 *
1943 * This setting is only used if $wgLBFactoryConf['class'] is set to
1944 * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
1945 * the DBO_SSL flag must be set in the 'flags' option of the database
1946 * connection to achieve the same functionality.
1947 */
1948 $wgDBssl = false;
1949
1950 /**
1951 * Whether to use compression in DB connection.
1952 *
1953 * This setting is only used $wgLBFactoryConf['class'] is set to
1954 * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
1955 * the DBO_COMPRESS flag must be set in the 'flags' option of the database
1956 * connection to achieve the same functionality.
1957 */
1958 $wgDBcompress = false;
1959
1960 /**
1961 * Separate username for maintenance tasks. Leave as null to use the default.
1962 */
1963 $wgDBadminuser = null;
1964
1965 /**
1966 * Separate password for maintenance tasks. Leave as null to use the default.
1967 */
1968 $wgDBadminpassword = null;
1969
1970 /**
1971 * Search type.
1972 * Leave as null to select the default search engine for the
1973 * selected database type (eg SearchMySQL), or set to a class
1974 * name to override to a custom search engine.
1975 */
1976 $wgSearchType = null;
1977
1978 /**
1979 * Alternative search types
1980 * Sometimes you want to support multiple search engines for testing. This
1981 * allows users to select their search engine of choice via url parameters
1982 * to Special:Search and the action=search API. If using this, there's no
1983 * need to add $wgSearchType to it, that is handled automatically.
1984 */
1985 $wgSearchTypeAlternatives = null;
1986
1987 /**
1988 * MySQL table options to use during installation or update
1989 */
1990 $wgDBTableOptions = 'ENGINE=InnoDB, DEFAULT CHARSET=binary';
1991
1992 /**
1993 * SQL Mode - default is turning off all modes, including strict, if set.
1994 * null can be used to skip the setting for performance reasons and assume
1995 * DBA has done his best job.
1996 * String override can be used for some additional fun :-)
1997 */
1998 $wgSQLMode = '';
1999
2000 /**
2001 * Default group to use when getting database connections.
2002 * Will be used as default query group in ILoadBalancer::getConnection.
2003 * @since 1.32
2004 */
2005 $wgDBDefaultGroup = null;
2006
2007 /**
2008 * To override default SQLite data directory ($docroot/../data)
2009 */
2010 $wgSQLiteDataDir = '';
2011
2012 /**
2013 * Shared database for multiple wikis. Commonly used for storing a user table
2014 * for single sign-on. The server for this database must be the same as for the
2015 * main database.
2016 *
2017 * For backwards compatibility the shared prefix is set to the same as the local
2018 * prefix, and the user table is listed in the default list of shared tables.
2019 * The user_properties table is also added so that users will continue to have their
2020 * preferences shared (preferences were stored in the user table prior to 1.16)
2021 *
2022 * $wgSharedTables may be customized with a list of tables to share in the shared
2023 * database. However it is advised to limit what tables you do share as many of
2024 * MediaWiki's tables may have side effects if you try to share them.
2025 *
2026 * $wgSharedPrefix is the table prefix for the shared database. It defaults to
2027 * $wgDBprefix.
2028 *
2029 * $wgSharedSchema is the table schema for the shared database. It defaults to
2030 * $wgDBmwschema.
2031 *
2032 * @deprecated since 1.21 In new code, use the $wiki parameter to LBFactory::getMainLB() to
2033 * access remote databases. Using LBFactory::getMainLB() allows the shared database to
2034 * reside on separate servers to the wiki's own database, with suitable
2035 * configuration of $wgLBFactoryConf.
2036 */
2037 $wgSharedDB = null;
2038
2039 /**
2040 * @see $wgSharedDB
2041 */
2042 $wgSharedPrefix = false;
2043
2044 /**
2045 * @see $wgSharedDB
2046 */
2047 $wgSharedTables = [ 'user', 'user_properties' ];
2048
2049 /**
2050 * @see $wgSharedDB
2051 * @since 1.23
2052 */
2053 $wgSharedSchema = false;
2054
2055 /**
2056 * Database load balancer
2057 * This is a two-dimensional array, an array of server info structures
2058 * Fields are:
2059 * - host: Host name
2060 * - dbname: Default database name
2061 * - user: DB user
2062 * - password: DB password
2063 * - type: DB type
2064 * - driver: DB driver (when there are multiple drivers)
2065 *
2066 * - load: Ratio of DB_REPLICA load, must be >=0, the sum of all loads must be >0.
2067 * If this is zero for any given server, no normal query traffic will be
2068 * sent to it. It will be excluded from lag checks in maintenance scripts.
2069 * The only way it can receive traffic is if groupLoads is used.
2070 *
2071 * - groupLoads: (optional) Array of load ratios, the key is the query group name. A query
2072 * may belong to several groups, the most specific group defined here is used.
2073 *
2074 * - flags: (optional) Bit field of properties:
2075 * - DBO_DEFAULT: Transactionalize web requests and use autocommit otherwise
2076 * - DBO_DEBUG: Equivalent of $wgDebugDumpSql
2077 * - DBO_SSL: Use TLS connection encryption if available
2078 * - DBO_COMPRESS: Use protocol compression with database connections
2079 * - DBO_PERSISTENT: Enables persistent database connections
2080 *
2081 * - max lag: (optional) Maximum replication lag before a replica DB goes out of rotation
2082 * - is static: (optional) Set to true if the dataset is static and no replication is used.
2083 * - cliMode: (optional) Connection handles will not assume that requests are short-lived
2084 * nor that INSERT..SELECT can be rewritten into a buffered SELECT and INSERT.
2085 * This is what DBO_DEFAULT uses to determine when a web request is present.
2086 * [Default: uses value of $wgCommandLineMode]
2087 *
2088 * These and any other user-defined properties will be assigned to the mLBInfo member
2089 * variable of the Database object.
2090 *
2091 * Leave at false to use the single-server variables above. If you set this
2092 * variable, the single-server variables will generally be ignored (except
2093 * perhaps in some command-line scripts).
2094 *
2095 * The first server listed in this array (with key 0) will be the master. The
2096 * rest of the servers will be replica DBs. To prevent writes to your replica DBs due to
2097 * accidental misconfiguration or MediaWiki bugs, set read_only=1 on all your
2098 * replica DBs in my.cnf. You can set read_only mode at runtime using:
2099 *
2100 * @code
2101 * SET @@read_only=1;
2102 * @endcode
2103 *
2104 * Since the effect of writing to a replica DB is so damaging and difficult to clean
2105 * up, we at Wikimedia set read_only=1 in my.cnf on all our DB servers, even
2106 * our masters, and then set read_only=0 on masters at runtime.
2107 */
2108 $wgDBservers = false;
2109
2110 /**
2111 * Load balancer factory configuration
2112 * To set up a multi-master wiki farm, set the class here to something that
2113 * can return a LoadBalancer with an appropriate master on a call to getMainLB().
2114 * The class identified here is responsible for reading $wgDBservers,
2115 * $wgDBserver, etc., so overriding it may cause those globals to be ignored.
2116 *
2117 * The LBFactoryMulti class is provided for this purpose, please see
2118 * includes/db/LBFactoryMulti.php for configuration information.
2119 */
2120 $wgLBFactoryConf = [ 'class' => \Wikimedia\Rdbms\LBFactorySimple::class ];
2121
2122 /**
2123 * After a state-changing request is done by a client, this determines
2124 * how many seconds that client should keep using the master datacenter.
2125 * This avoids unexpected stale or 404 responses due to replication lag.
2126 * @since 1.27
2127 */
2128 $wgDataCenterUpdateStickTTL = 10;
2129
2130 /**
2131 * File to log database errors to
2132 */
2133 $wgDBerrorLog = false;
2134
2135 /**
2136 * Timezone to use in the error log.
2137 * Defaults to the wiki timezone ($wgLocaltimezone).
2138 *
2139 * A list of usable timezones can found at:
2140 * https://www.php.net/manual/en/timezones.php
2141 *
2142 * @par Examples:
2143 * @code
2144 * $wgDBerrorLogTZ = 'UTC';
2145 * $wgDBerrorLogTZ = 'GMT';
2146 * $wgDBerrorLogTZ = 'PST8PDT';
2147 * $wgDBerrorLogTZ = 'Europe/Sweden';
2148 * $wgDBerrorLogTZ = 'CET';
2149 * @endcode
2150 *
2151 * @since 1.20
2152 */
2153 $wgDBerrorLogTZ = false;
2154
2155 /**
2156 * Other wikis on this site, can be administered from a single developer account.
2157 *
2158 * @var string[] List of wiki DB domain IDs; the format of each ID consist of 1-3 hyphen
2159 * delimited alphanumeric components (each with no hyphens nor spaces) of any of the forms:
2160 * - "<DB NAME>-<DB SCHEMA>-<TABLE PREFIX>"
2161 * - "<DB NAME>-<TABLE PREFIX>"
2162 * - "<DB NAME>"
2163 * If hyphens appear in any of the components, then the domain ID parsing may not work
2164 * in all cases and site functionality might be affected. If the schema ($wgDBmwschema)
2165 * is left to the default "mediawiki" for all wikis, then the schema should be omitted
2166 * from these IDs.
2167 */
2168 $wgLocalDatabases = [];
2169
2170 /**
2171 * If lag is higher than $wgSlaveLagWarning, show a warning in some special
2172 * pages (like watchlist). If the lag is higher than $wgSlaveLagCritical,
2173 * show a more obvious warning.
2174 */
2175 $wgSlaveLagWarning = 10;
2176
2177 /**
2178 * @see $wgSlaveLagWarning
2179 */
2180 $wgSlaveLagCritical = 30;
2181
2182 /**
2183 * Use Windows Authentication instead of $wgDBuser / $wgDBpassword for MS SQL Server
2184 */
2185 $wgDBWindowsAuthentication = false;
2186
2187 /** @} */ # End of DB settings }
2188
2189 /************************************************************************//**
2190 * @name Text storage
2191 * @{
2192 */
2193
2194 /**
2195 * We can also compress text stored in the 'text' table. If this is set on, new
2196 * revisions will be compressed on page save if zlib support is available. Any
2197 * compressed revisions will be decompressed on load regardless of this setting,
2198 * but will not be readable at all* if zlib support is not available.
2199 */
2200 $wgCompressRevisions = false;
2201
2202 /**
2203 * External stores allow including content
2204 * from non database sources following URL links.
2205 *
2206 * Short names of ExternalStore classes may be specified in an array here:
2207 * @code
2208 * $wgExternalStores = [ "http","file","custom" ]...
2209 * @endcode
2210 *
2211 * CAUTION: Access to database might lead to code execution
2212 */
2213 $wgExternalStores = [];
2214
2215 /**
2216 * An array of external MySQL servers.
2217 *
2218 * @par Example:
2219 * Create a cluster named 'cluster1' containing three servers:
2220 * @code
2221 * $wgExternalServers = [
2222 * 'cluster1' => <array in the same format as $wgDBservers>
2223 * ];
2224 * @endcode
2225 *
2226 * Used by \Wikimedia\Rdbms\LBFactorySimple, may be ignored if $wgLBFactoryConf is set to
2227 * another class.
2228 */
2229 $wgExternalServers = [];
2230
2231 /**
2232 * The place to put new revisions, false to put them in the local text table.
2233 * Part of a URL, e.g. DB://cluster1
2234 *
2235 * Can be an array instead of a single string, to enable data distribution. Keys
2236 * must be consecutive integers, starting at zero.
2237 *
2238 * @par Example:
2239 * @code
2240 * $wgDefaultExternalStore = [ 'DB://cluster1', 'DB://cluster2' ];
2241 * @endcode
2242 *
2243 * @var array
2244 */
2245 $wgDefaultExternalStore = false;
2246
2247 /**
2248 * Revision text may be cached in $wgMemc to reduce load on external storage
2249 * servers and object extraction overhead for frequently-loaded revisions.
2250 *
2251 * Set to 0 to disable, or number of seconds before cache expiry.
2252 */
2253 $wgRevisionCacheExpiry = 86400 * 7;
2254
2255 /** @} */ # end text storage }
2256
2257 /************************************************************************//**
2258 * @name Performance hacks and limits
2259 * @{
2260 */
2261
2262 /**
2263 * Disable database-intensive features
2264 */
2265 $wgMiserMode = false;
2266
2267 /**
2268 * Disable all query pages if miser mode is on, not just some
2269 */
2270 $wgDisableQueryPages = false;
2271
2272 /**
2273 * Number of rows to cache in 'querycache' table when miser mode is on
2274 */
2275 $wgQueryCacheLimit = 1000;
2276
2277 /**
2278 * Number of links to a page required before it is deemed "wanted"
2279 */
2280 $wgWantedPagesThreshold = 1;
2281
2282 /**
2283 * Enable slow parser functions
2284 */
2285 $wgAllowSlowParserFunctions = false;
2286
2287 /**
2288 * Allow schema updates
2289 */
2290 $wgAllowSchemaUpdates = true;
2291
2292 /**
2293 * Maximum article size in kilobytes
2294 */
2295 $wgMaxArticleSize = 2048;
2296
2297 /**
2298 * The minimum amount of memory that MediaWiki "needs"; MediaWiki will try to
2299 * raise PHP's memory limit if it's below this amount.
2300 */
2301 $wgMemoryLimit = "50M";
2302
2303 /**
2304 * The minimum amount of time that MediaWiki needs for "slow" write request,
2305 * particularly ones with multiple non-atomic writes that *should* be as
2306 * transactional as possible; MediaWiki will call set_time_limit() if needed.
2307 * @since 1.26
2308 */
2309 $wgTransactionalTimeLimit = 120;
2310
2311 /** @} */ # end performance hacks }
2312
2313 /************************************************************************//**
2314 * @name Cache settings
2315 * @{
2316 */
2317
2318 /**
2319 * Directory for caching data in the local filesystem. Should not be accessible
2320 * from the web.
2321 *
2322 * Note: if multiple wikis share the same localisation cache directory, they
2323 * must all have the same set of extensions. You can set a directory just for
2324 * the localisation cache using $wgLocalisationCacheConf['storeDirectory'].
2325 */
2326 $wgCacheDirectory = false;
2327
2328 /**
2329 * Main cache type. This should be a cache with fast access, but it may have
2330 * limited space. By default, it is disabled, since the stock database cache
2331 * is not fast enough to make it worthwhile.
2332 *
2333 * The options are:
2334 *
2335 * - CACHE_ANYTHING: Use anything, as long as it works
2336 * - CACHE_NONE: Do not cache
2337 * - CACHE_DB: Store cache objects in the DB
2338 * - CACHE_MEMCACHED: MemCached, must specify servers in $wgMemCachedServers
2339 * - CACHE_ACCEL: APC, APCU or WinCache
2340 * - (other): A string may be used which identifies a cache
2341 * configuration in $wgObjectCaches.
2342 *
2343 * @see $wgMessageCacheType, $wgParserCacheType
2344 */
2345 $wgMainCacheType = CACHE_NONE;
2346
2347 /**
2348 * The cache type for storing the contents of the MediaWiki namespace. This
2349 * cache is used for a small amount of data which is expensive to regenerate.
2350 *
2351 * For available types see $wgMainCacheType.
2352 */
2353 $wgMessageCacheType = CACHE_ANYTHING;
2354
2355 /**
2356 * The cache type for storing article HTML. This is used to store data which
2357 * is expensive to regenerate, and benefits from having plenty of storage space.
2358 *
2359 * For available types see $wgMainCacheType.
2360 */
2361 $wgParserCacheType = CACHE_ANYTHING;
2362
2363 /**
2364 * The cache type for storing session data.
2365 *
2366 * For available types see $wgMainCacheType.
2367 */
2368 $wgSessionCacheType = CACHE_ANYTHING;
2369
2370 /**
2371 * The cache type for storing language conversion tables,
2372 * which are used when parsing certain text and interface messages.
2373 *
2374 * For available types see $wgMainCacheType.
2375 *
2376 * @since 1.20
2377 */
2378 $wgLanguageConverterCacheType = CACHE_ANYTHING;
2379
2380 /**
2381 * Advanced object cache configuration.
2382 *
2383 * Use this to define the class names and constructor parameters which are used
2384 * for the various cache types. Custom cache types may be defined here and
2385 * referenced from $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType,
2386 * or $wgLanguageConverterCacheType.
2387 *
2388 * The format is an associative array where the key is a cache identifier, and
2389 * the value is an associative array of parameters. The "class" parameter is the
2390 * class name which will be used. Alternatively, a "factory" parameter may be
2391 * given, giving a callable function which will generate a suitable cache object.
2392 */
2393 $wgObjectCaches = [
2394 CACHE_NONE => [ 'class' => EmptyBagOStuff::class, 'reportDupes' => false ],
2395 CACHE_DB => [ 'class' => SqlBagOStuff::class, 'loggroup' => 'SQLBagOStuff' ],
2396
2397 CACHE_ANYTHING => [ 'factory' => 'ObjectCache::newAnything' ],
2398 CACHE_ACCEL => [ 'factory' => 'ObjectCache::getLocalServerInstance' ],
2399 CACHE_MEMCACHED => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
2400
2401 'db-replicated' => [
2402 'class' => ReplicatedBagOStuff::class,
2403 'readFactory' => [
2404 'class' => SqlBagOStuff::class,
2405 'args' => [ [ 'replicaOnly' => true ] ]
2406 ],
2407 'writeFactory' => [
2408 'class' => SqlBagOStuff::class,
2409 'args' => [ [ 'replicaOnly' => false ] ]
2410 ],
2411 'loggroup' => 'SQLBagOStuff',
2412 'reportDupes' => false
2413 ],
2414
2415 'apc' => [ 'class' => APCBagOStuff::class, 'reportDupes' => false ],
2416 'apcu' => [ 'class' => APCUBagOStuff::class, 'reportDupes' => false ],
2417 'wincache' => [ 'class' => WinCacheBagOStuff::class, 'reportDupes' => false ],
2418 'memcached-php' => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
2419 'memcached-pecl' => [ 'class' => MemcachedPeclBagOStuff::class, 'loggroup' => 'memcached' ],
2420 'hash' => [ 'class' => HashBagOStuff::class, 'reportDupes' => false ],
2421 ];
2422
2423 /**
2424 * Main Wide-Area-Network cache type. This should be a cache with fast access,
2425 * but it may have limited space. By default, it is disabled, since the basic stock
2426 * cache is not fast enough to make it worthwhile. For single data-center setups, this can
2427 * simply be pointed to a cache in $wgWANObjectCaches that uses a local $wgObjectCaches
2428 * cache with a relayer of type EventRelayerNull.
2429 *
2430 * The options are:
2431 * - false: Configure the cache using $wgMainCacheType, without using
2432 * a relayer (only matters if there are multiple data-centers)
2433 * - CACHE_NONE: Do not cache
2434 * - (other): A string may be used which identifies a cache
2435 * configuration in $wgWANObjectCaches
2436 * @since 1.26
2437 */
2438 $wgMainWANCache = false;
2439
2440 /**
2441 * Advanced WAN object cache configuration.
2442 *
2443 * Each WAN cache wraps a registered object cache (for the local cluster)
2444 * and it must also be configured to point to a PubSub instance. Subscribers
2445 * must be configured to relay purges to the actual cache servers.
2446 *
2447 * The format is an associative array where the key is a cache identifier, and
2448 * the value is an associative array of parameters. The "cacheId" parameter is
2449 * a cache identifier from $wgObjectCaches. The "loggroup" parameter controls
2450 * where log events are sent.
2451 *
2452 * @since 1.26
2453 */
2454 $wgWANObjectCaches = [
2455 CACHE_NONE => [
2456 'class' => WANObjectCache::class,
2457 'cacheId' => CACHE_NONE
2458 ]
2459 /* Example of a simple single data-center cache:
2460 'memcached-php' => [
2461 'class' => WANObjectCache::class,
2462 'cacheId' => 'memcached-php'
2463 ]
2464 */
2465 ];
2466
2467 /**
2468 * Verify and enforce WAN cache purges using reliable DB sources as streams.
2469 *
2470 * These secondary cache purges are de-duplicated via simple cache mutexes.
2471 * This improves consistency when cache purges are lost, which becomes more likely
2472 * as more cache servers are added or if there are multiple datacenters. Only keys
2473 * related to important mutable content will be checked.
2474 *
2475 * @var bool
2476 * @since 1.29
2477 */
2478 $wgEnableWANCacheReaper = false;
2479
2480 /**
2481 * The object store type of the main stash.
2482 *
2483 * This store should be a very fast storage system optimized for holding lightweight data
2484 * like incrementable hit counters and current user activity. The store should replicate the
2485 * dataset among all data-centers. Any add(), merge(), lock(), and unlock() operations should
2486 * maintain "best effort" linearizability; as long as connectivity is strong, latency is low,
2487 * and there is no eviction pressure prompted by low free space, those operations should be
2488 * linearizable. In terms of PACELC (https://en.wikipedia.org/wiki/PACELC_theorem), the store
2489 * should act as a PA/EL distributed system for these operations. One optimization for these
2490 * operations is to route them to a "primary" data-center (e.g. one that serves HTTP POST) for
2491 * synchronous execution and then replicate to the others asynchronously. This means that at
2492 * least calls to these operations during HTTP POST requests would quickly return.
2493 *
2494 * All other operations, such as get(), set(), delete(), changeTTL(), incr(), and decr(),
2495 * should be synchronous in the local data-center, replicating asynchronously to the others.
2496 * This behavior can be overriden by the use of the WRITE_SYNC and READ_LATEST flags.
2497 *
2498 * The store should *preferably* have eventual consistency to handle network partitions.
2499 *
2500 * Modules that rely on the stash should be prepared for:
2501 * - add(), merge(), lock(), and unlock() to be slower than other write operations,
2502 * at least in "secondary" data-centers (e.g. one that only serves HTTP GET/HEAD)
2503 * - Other write operations to have race conditions accross data-centers
2504 * - Read operations to have race conditions accross data-centers
2505 * - Consistency to be either eventual (with Last-Write-Wins) or just "best effort"
2506 *
2507 * In general, this means avoiding updates during idempotent HTTP requests (GET/HEAD) and
2508 * avoiding assumptions of true linearizability (e.g. accepting anomalies). Modules that need
2509 * these kind of guarantees should use other storage mediums.
2510 *
2511 * The options are:
2512 * - db: Store cache objects in the DB
2513 * - (other): A string may be used which identifies a cache
2514 * configuration in $wgObjectCaches
2515 *
2516 * @since 1.26
2517 */
2518 $wgMainStash = 'db-replicated';
2519
2520 /**
2521 * The expiry time for the parser cache, in seconds.
2522 * The default is 86400 (one day).
2523 */
2524 $wgParserCacheExpireTime = 86400;
2525
2526 /**
2527 * The expiry time to use for session storage, in seconds.
2528 */
2529 $wgObjectCacheSessionExpiry = 3600;
2530
2531 /**
2532 * Whether to use PHP session handling ($_SESSION and session_*() functions)
2533 *
2534 * If the constant MW_NO_SESSION is defined, this is forced to 'disable'.
2535 *
2536 * If the constant MW_NO_SESSION_HANDLER is defined, this is ignored and PHP
2537 * session handling will function independently of SessionHandler.
2538 * SessionHandler and PHP's session handling may attempt to override each
2539 * others' cookies.
2540 *
2541 * @since 1.27
2542 * @var string
2543 * - 'enable': Integrate with PHP's session handling as much as possible.
2544 * - 'warn': Integrate but log warnings if anything changes $_SESSION.
2545 * - 'disable': Throw exceptions if PHP session handling is used.
2546 */
2547 $wgPHPSessionHandling = 'enable';
2548
2549 /**
2550 * Number of internal PBKDF2 iterations to use when deriving session secrets.
2551 *
2552 * @since 1.28
2553 */
2554 $wgSessionPbkdf2Iterations = 10001;
2555
2556 /**
2557 * The list of MemCached servers and port numbers
2558 */
2559 $wgMemCachedServers = [ '127.0.0.1:11211' ];
2560
2561 /**
2562 * Use persistent connections to MemCached, which are shared across multiple
2563 * requests.
2564 */
2565 $wgMemCachedPersistent = false;
2566
2567 /**
2568 * Read/write timeout for MemCached server communication, in microseconds.
2569 */
2570 $wgMemCachedTimeout = 500000;
2571
2572 /**
2573 * Set this to true to maintain a copy of the message cache on the local server.
2574 *
2575 * This layer of message cache is in addition to the one configured by $wgMessageCacheType.
2576 *
2577 * The local copy is put in APC. If APC is not installed, this setting does nothing.
2578 *
2579 * Note that this is about the message cache, which stores interface messages
2580 * maintained as wiki pages. This is separate from the localisation cache for interface
2581 * messages provided by the software, which is configured by $wgLocalisationCacheConf.
2582 */
2583 $wgUseLocalMessageCache = false;
2584
2585 /**
2586 * Instead of caching everything, only cache those messages which have
2587 * been customised in the site content language. This means that
2588 * MediaWiki:Foo/ja is ignored if MediaWiki:Foo doesn't exist.
2589 * This option is probably only useful for translatewiki.net.
2590 */
2591 $wgAdaptiveMessageCache = false;
2592
2593 /**
2594 * Localisation cache configuration.
2595 *
2596 * Used by Language::getLocalisationCache() to decide how to construct the
2597 * LocalisationCache instance. Associative array with keys:
2598 *
2599 * class: The class to use for constructing the LocalisationCache object.
2600 * This may be overridden by extensions to a subclass of LocalisationCache.
2601 * Sub classes are expected to still honor the 'storeClass', 'storeDirectory'
2602 * and 'manualRecache' options where applicable.
2603 *
2604 * storeClass: Which LCStore class implementation to use. This is optional.
2605 * The default LocalisationCache class offers the 'store' option
2606 * as abstraction for this.
2607 *
2608 * store: How and where to store localisation cache data.
2609 * This option is ignored if 'storeClass' is explicitly set to a class name.
2610 * Must be one of:
2611 * - 'detect' (default): Automatically select 'files' if 'storeDirectory'
2612 * or $wgCacheDirectory is set, and fall back to 'db' otherwise.
2613 * - 'files': Store in $wgCacheDirectory as CDB files.
2614 * - 'array': Store in $wgCacheDirectory as PHP static array files.
2615 * - 'db': Store in the l10n_cache database table.
2616 *
2617 * storeDirectory: If the selected LCStore class puts its data in files, then it
2618 * will use this directory. If set to false (default), then
2619 * $wgCacheDirectory is used instead.
2620 *
2621 * manualRecache: Set this to true to disable cache updates on web requests.
2622 * Use maintenance/rebuildLocalisationCache.php instead.
2623 */
2624 $wgLocalisationCacheConf = [
2625 'class' => LocalisationCache::class,
2626 'store' => 'detect',
2627 'storeClass' => false,
2628 'storeDirectory' => false,
2629 'storeServer' => [],
2630 'forceRecache' => false,
2631 'manualRecache' => false,
2632 ];
2633
2634 /**
2635 * Allow client-side caching of pages
2636 */
2637 $wgCachePages = true;
2638
2639 /**
2640 * Set this to current time to invalidate all prior cached pages. Affects both
2641 * client-side and server-side caching.
2642 * You can get the current date on your server by using the command:
2643 * @verbatim
2644 * date +%Y%m%d%H%M%S
2645 * @endverbatim
2646 */
2647 $wgCacheEpoch = '20030516000000';
2648
2649 /**
2650 * Directory where GitInfo will look for pre-computed cache files. If false,
2651 * $wgCacheDirectory/gitinfo will be used.
2652 */
2653 $wgGitInfoCacheDirectory = false;
2654
2655 /**
2656 * This will cache static pages for non-logged-in users to reduce
2657 * database traffic on public sites. ResourceLoader requests to default
2658 * language and skins are cached as well as single module requests.
2659 */
2660 $wgUseFileCache = false;
2661
2662 /**
2663 * Depth of the subdirectory hierarchy to be created under
2664 * $wgFileCacheDirectory. The subdirectories will be named based on
2665 * the MD5 hash of the title. A value of 0 means all cache files will
2666 * be put directly into the main file cache directory.
2667 */
2668 $wgFileCacheDepth = 2;
2669
2670 /**
2671 * Append a configured value to the parser cache and the sitenotice key so
2672 * that they can be kept separate for some class of activity.
2673 */
2674 $wgRenderHashAppend = '';
2675
2676 /**
2677 * If on, the sidebar navigation links are cached for users with the
2678 * current language set. This can save a touch of load on a busy site
2679 * by shaving off extra message lookups.
2680 *
2681 * However it is also fragile: changing the site configuration, or
2682 * having a variable $wgArticlePath, can produce broken links that
2683 * don't update as expected.
2684 */
2685 $wgEnableSidebarCache = false;
2686
2687 /**
2688 * Expiry time for the sidebar cache, in seconds
2689 */
2690 $wgSidebarCacheExpiry = 86400;
2691
2692 /**
2693 * When using the file cache, we can store the cached HTML gzipped to save disk
2694 * space. Pages will then also be served compressed to clients that support it.
2695 *
2696 * Requires zlib support enabled in PHP.
2697 */
2698 $wgUseGzip = false;
2699
2700 /**
2701 * Invalidate various caches when LocalSettings.php changes. This is equivalent
2702 * to setting $wgCacheEpoch to the modification time of LocalSettings.php, as
2703 * was previously done in the default LocalSettings.php file.
2704 *
2705 * On high-traffic wikis, this should be set to false, to avoid the need to
2706 * check the file modification time, and to avoid the performance impact of
2707 * unnecessary cache invalidations.
2708 */
2709 $wgInvalidateCacheOnLocalSettingsChange = true;
2710
2711 /**
2712 * When loading extensions through the extension registration system, this
2713 * can be used to invalidate the cache. A good idea would be to set this to
2714 * one file, you can just `touch` that one to invalidate the cache
2715 *
2716 * @par Example:
2717 * @code
2718 * $wgExtensionInfoMtime = filemtime( "$IP/LocalSettings.php" );
2719 * @endcode
2720 *
2721 * If set to false, the mtime for each individual JSON file will be checked,
2722 * which can be slow if a large number of extensions are being loaded.
2723 *
2724 * @var int|bool
2725 */
2726 $wgExtensionInfoMTime = false;
2727
2728 /** @} */ # end of cache settings
2729
2730 /************************************************************************//**
2731 * @name HTTP proxy (CDN) settings
2732 *
2733 * Many of these settings apply to any HTTP proxy used in front of MediaWiki,
2734 * although they are sometimes still referred to as Squid settings for
2735 * historical reasons.
2736 *
2737 * Achieving a high hit ratio with an HTTP proxy requires special configuration.
2738 * See https://www.mediawiki.org/wiki/Manual:Performance_tuning#Page_view_caching
2739 * for more details.
2740 *
2741 * @{
2742 */
2743
2744 /**
2745 * Enable/disable CDN.
2746 *
2747 * See https://www.mediawiki.org/wiki/Manual:Performance_tuning#Page_view_caching
2748 *
2749 * @since 1.34 Renamed from $wgUseSquid.
2750 */
2751 $wgUseCdn = false;
2752
2753 /**
2754 * Add X-Forwarded-Proto to the Vary and Key headers for API requests and
2755 * RSS/Atom feeds. Use this if you have an SSL termination setup
2756 * and need to split the cache between HTTP and HTTPS for API requests,
2757 * feed requests and HTTP redirect responses in order to prevent cache
2758 * pollution. This does not affect 'normal' requests to index.php other than
2759 * HTTP redirects.
2760 */
2761 $wgVaryOnXFP = false;
2762
2763 /**
2764 * Internal server name as known to CDN, if different.
2765 *
2766 * @par Example:
2767 * @code
2768 * $wgInternalServer = 'http://yourinternal.tld:8000';
2769 * @endcode
2770 */
2771 $wgInternalServer = false;
2772
2773 /**
2774 * Cache TTL for the CDN sent as s-maxage (without ESI) or
2775 * Surrogate-Control (with ESI). Without ESI, you should strip
2776 * out s-maxage in the CDN config.
2777 *
2778 * 18000 seconds = 5 hours, more cache hits with 2678400 = 31 days.
2779 *
2780 * @since 1.34 Renamed from $wgSquidMaxage
2781 */
2782 $wgCdnMaxAge = 18000;
2783
2784 /**
2785 * Cache timeout for the CDN when DB replica DB lag is high
2786 * @see $wgCdnMaxAge
2787 *
2788 * @since 1.27
2789 */
2790 $wgCdnMaxageLagged = 30;
2791
2792 /**
2793 * If set, any SquidPurge call on a URL or URLs will send a second purge no less than
2794 * this many seconds later via the job queue. This requires delayed job support.
2795 * This should be safely higher than the 'max lag' value in $wgLBFactoryConf, so that
2796 * replica DB lag does not cause page to be stuck in stales states in CDN.
2797 *
2798 * This also fixes race conditions in two-tiered CDN setups (e.g. cdn2 => cdn1 => MediaWiki).
2799 * If a purge for a URL reaches cdn2 before cdn1 and a request reaches cdn2 for that URL,
2800 * it will populate the response from the stale cdn1 value. When cdn1 gets the purge, cdn2
2801 * will still be stale. If the rebound purge delay is safely higher than the time to relay
2802 * a purge to all nodes, then the rebound purge will clear cdn2 after cdn1 was cleared.
2803 *
2804 * @since 1.27
2805 */
2806 $wgCdnReboundPurgeDelay = 0;
2807
2808 /**
2809 * Cache timeout for the CDN when a response is known to be wrong or incomplete (due to load)
2810 * @see $wgCdnMaxAge
2811 * @since 1.27
2812 */
2813 $wgCdnMaxageSubstitute = 60;
2814
2815 /**
2816 * Default maximum age for raw CSS/JS accesses
2817 *
2818 * 300 seconds = 5 minutes.
2819 */
2820 $wgForcedRawSMaxage = 300;
2821
2822 /**
2823 * List of proxy servers to purge on changes; default port is 80. Use IP addresses.
2824 *
2825 * When MediaWiki is running behind a proxy, it will trust X-Forwarded-For
2826 * headers sent/modified from these proxies when obtaining the remote IP address
2827 *
2828 * For a list of trusted servers which *aren't* purged, see $wgSquidServersNoPurge.
2829 *
2830 * @since 1.34 Renamed from $wgSquidServers.
2831 */
2832 $wgCdnServers = [];
2833
2834 /**
2835 * As with $wgCdnServers, except these servers aren't purged on page changes;
2836 * use to set a list of trusted proxies, etc. Supports both individual IP
2837 * addresses and CIDR blocks.
2838 *
2839 * @since 1.23 Supports CIDR ranges
2840 * @since 1.34 Renamed from $wgSquidServersNoPurge
2841 */
2842 $wgCdnServersNoPurge = [];
2843
2844 /**
2845 * Whether to use a Host header in purge requests sent to the proxy servers
2846 * configured in $wgCdnServers. Set this to false to support a CDN
2847 * configured in forward-proxy mode.
2848 *
2849 * If this is set to true, a Host header will be sent, and only the path
2850 * component of the URL will appear on the request line, as if the request
2851 * were a non-proxy HTTP 1.1 request. Varnish only supports this style of
2852 * request. Squid supports this style of request only if reverse-proxy mode
2853 * (http_port ... accel) is enabled.
2854 *
2855 * If this is set to false, no Host header will be sent, and the absolute URL
2856 * will be sent in the request line, as is the standard for an HTTP proxy
2857 * request in both HTTP 1.0 and 1.1. This style of request is not supported
2858 * by Varnish, but is supported by Squid in either configuration (forward or
2859 * reverse).
2860 *
2861 * @since 1.21
2862 * @deprecated since 1.33, will always be true in a future release.
2863 */
2864 $wgSquidPurgeUseHostHeader = true;
2865
2866 /**
2867 * Routing configuration for HTCP multicast purging. Add elements here to
2868 * enable HTCP and determine which purges are sent where. If set to an empty
2869 * array, HTCP is disabled.
2870 *
2871 * Each key in this array is a regular expression to match against the purged
2872 * URL, or an empty string to match all URLs. The purged URL is matched against
2873 * the regexes in the order specified, and the first rule whose regex matches
2874 * is used, all remaining rules will thus be ignored.
2875 *
2876 * @par Example configuration to send purges for upload.wikimedia.org to one
2877 * multicast group and all other purges to another:
2878 * @code
2879 * $wgHTCPRouting = [
2880 * '|^https?://upload\.wikimedia\.org|' => [
2881 * 'host' => '239.128.0.113',
2882 * 'port' => 4827,
2883 * ],
2884 * '' => [
2885 * 'host' => '239.128.0.112',
2886 * 'port' => 4827,
2887 * ],
2888 * ];
2889 * @endcode
2890 *
2891 * You can also pass an array of hosts to send purges too. This is useful when
2892 * you have several multicast groups or unicast address that should receive a
2893 * given purge. Multiple hosts support was introduced in MediaWiki 1.22.
2894 *
2895 * @par Example of sending purges to multiple hosts:
2896 * @code
2897 * $wgHTCPRouting = [
2898 * '' => [
2899 * // Purges to text caches using multicast
2900 * [ 'host' => '239.128.0.114', 'port' => '4827' ],
2901 * // Purges to a hardcoded list of caches
2902 * [ 'host' => '10.88.66.1', 'port' => '4827' ],
2903 * [ 'host' => '10.88.66.2', 'port' => '4827' ],
2904 * [ 'host' => '10.88.66.3', 'port' => '4827' ],
2905 * ],
2906 * ];
2907 * @endcode
2908 *
2909 * @since 1.22
2910 * @see $wgHTCPMulticastTTL
2911 */
2912 $wgHTCPRouting = [];
2913
2914 /**
2915 * HTCP multicast TTL.
2916 * @see $wgHTCPRouting
2917 */
2918 $wgHTCPMulticastTTL = 1;
2919
2920 /**
2921 * Should forwarded Private IPs be accepted?
2922 */
2923 $wgUsePrivateIPs = false;
2924
2925 /** @} */ # end of HTTP proxy settings
2926
2927 /************************************************************************//**
2928 * @name Language, regional and character encoding settings
2929 * @{
2930 */
2931
2932 /**
2933 * Site language code. See languages/data/Names.php for languages supported by
2934 * MediaWiki out of the box. Not all languages listed there have translations,
2935 * see languages/messages/ for the list of languages with some localisation.
2936 *
2937 * Warning: Don't use any of MediaWiki's deprecated language codes listed in
2938 * LanguageCode::getDeprecatedCodeMapping or $wgDummyLanguageCodes, like "no"
2939 * for Norwegian (use "nb" instead). If you do, things will break unexpectedly.
2940 *
2941 * This defines the default interface language for all users, but users can
2942 * change it in their preferences.
2943 *
2944 * This also defines the language of pages in the wiki. The content is wrapped
2945 * in a html element with lang=XX attribute. This behavior can be overridden
2946 * via hooks, see Title::getPageLanguage.
2947 */
2948 $wgLanguageCode = 'en';
2949
2950 /**
2951 * Language cache size, or really how many languages can we handle
2952 * simultaneously without degrading to crawl speed.
2953 */
2954 $wgLangObjCacheSize = 10;
2955
2956 /**
2957 * Some languages need different word forms, usually for different cases.
2958 * Used in Language::convertGrammar().
2959 *
2960 * @par Example:
2961 * @code
2962 * $wgGrammarForms['en']['genitive']['car'] = 'car\'s';
2963 * @endcode
2964 */
2965 $wgGrammarForms = [];
2966
2967 /**
2968 * Treat language links as magic connectors, not inline links
2969 */
2970 $wgInterwikiMagic = true;
2971
2972 /**
2973 * Hide interlanguage links from the sidebar
2974 */
2975 $wgHideInterlanguageLinks = false;
2976
2977 /**
2978 * List of additional interwiki prefixes that should be treated as
2979 * interlanguage links (i.e. placed in the sidebar).
2980 * Notes:
2981 * - This will not do anything unless the prefixes are defined in the interwiki
2982 * map.
2983 * - The display text for these custom interlanguage links will be fetched from
2984 * the system message "interlanguage-link-xyz" where xyz is the prefix in
2985 * this array.
2986 * - A friendly name for each site, used for tooltip text, may optionally be
2987 * placed in the system message "interlanguage-link-sitename-xyz" where xyz is
2988 * the prefix in this array.
2989 */
2990 $wgExtraInterlanguageLinkPrefixes = [];
2991
2992 /**
2993 * List of language names or overrides for default names in Names.php
2994 */
2995 $wgExtraLanguageNames = [];
2996
2997 /**
2998 * List of mappings from one language code to another.
2999 * This array makes the codes not appear as a selectable language on the
3000 * installer, and excludes them when running the transstat.php script.
3001 *
3002 * In Setup.php, the variable $wgDummyLanguageCodes is created by combining
3003 * these codes with a list of "deprecated" codes, which are mostly leftovers
3004 * from renames or other legacy things, and the internal codes 'qqq' and 'qqx'.
3005 * If a mapping in $wgExtraLanguageCodes collide with a built-in mapping, the
3006 * value in $wgExtraLanguageCodes will be used.
3007 *
3008 * @since 1.29
3009 */
3010 $wgExtraLanguageCodes = [
3011 // Language codes of macro languages, which get mapped to the main language
3012 'bh' => 'bho', // Bihari language family
3013 'no' => 'nb', // Norwegian language family
3014
3015 // Language variants which get mapped to the main language
3016 'simple' => 'en', // Simple English
3017 ];
3018
3019 /**
3020 * Functionally the same as $wgExtraLanguageCodes, but deprecated. Instead of
3021 * appending values to this array, append them to $wgExtraLanguageCodes.
3022 *
3023 * @deprecated since 1.29
3024 */
3025 $wgDummyLanguageCodes = [];
3026
3027 /**
3028 * Set this to true to replace Arabic presentation forms with their standard
3029 * forms in the U+0600-U+06FF block. This only works if $wgLanguageCode is
3030 * set to "ar".
3031 *
3032 * Note that pages with titles containing presentation forms will become
3033 * inaccessible, run maintenance/cleanupTitles.php to fix this.
3034 *
3035 * @deprecated since 1.33: in the future will always be true.
3036 */
3037 $wgFixArabicUnicode = true;
3038
3039 /**
3040 * Set this to true to replace ZWJ-based chillu sequences in Malayalam text
3041 * with their Unicode 5.1 equivalents. This only works if $wgLanguageCode is
3042 * set to "ml". Note that some clients (even new clients as of 2010) do not
3043 * support these characters.
3044 *
3045 * If you enable this on an existing wiki, run maintenance/cleanupTitles.php to
3046 * fix any ZWJ sequences in existing page titles.
3047 *
3048 * @deprecated since 1.33: in the future will always be true.
3049 */
3050 $wgFixMalayalamUnicode = true;
3051
3052 /**
3053 * Set this to always convert certain Unicode sequences to modern ones
3054 * regardless of the content language. This has a small performance
3055 * impact.
3056 *
3057 * See $wgFixArabicUnicode and $wgFixMalayalamUnicode for conversion
3058 * details.
3059 *
3060 * @since 1.17
3061 */
3062 $wgAllUnicodeFixes = false;
3063
3064 /**
3065 * Set this to eg 'ISO-8859-1' to perform character set conversion when
3066 * loading old revisions not marked with "utf-8" flag. Use this when
3067 * converting a wiki from MediaWiki 1.4 or earlier to UTF-8 without the
3068 * burdensome mass conversion of old text data.
3069 *
3070 * @note This DOES NOT touch any fields other than old_text. Titles, comments,
3071 * user names, etc still must be converted en masse in the database before
3072 * continuing as a UTF-8 wiki.
3073 */
3074 $wgLegacyEncoding = false;
3075
3076 /**
3077 * If set to true, the MediaWiki 1.4 to 1.5 schema conversion will
3078 * create stub reference rows in the text table instead of copying
3079 * the full text of all current entries from 'cur' to 'text'.
3080 *
3081 * This will speed up the conversion step for large sites, but
3082 * requires that the cur table be kept around for those revisions
3083 * to remain viewable.
3084 *
3085 * This option affects the updaters *only*. Any present cur stub
3086 * revisions will be readable at runtime regardless of this setting.
3087 */
3088 $wgLegacySchemaConversion = false;
3089
3090 /**
3091 * Enable dates like 'May 12' instead of '12 May', if the default date format
3092 * is 'dmy or mdy'.
3093 */
3094 $wgAmericanDates = false;
3095
3096 /**
3097 * For Hindi and Arabic use local numerals instead of Western style (0-9)
3098 * numerals in interface.
3099 */
3100 $wgTranslateNumerals = true;
3101
3102 /**
3103 * Translation using MediaWiki: namespace.
3104 * Interface messages will be loaded from the database.
3105 */
3106 $wgUseDatabaseMessages = true;
3107
3108 /**
3109 * Maximum entry size in the message cache, in bytes
3110 */
3111 $wgMaxMsgCacheEntrySize = 10000;
3112
3113 /**
3114 * Whether to enable language variant conversion.
3115 */
3116 $wgDisableLangConversion = false;
3117
3118 /**
3119 * Whether to enable language variant conversion for links.
3120 */
3121 $wgDisableTitleConversion = false;
3122
3123 /**
3124 * Default variant code, if false, the default will be the language code
3125 */
3126 $wgDefaultLanguageVariant = false;
3127
3128 /**
3129 * Whether to enable the pig Latin variant of English (en-x-piglatin),
3130 * used to ease variant development work.
3131 */
3132 $wgUsePigLatinVariant = false;
3133
3134 /**
3135 * Disabled variants array of language variant conversion.
3136 *
3137 * @par Example:
3138 * @code
3139 * $wgDisabledVariants[] = 'zh-mo';
3140 * $wgDisabledVariants[] = 'zh-my';
3141 * @endcode
3142 */
3143 $wgDisabledVariants = [];
3144
3145 /**
3146 * Like $wgArticlePath, but on multi-variant wikis, this provides a
3147 * path format that describes which parts of the URL contain the
3148 * language variant.
3149 *
3150 * @par Example:
3151 * @code
3152 * $wgLanguageCode = 'sr';
3153 * $wgVariantArticlePath = '/$2/$1';
3154 * $wgArticlePath = '/wiki/$1';
3155 * @endcode
3156 *
3157 * A link to /wiki/ would be redirected to /sr/Главна_страна
3158 *
3159 * It is important that $wgArticlePath not overlap with possible values
3160 * of $wgVariantArticlePath.
3161 */
3162 $wgVariantArticlePath = false;
3163
3164 /**
3165 * Show a bar of language selection links in the user login and user
3166 * registration forms; edit the "loginlanguagelinks" message to
3167 * customise these.
3168 */
3169 $wgLoginLanguageSelector = false;
3170
3171 /**
3172 * When translating messages with wfMessage(), it is not always clear what
3173 * should be considered UI messages and what should be content messages.
3174 *
3175 * For example, for the English Wikipedia, there should be only one 'mainpage',
3176 * so when getting the link for 'mainpage', we should treat it as site content
3177 * and call ->inContentLanguage()->text(), but for rendering the text of the
3178 * link, we call ->text(). The code behaves this way by default. However,
3179 * sites like the Wikimedia Commons do offer different versions of 'mainpage'
3180 * and the like for different languages. This array provides a way to override
3181 * the default behavior.
3182 *
3183 * @par Example:
3184 * To allow language-specific main page and community
3185 * portal:
3186 * @code
3187 * $wgForceUIMsgAsContentMsg = [ 'mainpage', 'portal-url' ];
3188 * @endcode
3189 */
3190 $wgForceUIMsgAsContentMsg = [];
3191
3192 /**
3193 * Fake out the timezone that the server thinks it's in. This will be used for
3194 * date display and not for what's stored in the DB. Leave to null to retain
3195 * your server's OS-based timezone value.
3196 *
3197 * This variable is currently used only for signature formatting and for local
3198 * time/date parser variables ({{LOCALTIME}} etc.)
3199 *
3200 * Timezones can be translated by editing MediaWiki messages of type
3201 * timezone-nameinlowercase like timezone-utc.
3202 *
3203 * A list of usable timezones can found at:
3204 * https://www.php.net/manual/en/timezones.php
3205 *
3206 * @par Examples:
3207 * @code
3208 * $wgLocaltimezone = 'UTC';
3209 * $wgLocaltimezone = 'GMT';
3210 * $wgLocaltimezone = 'PST8PDT';
3211 * $wgLocaltimezone = 'Europe/Sweden';
3212 * $wgLocaltimezone = 'CET';
3213 * @endcode
3214 */
3215 $wgLocaltimezone = null;
3216
3217 /**
3218 * Set an offset from UTC in minutes to use for the default timezone setting
3219 * for anonymous users and new user accounts.
3220 *
3221 * This setting is used for most date/time displays in the software, and is
3222 * overridable in user preferences. It is *not* used for signature timestamps.
3223 *
3224 * By default, this will be set to match $wgLocaltimezone.
3225 */
3226 $wgLocalTZoffset = null;
3227
3228 /**
3229 * List of Unicode characters for which capitalization is overridden in
3230 * Language::ucfirst. The characters should be
3231 * represented as char_to_convert => conversion_override. See T219279 for details
3232 * on why this is useful during php version transitions.
3233 *
3234 * @warning: EXPERIMENTAL!
3235 *
3236 * @since 1.34
3237 * @var array
3238 */
3239 $wgOverrideUcfirstCharacters = [];
3240
3241 /** @} */ # End of language/charset settings
3242
3243 /*************************************************************************//**
3244 * @name Output format and skin settings
3245 * @{
3246 */
3247
3248 /**
3249 * The default Content-Type header.
3250 */
3251 $wgMimeType = 'text/html';
3252
3253 /**
3254 * Defines the value of the version attribute in the &lt;html&gt; tag, if any.
3255 *
3256 * If your wiki uses RDFa, set it to the correct value for RDFa+HTML5.
3257 * Correct current values are 'HTML+RDFa 1.0' or 'XHTML+RDFa 1.0'.
3258 * See also https://www.w3.org/TR/rdfa-in-html/#document-conformance
3259 * @since 1.16
3260 */
3261 $wgHtml5Version = null;
3262
3263 /**
3264 * Temporary variable that allows HTMLForms to be rendered as tables.
3265 * Table based layouts cause various issues when designing for mobile.
3266 * This global allows skins or extensions a means to force non-table based rendering.
3267 * Setting to false forces form components to always render as div elements.
3268 * @since 1.24
3269 */
3270 $wgHTMLFormAllowTableFormat = true;
3271
3272 /**
3273 * Temporary variable that applies MediaWiki UI wherever it can be supported.
3274 * Temporary variable that should be removed when mediawiki ui is more
3275 * stable and change has been communicated.
3276 * @since 1.24
3277 */
3278 $wgUseMediaWikiUIEverywhere = false;
3279
3280 /**
3281 * Whether to label the store-to-database-and-show-to-others button in the editor
3282 * as "Save page"/"Save changes" if false (the default) or, if true, instead as
3283 * "Publish page"/"Publish changes".
3284 *
3285 * @since 1.28
3286 */
3287 $wgEditSubmitButtonLabelPublish = false;
3288
3289 /**
3290 * Permit other namespaces in addition to the w3.org default.
3291 *
3292 * Use the prefix for the key and the namespace for the value.
3293 *
3294 * @par Example:
3295 * @code
3296 * $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg';
3297 * @endcode
3298 * Normally we wouldn't have to define this in the root "<html>"
3299 * element, but IE needs it there in some circumstances.
3300 *
3301 * This is ignored if $wgMimeType is set to a non-XML MIME type.
3302 */
3303 $wgXhtmlNamespaces = [];
3304
3305 /**
3306 * Site notice shown at the top of each page
3307 *
3308 * MediaWiki:Sitenotice page, which will override this. You can also
3309 * provide a separate message for logged-out users using the
3310 * MediaWiki:Anonnotice page.
3311 */
3312 $wgSiteNotice = '';
3313
3314 /**
3315 * Default skin, for new users and anonymous visitors. Registered users may
3316 * change this to any one of the other available skins in their preferences.
3317 */
3318 $wgDefaultSkin = 'vector';
3319
3320 /**
3321 * Fallback skin used when the skin defined by $wgDefaultSkin can't be found.
3322 *
3323 * @since 1.24
3324 */
3325 $wgFallbackSkin = 'fallback';
3326
3327 /**
3328 * Specify the names of skins that should not be presented in the list of
3329 * available skins in user preferences. If you want to remove a skin entirely,
3330 * remove it from the skins/ directory and its entry from LocalSettings.php.
3331 */
3332 $wgSkipSkins = [];
3333
3334 /**
3335 * @deprecated since 1.23; use $wgSkipSkins instead
3336 */
3337 $wgSkipSkin = '';
3338
3339 /**
3340 * Allow user Javascript page?
3341 * This enables a lot of neat customizations, but may
3342 * increase security risk to users and server load.
3343 */
3344 $wgAllowUserJs = false;
3345
3346 /**
3347 * Allow user Cascading Style Sheets (CSS)?
3348 * This enables a lot of neat customizations, but may
3349 * increase security risk to users and server load.
3350 */
3351 $wgAllowUserCss = false;
3352
3353 /**
3354 * Allow style-related user-preferences?
3355 *
3356 * This controls whether the `editfont` and `underline` preferences
3357 * are available to users.
3358 */
3359 $wgAllowUserCssPrefs = true;
3360
3361 /**
3362 * Use the site's Javascript page?
3363 */
3364 $wgUseSiteJs = true;
3365
3366 /**
3367 * Use the site's Cascading Style Sheets (CSS)?
3368 */
3369 $wgUseSiteCss = true;
3370
3371 /**
3372 * Break out of framesets. This can be used to prevent clickjacking attacks,
3373 * or to prevent external sites from framing your site with ads.
3374 */
3375 $wgBreakFrames = false;
3376
3377 /**
3378 * The X-Frame-Options header to send on pages sensitive to clickjacking
3379 * attacks, such as edit pages. This prevents those pages from being displayed
3380 * in a frame or iframe. The options are:
3381 *
3382 * - 'DENY': Do not allow framing. This is recommended for most wikis.
3383 *
3384 * - 'SAMEORIGIN': Allow framing by pages on the same domain. This can be used
3385 * to allow framing within a trusted domain. This is insecure if there
3386 * is a page on the same domain which allows framing of arbitrary URLs.
3387 *
3388 * - false: Allow all framing. This opens up the wiki to XSS attacks and thus
3389 * full compromise of local user accounts. Private wikis behind a
3390 * corporate firewall are especially vulnerable. This is not
3391 * recommended.
3392 *
3393 * For extra safety, set $wgBreakFrames = true, to prevent framing on all pages,
3394 * not just edit pages.
3395 */
3396 $wgEditPageFrameOptions = 'DENY';
3397
3398 /**
3399 * Disallow framing of API pages directly, by setting the X-Frame-Options
3400 * header. Since the API returns CSRF tokens, allowing the results to be
3401 * framed can compromise your user's account security.
3402 * Options are:
3403 * - 'DENY': Do not allow framing. This is recommended for most wikis.
3404 * - 'SAMEORIGIN': Allow framing by pages on the same domain.
3405 * - false: Allow all framing.
3406 * Note: $wgBreakFrames will override this for human formatted API output.
3407 */
3408 $wgApiFrameOptions = 'DENY';
3409
3410 /**
3411 * Disable output compression (enabled by default if zlib is available)
3412 */
3413 $wgDisableOutputCompression = false;
3414
3415 /**
3416 * How should section IDs be encoded?
3417 * This array can contain 1 or 2 elements, each of them can be one of:
3418 * - 'html5' is modern HTML5 style encoding with minimal escaping. Displays Unicode
3419 * characters in most browsers' address bars.
3420 * - 'legacy' is old MediaWiki-style encoding, e.g. 啤酒 turns into .E5.95.A4.E9.85.92
3421 *
3422 * The first element of this array specifies the primary mode of escaping IDs. This
3423 * is what users will see when they e.g. follow an [[#internal link]] to a section of
3424 * a page.
3425 *
3426 * The optional second element defines a fallback mode, useful for migrations.
3427 * If present, it will direct MediaWiki to add empty <span>s to every section with its
3428 * id attribute set to fallback encoded title so that links using the previous encoding
3429 * would still work.
3430 *
3431 * Example: you want to migrate your wiki from 'legacy' to 'html5'
3432 *
3433 * On the first step, set this variable to [ 'legacy', 'html5' ]. After a while, when
3434 * all caches (parser, HTTP, etc.) contain only pages generated with this setting,
3435 * flip the value to [ 'html5', 'legacy' ]. This will result in all internal links being
3436 * generated in the new encoding while old links (both external and cached internal) will
3437 * still work. After a long time, you might want to ditch backwards compatibility and
3438 * set it to [ 'html5' ]. After all, pages get edited, breaking incoming links no matter which
3439 * fragment mode is used.
3440 *
3441 * @since 1.30
3442 */
3443 $wgFragmentMode = [ 'legacy', 'html5' ];
3444
3445 /**
3446 * Which ID escaping mode should be used for external interwiki links? See documentation
3447 * for $wgFragmentMode above for details of each mode. Because you can't control external sites,
3448 * this setting should probably always be 'legacy', unless every wiki you link to has converted
3449 * to 'html5'.
3450 *
3451 * @since 1.30
3452 */
3453 $wgExternalInterwikiFragmentMode = 'legacy';
3454
3455 /**
3456 * Abstract list of footer icons for skins in place of old copyrightico and poweredbyico code
3457 * You can add new icons to the built in copyright or poweredby, or you can create
3458 * a new block. Though note that you may need to add some custom css to get good styling
3459 * of new blocks in monobook. vector and modern should work without any special css.
3460 *
3461 * $wgFooterIcons itself is a key/value array.
3462 * The key is the name of a block that the icons will be wrapped in. The final id varies
3463 * by skin; Monobook and Vector will turn poweredby into f-poweredbyico while Modern
3464 * turns it into mw_poweredby.
3465 * The value is either key/value array of icons or a string.
3466 * In the key/value array the key may or may not be used by the skin but it can
3467 * be used to find the icon and unset it or change the icon if needed.
3468 * This is useful for disabling icons that are set by extensions.
3469 * The value should be either a string or an array. If it is a string it will be output
3470 * directly as html, however some skins may choose to ignore it. An array is the preferred format
3471 * for the icon, the following keys are used:
3472 * - src: An absolute url to the image to use for the icon, this is recommended
3473 * but not required, however some skins will ignore icons without an image
3474 * - srcset: optional additional-resolution images; see HTML5 specs
3475 * - url: The url to use in the a element around the text or icon, if not set an a element will
3476 * not be outputted
3477 * - alt: This is the text form of the icon, it will be displayed without an image in
3478 * skins like Modern or if src is not set, and will otherwise be used as
3479 * the alt="" for the image. This key is required.
3480 * - width and height: If the icon specified by src is not of the standard size
3481 * you can specify the size of image to use with these keys.
3482 * Otherwise they will default to the standard 88x31.
3483 * @todo Reformat documentation.
3484 */
3485 $wgFooterIcons = [
3486 "copyright" => [
3487 "copyright" => [], // placeholder for the built in copyright icon
3488 ],
3489 "poweredby" => [
3490 "mediawiki" => [
3491 // Defaults to point at
3492 // "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png"
3493 // plus srcset for 1.5x, 2x resolution variants.
3494 "src" => null,
3495 "url" => "https://www.mediawiki.org/",
3496 "alt" => "Powered by MediaWiki",
3497 ]
3498 ],
3499 ];
3500
3501 /**
3502 * Login / create account link behavior when it's possible for anonymous users
3503 * to create an account.
3504 * - true = use a combined login / create account link
3505 * - false = split login and create account into two separate links
3506 */
3507 $wgUseCombinedLoginLink = false;
3508
3509 /**
3510 * Display user edit counts in various prominent places.
3511 */
3512 $wgEdititis = false;
3513
3514 /**
3515 * Some web hosts attempt to rewrite all responses with a 404 (not found)
3516 * status code, mangling or hiding MediaWiki's output. If you are using such a
3517 * host, you should start looking for a better one. While you're doing that,
3518 * set this to false to convert some of MediaWiki's 404 responses to 200 so
3519 * that the generated error pages can be seen.
3520 *
3521 * In cases where for technical reasons it is more important for MediaWiki to
3522 * send the correct status code than for the body to be transmitted intact,
3523 * this configuration variable is ignored.
3524 */
3525 $wgSend404Code = true;
3526
3527 /**
3528 * The $wgShowRollbackEditCount variable is used to show how many edits can be rolled back.
3529 * The numeric value of the variable controls how many edits MediaWiki will look back to
3530 * determine whether a rollback is allowed (by checking that they are all from the same author).
3531 * If the value is false or 0, the edits are not counted. Disabling this will prevent MediaWiki
3532 * from hiding some useless rollback links.
3533 *
3534 * @since 1.20
3535 */
3536 $wgShowRollbackEditCount = 10;
3537
3538 /**
3539 * Output a <link rel="canonical"> tag on every page indicating the canonical
3540 * server which should be used, i.e. $wgServer or $wgCanonicalServer. Since
3541 * detection of the current server is unreliable, the link is sent
3542 * unconditionally.
3543 */
3544 $wgEnableCanonicalServerLink = false;
3545
3546 /**
3547 * When OutputHandler is used, mangle any output that contains
3548 * <cross-domain-policy>. Without this, an attacker can send their own
3549 * cross-domain policy unless it is prevented by the crossdomain.xml file at
3550 * the domain root.
3551 *
3552 * @since 1.25
3553 */
3554 $wgMangleFlashPolicy = true;
3555
3556 /** @} */ # End of output format settings }
3557
3558 /*************************************************************************//**
3559 * @name ResourceLoader settings
3560 * @{
3561