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