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