Merge "Add a test for mixed /*@noflip*/ and /*@embed*/ CSS annotations"
[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 /**
56 * wgConf hold the site configuration.
57 * Not used for much in a default install.
58 * @since 1.5
59 */
60 $wgConf = new SiteConfiguration;
61
62 /**
63 * Registry of factory functions to create config objects:
64 * The 'main' key must be set, and the value should be a valid
65 * callable.
66 * @since 1.23
67 */
68 $wgConfigRegistry = array(
69 'main' => 'GlobalVarConfig::newInstance'
70 );
71
72 /**
73 * MediaWiki version number
74 * @since 1.2
75 */
76 $wgVersion = '1.24alpha';
77
78 /**
79 * Name of the site. It must be changed in LocalSettings.php
80 */
81 $wgSitename = 'MediaWiki';
82
83 /**
84 * URL of the server.
85 *
86 * @par Example:
87 * @code
88 * $wgServer = 'http://example.com';
89 * @endcode
90 *
91 * This is usually detected correctly by MediaWiki. If MediaWiki detects the
92 * wrong server, it will redirect incorrectly after you save a page. In that
93 * case, set this variable to fix it.
94 *
95 * If you want to use protocol-relative URLs on your wiki, set this to a
96 * protocol-relative URL like '//example.com' and set $wgCanonicalServer
97 * to a fully qualified URL.
98 */
99 $wgServer = WebRequest::detectServer();
100
101 /**
102 * Canonical URL of the server, to use in IRC feeds and notification e-mails.
103 * Must be fully qualified, even if $wgServer is protocol-relative.
104 *
105 * Defaults to $wgServer, expanded to a fully qualified http:// URL if needed.
106 * @since 1.18
107 */
108 $wgCanonicalServer = false;
109
110 /**
111 * Server name. This is automatically computed by parsing the bare
112 * hostname out of $wgCanonicalServer. It should not be customized.
113 * @since 1.24
114 */
115 $wgServerName = false;
116
117 /************************************************************************//**
118 * @name Script path settings
119 * @{
120 */
121
122 /**
123 * The path we should point to.
124 * It might be a virtual path in case with use apache mod_rewrite for example.
125 *
126 * This *needs* to be set correctly.
127 *
128 * Other paths will be set to defaults based on it unless they are directly
129 * set in LocalSettings.php
130 */
131 $wgScriptPath = '/wiki';
132
133 /**
134 * Whether to support URLs like index.php/Page_title These often break when PHP
135 * is set up in CGI mode. PATH_INFO *may* be correct if cgi.fix_pathinfo is set,
136 * but then again it may not; lighttpd converts incoming path data to lowercase
137 * on systems with case-insensitive filesystems, and there have been reports of
138 * problems on Apache as well.
139 *
140 * To be safe we'll continue to keep it off by default.
141 *
142 * Override this to false if $_SERVER['PATH_INFO'] contains unexpectedly
143 * incorrect garbage, or to true if it is really correct.
144 *
145 * The default $wgArticlePath will be set based on this value at runtime, but if
146 * you have customized it, having this incorrectly set to true can cause
147 * redirect loops when "pretty URLs" are used.
148 * @since 1.2.1
149 */
150 $wgUsePathInfo = ( strpos( PHP_SAPI, 'cgi' ) === false ) &&
151 ( strpos( PHP_SAPI, 'apache2filter' ) === false ) &&
152 ( strpos( PHP_SAPI, 'isapi' ) === false );
153
154 /**
155 * The extension to append to script names by default. This can either be .php
156 * or .php5.
157 *
158 * Some hosting providers use PHP 4 for *.php files, and PHP 5 for *.php5. This
159 * variable is provided to support those providers.
160 * @since 1.11
161 */
162 $wgScriptExtension = '.php';
163
164 /**@}*/
165
166 /************************************************************************//**
167 * @name URLs and file paths
168 *
169 * These various web and file path variables are set to their defaults
170 * in Setup.php if they are not explicitly set from LocalSettings.php.
171 *
172 * These will relatively rarely need to be set manually, unless you are
173 * splitting style sheets or images outside the main document root.
174 *
175 * In this section, a "path" is usually a host-relative URL, i.e. a URL without
176 * the host part, that starts with a slash. In most cases a full URL is also
177 * acceptable. A "directory" is a local file path.
178 *
179 * In both paths and directories, trailing slashes should not be included.
180 *
181 * @{
182 */
183
184 /**
185 * The URL path to index.php.
186 *
187 * Defaults to "{$wgScriptPath}/index{$wgScriptExtension}".
188 */
189 $wgScript = false;
190
191 /**
192 * The URL path to load.php.
193 *
194 * Defaults to "{$wgScriptPath}/load{$wgScriptExtension}".
195 * @since 1.17
196 */
197 $wgLoadScript = false;
198
199 /**
200 * The URL path of the skins directory.
201 * Defaults to "{$wgScriptPath}/skins".
202 * @since 1.3
203 */
204 $wgStylePath = false;
205 $wgStyleSheetPath = &$wgStylePath;
206
207 /**
208 * The URL path of the skins directory. Should not point to an external domain.
209 * Defaults to "{$wgScriptPath}/skins".
210 * @since 1.17
211 */
212 $wgLocalStylePath = false;
213
214 /**
215 * The URL path of the extensions directory.
216 * Defaults to "{$wgScriptPath}/extensions".
217 * @since 1.16
218 */
219 $wgExtensionAssetsPath = false;
220
221 /**
222 * Filesystem stylesheets directory.
223 * Defaults to "{$IP}/skins".
224 * @since 1.3
225 */
226 $wgStyleDirectory = false;
227
228 /**
229 * The URL path for primary article page views. This path should contain $1,
230 * which is replaced by the article title.
231 *
232 * Defaults to "{$wgScript}/$1" or "{$wgScript}?title=$1",
233 * depending on $wgUsePathInfo.
234 */
235 $wgArticlePath = false;
236
237 /**
238 * The URL path for the images directory.
239 * Defaults to "{$wgScriptPath}/images".
240 */
241 $wgUploadPath = false;
242
243 /**
244 * The filesystem path of the images directory. Defaults to "{$IP}/images".
245 */
246 $wgUploadDirectory = false;
247
248 /**
249 * Directory where the cached page will be saved.
250 * Defaults to "{$wgUploadDirectory}/cache".
251 */
252 $wgFileCacheDirectory = false;
253
254 /**
255 * The URL path of the wiki logo. The logo size should be 135x135 pixels.
256 * Defaults to "{$wgStylePath}/common/images/wiki.png".
257 */
258 $wgLogo = false;
259
260 /**
261 * The URL path of the shortcut icon.
262 * @since 1.6
263 */
264 $wgFavicon = '/favicon.ico';
265
266 /**
267 * The URL path of the icon for iPhone and iPod Touch web app bookmarks.
268 * Defaults to no icon.
269 * @since 1.12
270 */
271 $wgAppleTouchIcon = false;
272
273 /**
274 * The local filesystem path to a temporary directory. This is not required to
275 * be web accessible.
276 *
277 * When this setting is set to false, its value will be set through a call
278 * to wfTempDir(). See that methods implementation for the actual detection
279 * logic.
280 *
281 * Developers should use the global function wfTempDir() instead of this
282 * variable.
283 *
284 * @see wfTempDir()
285 * @note Default changed to false in MediaWiki 1.20.
286 */
287 $wgTmpDirectory = false;
288
289 /**
290 * If set, this URL is added to the start of $wgUploadPath to form a complete
291 * upload URL.
292 * @since 1.4
293 */
294 $wgUploadBaseUrl = '';
295
296 /**
297 * To enable remote on-demand scaling, set this to the thumbnail base URL.
298 * Full thumbnail URL will be like $wgUploadStashScalerBaseUrl/e/e6/Foo.jpg/123px-Foo.jpg
299 * where 'e6' are the first two characters of the MD5 hash of the file name.
300 * If $wgUploadStashScalerBaseUrl is set to false, thumbs are rendered locally as needed.
301 * @since 1.17
302 */
303 $wgUploadStashScalerBaseUrl = false;
304
305 /**
306 * To set 'pretty' URL paths for actions other than
307 * plain page views, add to this array.
308 *
309 * @par Example:
310 * Set pretty URL for the edit action:
311 * @code
312 * 'edit' => "$wgScriptPath/edit/$1"
313 * @endcode
314 *
315 * There must be an appropriate script or rewrite rule in place to handle these
316 * URLs.
317 * @since 1.5
318 */
319 $wgActionPaths = array();
320
321 /**@}*/
322
323 /************************************************************************//**
324 * @name Files and file uploads
325 * @{
326 */
327
328 /**
329 * Uploads have to be specially set up to be secure
330 */
331 $wgEnableUploads = false;
332
333 /**
334 * The maximum age of temporary (incomplete) uploaded files
335 */
336 $wgUploadStashMaxAge = 6 * 3600; // 6 hours
337
338 /**
339 * Allows to move images and other media files
340 */
341 $wgAllowImageMoving = true;
342
343 /**
344 * Enable deferred upload tasks that use the job queue.
345 * Only enable this if job runners are set up for both the
346 * 'AssembleUploadChunks' and 'PublishStashedFile' job types.
347 *
348 * @note If you use suhosin, this setting is incompatible with
349 * suhosin.session.encrypt.
350 */
351 $wgEnableAsyncUploads = false;
352
353 /**
354 * These are additional characters that should be replaced with '-' in filenames
355 */
356 $wgIllegalFileChars = ":";
357
358 /**
359 * What directory to place deleted uploads in.
360 * Defaults to "{$wgUploadDirectory}/deleted".
361 */
362 $wgDeletedDirectory = false;
363
364 /**
365 * Set this to true if you use img_auth and want the user to see details on why access failed.
366 */
367 $wgImgAuthDetails = false;
368
369 /**
370 * Map of relative URL directories to match to internal mwstore:// base storage paths.
371 * For img_auth.php requests, everything after "img_auth.php/" is checked to see
372 * if starts with any of the prefixes defined here. The prefixes should not overlap.
373 * The prefix that matches has a corresponding storage path, which the rest of the URL
374 * is assumed to be relative to. The file at that path (or a 404) is send to the client.
375 *
376 * Example:
377 * $wgImgAuthUrlPathMap['/timeline/'] = 'mwstore://local-fs/timeline-render/';
378 * The above maps ".../img_auth.php/timeline/X" to "mwstore://local-fs/timeline-render/".
379 * The name "local-fs" should correspond by name to an entry in $wgFileBackends.
380 *
381 * @see $wgFileBackends
382 */
383 $wgImgAuthUrlPathMap = array();
384
385 /**
386 * File repository structures
387 *
388 * $wgLocalFileRepo is a single repository structure, and $wgForeignFileRepos is
389 * an array of such structures. Each repository structure is an associative
390 * array of properties configuring the repository.
391 *
392 * Properties required for all repos:
393 * - class The class name for the repository. May come from the core or an extension.
394 * The core repository classes are FileRepo, LocalRepo, ForeignDBRepo.
395 * FSRepo is also supported for backwards compatibility.
396 *
397 * - name A unique name for the repository (but $wgLocalFileRepo should be 'local').
398 * The name should consist of alpha-numeric characters.
399 * - backend A file backend name (see $wgFileBackends).
400 *
401 * For most core repos:
402 * - zones Associative array of zone names that each map to an array with:
403 * container : backend container name the zone is in
404 * directory : root path within container for the zone
405 * url : base URL to the root of the zone
406 * urlsByExt : map of file extension types to base URLs
407 * (useful for using a different cache for videos)
408 * Zones default to using "<repo name>-<zone name>" as the container name
409 * and default to using the container root as the zone's root directory.
410 * Nesting of zone locations within other zones should be avoided.
411 * - url Public zone URL. The 'zones' settings take precedence.
412 * - hashLevels The number of directory levels for hash-based division of files
413 * - thumbScriptUrl The URL for thumb.php (optional, not recommended)
414 * - transformVia404 Whether to skip media file transformation on parse and rely on a 404
415 * handler instead.
416 * - initialCapital Equivalent to $wgCapitalLinks (or $wgCapitalLinkOverrides[NS_FILE],
417 * determines whether filenames implicitly start with a capital letter.
418 * The current implementation may give incorrect description page links
419 * when the local $wgCapitalLinks and initialCapital are mismatched.
420 * - pathDisclosureProtection
421 * May be 'paranoid' to remove all parameters from error messages, 'none' to
422 * leave the paths in unchanged, or 'simple' to replace paths with
423 * placeholders. Default for LocalRepo is 'simple'.
424 * - fileMode This allows wikis to set the file mode when uploading/moving files. Default
425 * is 0644.
426 * - directory The local filesystem directory where public files are stored. Not used for
427 * some remote repos.
428 * - thumbDir The base thumbnail directory. Defaults to "<directory>/thumb".
429 * - thumbUrl The base thumbnail URL. Defaults to "<url>/thumb".
430 * - isPrivate Set this if measures should always be taken to keep the files private.
431 * One should not trust this to assure that the files are not web readable;
432 * the server configuration should be done manually depending on the backend.
433 *
434 * These settings describe a foreign MediaWiki installation. They are optional, and will be ignored
435 * for local repositories:
436 * - descBaseUrl URL of image description pages, e.g. http://en.wikipedia.org/wiki/File:
437 * - scriptDirUrl URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g.
438 * http://en.wikipedia.org/w
439 * - scriptExtension Script extension of the MediaWiki installation, equivalent to
440 * $wgScriptExtension, e.g. .php5 defaults to .php
441 *
442 * - articleUrl Equivalent to $wgArticlePath, e.g. http://en.wikipedia.org/wiki/$1
443 * - fetchDescription Fetch the text of the remote file description page. Equivalent to
444 * $wgFetchCommonsDescriptions.
445 * - abbrvThreshold File names over this size will use the short form of thumbnail names.
446 * Short thumbnail names only have the width, parameters, and the extension.
447 *
448 * ForeignDBRepo:
449 * - dbType, dbServer, dbUser, dbPassword, dbName, dbFlags
450 * equivalent to the corresponding member of $wgDBservers
451 * - tablePrefix Table prefix, the foreign wiki's $wgDBprefix
452 * - hasSharedCache True if the wiki's shared cache is accessible via the local $wgMemc
453 *
454 * ForeignAPIRepo:
455 * - apibase Use for the foreign API's URL
456 * - apiThumbCacheExpiry How long to locally cache thumbs for
457 *
458 * If you leave $wgLocalFileRepo set to false, Setup will fill in appropriate values.
459 * Otherwise, set $wgLocalFileRepo to a repository structure as described above.
460 * If you set $wgUseInstantCommons to true, it will add an entry for Commons.
461 * If you set $wgForeignFileRepos to an array of repository structures, those will
462 * be searched after the local file repo.
463 * Otherwise, you will only have access to local media files.
464 *
465 * @see Setup.php for an example usage and default initialization.
466 */
467 $wgLocalFileRepo = false;
468
469 /**
470 * @see $wgLocalFileRepo
471 */
472 $wgForeignFileRepos = array();
473
474 /**
475 * Use Commons as a remote file repository. Essentially a wrapper, when this
476 * is enabled $wgForeignFileRepos will point at Commons with a set of default
477 * settings
478 */
479 $wgUseInstantCommons = false;
480
481 /**
482 * File backend structure configuration.
483 *
484 * This is an array of file backend configuration arrays.
485 * Each backend configuration has the following parameters:
486 * - 'name' : A unique name for the backend
487 * - 'class' : The file backend class to use
488 * - 'wikiId' : A unique string that identifies the wiki (container prefix)
489 * - 'lockManager' : The name of a lock manager (see $wgLockManagers)
490 *
491 * See FileBackend::__construct() for more details.
492 * Additional parameters are specific to the file backend class used.
493 * These settings should be global to all wikis when possible.
494 *
495 * There are two particularly important aspects about each backend:
496 * - a) Whether it is fully qualified or wiki-relative.
497 * By default, the paths of files are relative to the current wiki,
498 * which works via prefixing them with the current wiki ID when accessed.
499 * Setting 'wikiId' forces the backend to be fully qualified by prefixing
500 * all paths with the specified value instead. This can be useful if
501 * multiple wikis need to share the same data. Note that 'name' is *not*
502 * part of any prefix and thus should not be relied upon for namespacing.
503 * - b) Whether it is only defined for some wikis or is defined on all
504 * wikis in the wiki farm. Defining a backend globally is useful
505 * if multiple wikis need to share the same data.
506 * One should be aware of these aspects when configuring a backend for use with
507 * any basic feature or plugin. For example, suppose an extension stores data for
508 * different wikis in different directories and sometimes needs to access data from
509 * a foreign wiki's directory in order to render a page on given wiki. The extension
510 * would need a fully qualified backend that is defined on all wikis in the wiki farm.
511 */
512 $wgFileBackends = array();
513
514 /**
515 * Array of configuration arrays for each lock manager.
516 * Each backend configuration has the following parameters:
517 * - 'name' : A unique name for the lock manager
518 * - 'class' : The lock manger class to use
519 *
520 * See LockManager::__construct() for more details.
521 * Additional parameters are specific to the lock manager class used.
522 * These settings should be global to all wikis.
523 */
524 $wgLockManagers = array();
525
526 /**
527 * Show Exif data, on by default if available.
528 * Requires PHP's Exif extension: http://www.php.net/manual/en/ref.exif.php
529 *
530 * @note FOR WINDOWS USERS:
531 * To enable Exif functions, add the following lines to the "Windows
532 * extensions" section of php.ini:
533 * @code{.ini}
534 * extension=extensions/php_mbstring.dll
535 * extension=extensions/php_exif.dll
536 * @endcode
537 */
538 $wgShowEXIF = function_exists( 'exif_read_data' );
539
540 /**
541 * If to automatically update the img_metadata field
542 * if the metadata field is outdated but compatible with the current version.
543 * Defaults to false.
544 */
545 $wgUpdateCompatibleMetadata = false;
546
547 /**
548 * If you operate multiple wikis, you can define a shared upload path here.
549 * Uploads to this wiki will NOT be put there - they will be put into
550 * $wgUploadDirectory.
551 * If $wgUseSharedUploads is set, the wiki will look in the shared repository if
552 * no file of the given name is found in the local repository (for [[File:..]],
553 * [[Media:..]] links). Thumbnails will also be looked for and generated in this
554 * directory.
555 *
556 * Note that these configuration settings can now be defined on a per-
557 * repository basis for an arbitrary number of file repositories, using the
558 * $wgForeignFileRepos variable.
559 */
560 $wgUseSharedUploads = false;
561
562 /**
563 * Full path on the web server where shared uploads can be found
564 */
565 $wgSharedUploadPath = "http://commons.wikimedia.org/shared/images";
566
567 /**
568 * Fetch commons image description pages and display them on the local wiki?
569 */
570 $wgFetchCommonsDescriptions = false;
571
572 /**
573 * Path on the file system where shared uploads can be found.
574 */
575 $wgSharedUploadDirectory = "/var/www/wiki3/images";
576
577 /**
578 * DB name with metadata about shared directory.
579 * Set this to false if the uploads do not come from a wiki.
580 */
581 $wgSharedUploadDBname = false;
582
583 /**
584 * Optional table prefix used in database.
585 */
586 $wgSharedUploadDBprefix = '';
587
588 /**
589 * Cache shared metadata in memcached.
590 * Don't do this if the commons wiki is in a different memcached domain
591 */
592 $wgCacheSharedUploads = true;
593
594 /**
595 * Allow for upload to be copied from an URL.
596 * The timeout for copy uploads is set by $wgCopyUploadTimeout.
597 * You have to assign the user right 'upload_by_url' to a user group, to use this.
598 */
599 $wgAllowCopyUploads = false;
600
601 /**
602 * Allow asynchronous copy uploads.
603 * This feature is experimental and broken as of r81612.
604 */
605 $wgAllowAsyncCopyUploads = false;
606
607 /**
608 * A list of domains copy uploads can come from
609 *
610 * @since 1.20
611 */
612 $wgCopyUploadsDomains = array();
613
614 /**
615 * Enable copy uploads from Special:Upload. $wgAllowCopyUploads must also be
616 * true. If $wgAllowCopyUploads is true, but this is false, you will only be
617 * able to perform copy uploads from the API or extensions (e.g. UploadWizard).
618 */
619 $wgCopyUploadsFromSpecialUpload = false;
620
621 /**
622 * Proxy to use for copy upload requests.
623 * @since 1.20
624 */
625 $wgCopyUploadProxy = false;
626
627 /**
628 * Different timeout for upload by url
629 * This could be useful since when fetching large files, you may want a
630 * timeout longer than the default $wgHTTPTimeout. False means fallback
631 * to default.
632 *
633 * @since 1.22
634 */
635 $wgCopyUploadTimeout = false;
636
637 /**
638 * Different timeout for upload by url when run as a background job
639 * This could be useful since when fetching large files via job queue,
640 * you may want a different timeout, especially because there is no
641 * http request being kept alive.
642 *
643 * false means fallback to $wgCopyUploadTimeout.
644 * @since 1.22
645 */
646 $wgCopyUploadAsyncTimeout = false;
647
648 /**
649 * Max size for uploads, in bytes. If not set to an array, applies to all
650 * uploads. If set to an array, per upload type maximums can be set, using the
651 * file and url keys. If the * key is set this value will be used as maximum
652 * for non-specified types.
653 *
654 * @par Example:
655 * @code
656 * $wgMaxUploadSize = array(
657 * '*' => 250 * 1024,
658 * 'url' => 500 * 1024,
659 * );
660 * @endcode
661 * Sets the maximum for all uploads to 250 kB except for upload-by-url, which
662 * will have a maximum of 500 kB.
663 */
664 $wgMaxUploadSize = 1024 * 1024 * 100; # 100MB
665
666 /**
667 * Point the upload navigation link to an external URL
668 * Useful if you want to use a shared repository by default
669 * without disabling local uploads (use $wgEnableUploads = false for that).
670 *
671 * @par Example:
672 * @code
673 * $wgUploadNavigationUrl = 'http://commons.wikimedia.org/wiki/Special:Upload';
674 * @endcode
675 */
676 $wgUploadNavigationUrl = false;
677
678 /**
679 * Point the upload link for missing files to an external URL, as with
680 * $wgUploadNavigationUrl. The URL will get "(?|&)wpDestFile=<filename>"
681 * appended to it as appropriate.
682 */
683 $wgUploadMissingFileUrl = false;
684
685 /**
686 * Give a path here to use thumb.php for thumbnail generation on client
687 * request, instead of generating them on render and outputting a static URL.
688 * This is necessary if some of your apache servers don't have read/write
689 * access to the thumbnail path.
690 *
691 * @par Example:
692 * @code
693 * $wgThumbnailScriptPath = "{$wgScriptPath}/thumb{$wgScriptExtension}";
694 * @endcode
695 */
696 $wgThumbnailScriptPath = false;
697
698 /**
699 * @see $wgThumbnailScriptPath
700 */
701 $wgSharedThumbnailScriptPath = false;
702
703 /**
704 * Set this to false if you do not want MediaWiki to divide your images
705 * directory into many subdirectories, for improved performance.
706 *
707 * It's almost always good to leave this enabled. In previous versions of
708 * MediaWiki, some users set this to false to allow images to be added to the
709 * wiki by simply copying them into $wgUploadDirectory and then running
710 * maintenance/rebuildImages.php to register them in the database. This is no
711 * longer recommended, use maintenance/importImages.php instead.
712 *
713 * @note That this variable may be ignored if $wgLocalFileRepo is set.
714 * @todo Deprecate the setting and ultimately remove it from Core.
715 */
716 $wgHashedUploadDirectory = true;
717
718 /**
719 * Set the following to false especially if you have a set of files that need to
720 * be accessible by all wikis, and you do not want to use the hash (path/a/aa/)
721 * directory layout.
722 */
723 $wgHashedSharedUploadDirectory = true;
724
725 /**
726 * Base URL for a repository wiki. Leave this blank if uploads are just stored
727 * in a shared directory and not meant to be accessible through a separate wiki.
728 * Otherwise the image description pages on the local wiki will link to the
729 * image description page on this wiki.
730 *
731 * Please specify the namespace, as in the example below.
732 */
733 $wgRepositoryBaseUrl = "http://commons.wikimedia.org/wiki/File:";
734
735 /**
736 * This is the list of preferred extensions for uploading files. Uploading files
737 * with extensions not in this list will trigger a warning.
738 *
739 * @warning If you add any OpenOffice or Microsoft Office file formats here,
740 * such as odt or doc, and untrusted users are allowed to upload files, then
741 * your wiki will be vulnerable to cross-site request forgery (CSRF).
742 */
743 $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg' );
744
745 /**
746 * Files with these extensions will never be allowed as uploads.
747 * An array of file extensions to blacklist. You should append to this array
748 * if you want to blacklist additional files.
749 */
750 $wgFileBlacklist = array(
751 # HTML may contain cookie-stealing JavaScript and web bugs
752 'html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht',
753 # PHP scripts may execute arbitrary code on the server
754 'php', 'phtml', 'php3', 'php4', 'php5', 'phps',
755 # Other types that may be interpreted by some servers
756 'shtml', 'jhtml', 'pl', 'py', 'cgi',
757 # May contain harmful executables for Windows victims
758 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' );
759
760 /**
761 * Files with these MIME types will never be allowed as uploads
762 * if $wgVerifyMimeType is enabled.
763 */
764 $wgMimeTypeBlacklist = array(
765 # HTML may contain cookie-stealing JavaScript and web bugs
766 'text/html', 'text/javascript', 'text/x-javascript', 'application/x-shellscript',
767 # PHP scripts may execute arbitrary code on the server
768 'application/x-php', 'text/x-php',
769 # Other types that may be interpreted by some servers
770 'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh',
771 # Client-side hazards on Internet Explorer
772 'text/scriptlet', 'application/x-msdownload',
773 # Windows metafile, client-side vulnerability on some systems
774 'application/x-msmetafile',
775 );
776
777 /**
778 * Allow Java archive uploads.
779 * This is not recommended for public wikis since a maliciously-constructed
780 * applet running on the same domain as the wiki can steal the user's cookies.
781 */
782 $wgAllowJavaUploads = false;
783
784 /**
785 * This is a flag to determine whether or not to check file extensions on upload.
786 *
787 * @warning Setting this to false is insecure for public wikis.
788 */
789 $wgCheckFileExtensions = true;
790
791 /**
792 * If this is turned off, users may override the warning for files not covered
793 * by $wgFileExtensions.
794 *
795 * @warning Setting this to false is insecure for public wikis.
796 */
797 $wgStrictFileExtensions = true;
798
799 /**
800 * Setting this to true will disable the upload system's checks for HTML/JavaScript.
801 *
802 * @warning THIS IS VERY DANGEROUS on a publicly editable site, so USE
803 * $wgGroupPermissions TO RESTRICT UPLOADING to only those that you trust
804 */
805 $wgDisableUploadScriptChecks = false;
806
807 /**
808 * Warn if uploaded files are larger than this (in bytes), or false to disable
809 */
810 $wgUploadSizeWarning = false;
811
812 /**
813 * list of trusted media-types and MIME types.
814 * Use the MEDIATYPE_xxx constants to represent media types.
815 * This list is used by File::isSafeFile
816 *
817 * Types not listed here will have a warning about unsafe content
818 * displayed on the images description page. It would also be possible
819 * to use this for further restrictions, like disabling direct
820 * [[media:...]] links for non-trusted formats.
821 */
822 $wgTrustedMediaFormats = array(
823 MEDIATYPE_BITMAP, //all bitmap formats
824 MEDIATYPE_AUDIO, //all audio formats
825 MEDIATYPE_VIDEO, //all plain video formats
826 "image/svg+xml", //svg (only needed if inline rendering of svg is not supported)
827 "application/pdf", //PDF files
828 #"application/x-shockwave-flash", //flash/shockwave movie
829 );
830
831 /**
832 * Plugins for media file type handling.
833 * Each entry in the array maps a MIME type to a class name
834 */
835 $wgMediaHandlers = array(
836 'image/jpeg' => 'JpegHandler',
837 'image/png' => 'PNGHandler',
838 'image/gif' => 'GIFHandler',
839 'image/tiff' => 'TiffHandler',
840 'image/x-ms-bmp' => 'BmpHandler',
841 'image/x-bmp' => 'BmpHandler',
842 'image/x-xcf' => 'XCFHandler',
843 'image/svg+xml' => 'SvgHandler', // official
844 'image/svg' => 'SvgHandler', // compat
845 'image/vnd.djvu' => 'DjVuHandler', // official
846 'image/x.djvu' => 'DjVuHandler', // compat
847 'image/x-djvu' => 'DjVuHandler', // compat
848 );
849
850 /**
851 * Plugins for page content model handling.
852 * Each entry in the array maps a model id to a class name.
853 *
854 * @since 1.21
855 */
856 $wgContentHandlers = array(
857 // the usual case
858 CONTENT_MODEL_WIKITEXT => 'WikitextContentHandler',
859 // dumb version, no syntax highlighting
860 CONTENT_MODEL_JAVASCRIPT => 'JavaScriptContentHandler',
861 // simple implementation, for use by extensions, etc.
862 CONTENT_MODEL_JSON => 'JSONContentHandler',
863 // dumb version, no syntax highlighting
864 CONTENT_MODEL_CSS => 'CssContentHandler',
865 // plain text, for use by extensions, etc.
866 CONTENT_MODEL_TEXT => 'TextContentHandler',
867 );
868
869 /**
870 * Whether to enable server-side image thumbnailing. If false, images will
871 * always be sent to the client in full resolution, with appropriate width= and
872 * height= attributes on the <img> tag for the client to do its own scaling.
873 */
874 $wgUseImageResize = true;
875
876 /**
877 * Resizing can be done using PHP's internal image libraries or using
878 * ImageMagick or another third-party converter, e.g. GraphicMagick.
879 * These support more file formats than PHP, which only supports PNG,
880 * GIF, JPG, XBM and WBMP.
881 *
882 * Use Image Magick instead of PHP builtin functions.
883 */
884 $wgUseImageMagick = false;
885
886 /**
887 * The convert command shipped with ImageMagick
888 */
889 $wgImageMagickConvertCommand = '/usr/bin/convert';
890
891 /**
892 * Sharpening parameter to ImageMagick
893 */
894 $wgSharpenParameter = '0x0.4';
895
896 /**
897 * Reduction in linear dimensions below which sharpening will be enabled
898 */
899 $wgSharpenReductionThreshold = 0.85;
900
901 /**
902 * Temporary directory used for ImageMagick. The directory must exist. Leave
903 * this set to false to let ImageMagick decide for itself.
904 */
905 $wgImageMagickTempDir = false;
906
907 /**
908 * Use another resizing converter, e.g. GraphicMagick
909 * %s will be replaced with the source path, %d with the destination
910 * %w and %h will be replaced with the width and height.
911 *
912 * @par Example for GraphicMagick:
913 * @code
914 * $wgCustomConvertCommand = "gm convert %s -resize %wx%h %d"
915 * @endcode
916 *
917 * Leave as false to skip this.
918 */
919 $wgCustomConvertCommand = false;
920
921 /**
922 * used for lossless jpeg rotation
923 *
924 * @since 1.21
925 */
926 $wgJpegTran = '/usr/bin/jpegtran';
927
928 /**
929 * Some tests and extensions use exiv2 to manipulate the Exif metadata in some
930 * image formats.
931 */
932 $wgExiv2Command = '/usr/bin/exiv2';
933
934 /**
935 * Scalable Vector Graphics (SVG) may be uploaded as images.
936 * Since SVG support is not yet standard in browsers, it is
937 * necessary to rasterize SVGs to PNG as a fallback format.
938 *
939 * An external program is required to perform this conversion.
940 * If set to an array, the first item is a PHP callable and any further items
941 * are passed as parameters after $srcPath, $dstPath, $width, $height
942 */
943 $wgSVGConverters = array(
944 'ImageMagick' => '$path/convert -background white -thumbnail $widthx$height\! $input PNG:$output',
945 'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
946 'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
947 'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d '
948 . '$output $input',
949 'rsvg' => '$path/rsvg -w $width -h $height $input $output',
950 'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
951 'ImagickExt' => array( 'SvgHandler::rasterizeImagickExt' ),
952 );
953
954 /**
955 * Pick a converter defined in $wgSVGConverters
956 */
957 $wgSVGConverter = 'ImageMagick';
958
959 /**
960 * If not in the executable PATH, specify the SVG converter path.
961 */
962 $wgSVGConverterPath = '';
963
964 /**
965 * Don't scale a SVG larger than this
966 */
967 $wgSVGMaxSize = 2048;
968
969 /**
970 * Don't read SVG metadata beyond this point.
971 * Default is 1024*256 bytes
972 */
973 $wgSVGMetadataCutoff = 262144;
974
975 /**
976 * Disallow <title> element in SVG files.
977 *
978 * MediaWiki will reject HTMLesque tags in uploaded files due to idiotic
979 * browsers which can not perform basic stuff like MIME detection and which are
980 * vulnerable to further idiots uploading crap files as images.
981 *
982 * When this directive is on, "<title>" will be allowed in files with an
983 * "image/svg+xml" MIME type. You should leave this disabled if your web server
984 * is misconfigured and doesn't send appropriate MIME types for SVG images.
985 */
986 $wgAllowTitlesInSVG = false;
987
988 /**
989 * The maximum number of pixels a source image can have if it is to be scaled
990 * down by a scaler that requires the full source image to be decompressed
991 * and stored in decompressed form, before the thumbnail is generated.
992 *
993 * This provides a limit on memory usage for the decompression side of the
994 * image scaler. The limit is used when scaling PNGs with any of the
995 * built-in image scalers, such as ImageMagick or GD. It is ignored for
996 * JPEGs with ImageMagick, and when using the VipsScaler extension.
997 *
998 * The default is 50 MB if decompressed to RGBA form, which corresponds to
999 * 12.5 million pixels or 3500x3500.
1000 */
1001 $wgMaxImageArea = 1.25e7;
1002
1003 /**
1004 * Force thumbnailing of animated GIFs above this size to a single
1005 * frame instead of an animated thumbnail. As of MW 1.17 this limit
1006 * is checked against the total size of all frames in the animation.
1007 * It probably makes sense to keep this equal to $wgMaxImageArea.
1008 */
1009 $wgMaxAnimatedGifArea = 1.25e7;
1010
1011 /**
1012 * Browsers don't support TIFF inline generally...
1013 * For inline display, we need to convert to PNG or JPEG.
1014 * Note scaling should work with ImageMagick, but may not with GD scaling.
1015 *
1016 * @par Example:
1017 * @code
1018 * // PNG is lossless, but inefficient for photos
1019 * $wgTiffThumbnailType = array( 'png', 'image/png' );
1020 * // JPEG is good for photos, but has no transparency support. Bad for diagrams.
1021 * $wgTiffThumbnailType = array( 'jpg', 'image/jpeg' );
1022 * @endcode
1023 */
1024 $wgTiffThumbnailType = false;
1025
1026 /**
1027 * If rendered thumbnail files are older than this timestamp, they
1028 * will be rerendered on demand as if the file didn't already exist.
1029 * Update if there is some need to force thumbs and SVG rasterizations
1030 * to rerender, such as fixes to rendering bugs.
1031 */
1032 $wgThumbnailEpoch = '20030516000000';
1033
1034 /**
1035 * Certain operations are avoided if there were too many recent failures,
1036 * for example, thumbnail generation. Bump this value to invalidate all
1037 * memory of failed operations and thus allow further attempts to resume.
1038 * This is useful when a cause for the failures has been found and fixed.
1039 */
1040 $wgAttemptFailureEpoch = 1;
1041
1042 /**
1043 * If set, inline scaled images will still produce "<img>" tags ready for
1044 * output instead of showing an error message.
1045 *
1046 * This may be useful if errors are transitory, especially if the site
1047 * is configured to automatically render thumbnails on request.
1048 *
1049 * On the other hand, it may obscure error conditions from debugging.
1050 * Enable the debug log or the 'thumbnail' log group to make sure errors
1051 * are logged to a file for review.
1052 */
1053 $wgIgnoreImageErrors = false;
1054
1055 /**
1056 * Allow thumbnail rendering on page view. If this is false, a valid
1057 * thumbnail URL is still output, but no file will be created at
1058 * the target location. This may save some time if you have a
1059 * thumb.php or 404 handler set up which is faster than the regular
1060 * webserver(s).
1061 */
1062 $wgGenerateThumbnailOnParse = true;
1063
1064 /**
1065 * Show thumbnails for old images on the image description page
1066 */
1067 $wgShowArchiveThumbnails = true;
1068
1069 /**
1070 * If set to true, images that contain certain the exif orientation tag will
1071 * be rotated accordingly. If set to null, try to auto-detect whether a scaler
1072 * is available that can rotate.
1073 */
1074 $wgEnableAutoRotation = null;
1075
1076 /**
1077 * Internal name of virus scanner. This serves as a key to the
1078 * $wgAntivirusSetup array. Set this to NULL to disable virus scanning. If not
1079 * null, every file uploaded will be scanned for viruses.
1080 */
1081 $wgAntivirus = null;
1082
1083 /**
1084 * Configuration for different virus scanners. This an associative array of
1085 * associative arrays. It contains one setup array per known scanner type.
1086 * The entry is selected by $wgAntivirus, i.e.
1087 * valid values for $wgAntivirus are the keys defined in this array.
1088 *
1089 * The configuration array for each scanner contains the following keys:
1090 * "command", "codemap", "messagepattern":
1091 *
1092 * "command" is the full command to call the virus scanner - %f will be
1093 * replaced with the name of the file to scan. If not present, the filename
1094 * will be appended to the command. Note that this must be overwritten if the
1095 * scanner is not in the system path; in that case, please set
1096 * $wgAntivirusSetup[$wgAntivirus]['command'] to the desired command with full
1097 * path.
1098 *
1099 * "codemap" is a mapping of exit code to return codes of the detectVirus
1100 * function in SpecialUpload.
1101 * - An exit code mapped to AV_SCAN_FAILED causes the function to consider
1102 * the scan to be failed. This will pass the file if $wgAntivirusRequired
1103 * is not set.
1104 * - An exit code mapped to AV_SCAN_ABORTED causes the function to consider
1105 * the file to have an unsupported format, which is probably immune to
1106 * viruses. This causes the file to pass.
1107 * - An exit code mapped to AV_NO_VIRUS will cause the file to pass, meaning
1108 * no virus was found.
1109 * - All other codes (like AV_VIRUS_FOUND) will cause the function to report
1110 * a virus.
1111 * - You may use "*" as a key in the array to catch all exit codes not mapped otherwise.
1112 *
1113 * "messagepattern" is a perl regular expression to extract the meaningful part of the scanners
1114 * output. The relevant part should be matched as group one (\1).
1115 * If not defined or the pattern does not match, the full message is shown to the user.
1116 */
1117 $wgAntivirusSetup = array(
1118
1119 #setup for clamav
1120 'clamav' => array(
1121 'command' => 'clamscan --no-summary ',
1122 'codemap' => array(
1123 "0" => AV_NO_VIRUS, # no virus
1124 "1" => AV_VIRUS_FOUND, # virus found
1125 "52" => AV_SCAN_ABORTED, # unsupported file format (probably immune)
1126 "*" => AV_SCAN_FAILED, # else scan failed
1127 ),
1128 'messagepattern' => '/.*?:(.*)/sim',
1129 ),
1130 );
1131
1132 /**
1133 * Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected.
1134 */
1135 $wgAntivirusRequired = true;
1136
1137 /**
1138 * Determines if the MIME type of uploaded files should be checked
1139 */
1140 $wgVerifyMimeType = true;
1141
1142 /**
1143 * Sets the MIME type definition file to use by MimeMagic.php.
1144 * Set to null, to use built-in defaults only.
1145 * example: $wgMimeTypeFile = '/etc/mime.types';
1146 */
1147 $wgMimeTypeFile = 'includes/mime.types';
1148
1149 /**
1150 * Sets the MIME type info file to use by MimeMagic.php.
1151 * Set to null, to use built-in defaults only.
1152 */
1153 $wgMimeInfoFile = 'includes/mime.info';
1154
1155 /**
1156 * Sets an external MIME detector program. The command must print only
1157 * the MIME type to standard output.
1158 * The name of the file to process will be appended to the command given here.
1159 * If not set or NULL, mime_content_type will be used if available.
1160 *
1161 * @par Example:
1162 * @code
1163 * #$wgMimeDetectorCommand = "file -bi"; # use external MIME detector (Linux)
1164 * @endcode
1165 */
1166 $wgMimeDetectorCommand = null;
1167
1168 /**
1169 * Switch for trivial MIME detection. Used by thumb.php to disable all fancy
1170 * things, because only a few types of images are needed and file extensions
1171 * can be trusted.
1172 */
1173 $wgTrivialMimeDetection = false;
1174
1175 /**
1176 * Additional XML types we can allow via MIME-detection.
1177 * array = ( 'rootElement' => 'associatedMimeType' )
1178 */
1179 $wgXMLMimeTypes = array(
1180 'http://www.w3.org/2000/svg:svg' => 'image/svg+xml',
1181 'svg' => 'image/svg+xml',
1182 'http://www.lysator.liu.se/~alla/dia/:diagram' => 'application/x-dia-diagram',
1183 'http://www.w3.org/1999/xhtml:html' => 'text/html', // application/xhtml+xml?
1184 'html' => 'text/html', // application/xhtml+xml?
1185 );
1186
1187 /**
1188 * Limit images on image description pages to a user-selectable limit. In order
1189 * to reduce disk usage, limits can only be selected from a list.
1190 * The user preference is saved as an array offset in the database, by default
1191 * the offset is set with $wgDefaultUserOptions['imagesize']. Make sure you
1192 * change it if you alter the array (see bug 8858).
1193 * This is the list of settings the user can choose from:
1194 */
1195 $wgImageLimits = array(
1196 array( 320, 240 ),
1197 array( 640, 480 ),
1198 array( 800, 600 ),
1199 array( 1024, 768 ),
1200 array( 1280, 1024 )
1201 );
1202
1203 /**
1204 * Adjust thumbnails on image pages according to a user setting. In order to
1205 * reduce disk usage, the values can only be selected from a list. This is the
1206 * list of settings the user can choose from:
1207 */
1208 $wgThumbLimits = array(
1209 120,
1210 150,
1211 180,
1212 200,
1213 250,
1214 300
1215 );
1216
1217 /**
1218 * When defined, is an array of image widths used as buckets for thumbnail generation.
1219 * The goal is to save resources by generating thumbnails based on reference buckets instead of
1220 * always using the original. This will incur a speed gain but cause a quality loss.
1221 *
1222 * The buckets generation is chained, with each bucket generated based on the above bucket
1223 * when possible. File handlers have to opt into using that feature. For now only BitmapHandler
1224 * supports it.
1225 */
1226 $wgThumbnailBuckets = null;
1227
1228 /**
1229 * When using thumbnail buckets as defined above, this sets the minimum distance to the bucket
1230 * above the requested size. The distance represents how many extra pixels of width the bucket
1231 * needs in order to be used as the reference for a given thumbnail. For example, with the
1232 * following buckets:
1233 *
1234 * $wgThumbnailBuckets = array ( 128, 256, 512 );
1235 *
1236 * and a distance of 50:
1237 *
1238 * $wgThumbnailMinimumBucketDistance = 50;
1239 *
1240 * If we want to render a thumbnail of width 220px, the 512px bucket will be used,
1241 * because 220 + 50 = 270 and the closest bucket bigger than 270px is 512.
1242 */
1243 $wgThumbnailMinimumBucketDistance = 50;
1244
1245 /**
1246 * Default parameters for the "<gallery>" tag
1247 */
1248 $wgGalleryOptions = array(
1249 'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize
1250 'imageWidth' => 120, // Width of the cells containing images in galleries (in "px")
1251 'imageHeight' => 120, // Height of the cells containing images in galleries (in "px")
1252 'captionLength' => 25, // Length of caption to truncate (in characters)
1253 'showBytes' => true, // Show the filesize in bytes in categories
1254 'mode' => 'traditional',
1255 );
1256
1257 /**
1258 * Adjust width of upright images when parameter 'upright' is used
1259 * This allows a nicer look for upright images without the need to fix the width
1260 * by hardcoded px in wiki sourcecode.
1261 */
1262 $wgThumbUpright = 0.75;
1263
1264 /**
1265 * Default value for chmoding of new directories.
1266 */
1267 $wgDirectoryMode = 0777;
1268
1269 /**
1270 * Generate and use thumbnails suitable for screens with 1.5 and 2.0 pixel densities.
1271 *
1272 * This means a 320x240 use of an image on the wiki will also generate 480x360 and 640x480
1273 * thumbnails, output via data-src-1-5 and data-src-2-0. Runtime JavaScript switches the
1274 * images in after loading the original low-resolution versions depending on the reported
1275 * window.devicePixelRatio.
1276 */
1277 $wgResponsiveImages = true;
1278
1279 /**
1280 * @name DJVU settings
1281 * @{
1282 */
1283
1284 /**
1285 * Path of the djvudump executable
1286 * Enable this and $wgDjvuRenderer to enable djvu rendering
1287 * example: $wgDjvuDump = 'djvudump';
1288 */
1289 $wgDjvuDump = null;
1290
1291 /**
1292 * Path of the ddjvu DJVU renderer
1293 * Enable this and $wgDjvuDump to enable djvu rendering
1294 * example: $wgDjvuRenderer = 'ddjvu';
1295 */
1296 $wgDjvuRenderer = null;
1297
1298 /**
1299 * Path of the djvutxt DJVU text extraction utility
1300 * Enable this and $wgDjvuDump to enable text layer extraction from djvu files
1301 * example: $wgDjvuTxt = 'djvutxt';
1302 */
1303 $wgDjvuTxt = null;
1304
1305 /**
1306 * Path of the djvutoxml executable
1307 * This works like djvudump except much, much slower as of version 3.5.
1308 *
1309 * For now we recommend you use djvudump instead. The djvuxml output is
1310 * probably more stable, so we'll switch back to it as soon as they fix
1311 * the efficiency problem.
1312 * http://sourceforge.net/tracker/index.php?func=detail&aid=1704049&group_id=32953&atid=406583
1313 *
1314 * @par Example:
1315 * @code
1316 * $wgDjvuToXML = 'djvutoxml';
1317 * @endcode
1318 */
1319 $wgDjvuToXML = null;
1320
1321 /**
1322 * Shell command for the DJVU post processor
1323 * Default: pnmtojpeg, since ddjvu generates ppm output
1324 * Set this to false to output the ppm file directly.
1325 */
1326 $wgDjvuPostProcessor = 'pnmtojpeg';
1327
1328 /**
1329 * File extension for the DJVU post processor output
1330 */
1331 $wgDjvuOutputExtension = 'jpg';
1332
1333 /** @} */ # end of DJvu }
1334
1335 /** @} */ # end of file uploads }
1336
1337 /************************************************************************//**
1338 * @name Email settings
1339 * @{
1340 */
1341
1342
1343 /**
1344 * Site admin email address.
1345 *
1346 * Defaults to "wikiadmin@{$wgServerName}".
1347 */
1348 $wgEmergencyContact = false;
1349
1350 /**
1351 * Password reminder email address.
1352 *
1353 * The address we should use as sender when a user is requesting his password.
1354 *
1355 * Defaults to "apache@{$wgServerName}".
1356 */
1357 $wgPasswordSender = false;
1358
1359 /**
1360 * Password reminder name
1361 *
1362 * @deprecated since 1.23; use the system message 'emailsender' instead.
1363 */
1364 $wgPasswordSenderName = 'MediaWiki Mail';
1365
1366 /**
1367 * Dummy address which should be accepted during mail send action.
1368 * It might be necessary to adapt the address or to set it equal
1369 * to the $wgEmergencyContact address.
1370 */
1371 $wgNoReplyAddress = 'reply@not.possible';
1372
1373 /**
1374 * Set to true to enable the e-mail basic features:
1375 * Password reminders, etc. If sending e-mail on your
1376 * server doesn't work, you might want to disable this.
1377 */
1378 $wgEnableEmail = true;
1379
1380 /**
1381 * Set to true to enable user-to-user e-mail.
1382 * This can potentially be abused, as it's hard to track.
1383 */
1384 $wgEnableUserEmail = true;
1385
1386 /**
1387 * Set to true to put the sending user's email in a Reply-To header
1388 * instead of From. ($wgEmergencyContact will be used as From.)
1389 *
1390 * Some mailers (eg sSMTP) set the SMTP envelope sender to the From value,
1391 * which can cause problems with SPF validation and leak recipient addresses
1392 * when bounces are sent to the sender.
1393 */
1394 $wgUserEmailUseReplyTo = false;
1395
1396 /**
1397 * Minimum time, in hours, which must elapse between password reminder
1398 * emails for a given account. This is to prevent abuse by mail flooding.
1399 */
1400 $wgPasswordReminderResendTime = 24;
1401
1402 /**
1403 * The time, in seconds, when an emailed temporary password expires.
1404 */
1405 $wgNewPasswordExpiry = 3600 * 24 * 7;
1406
1407 /**
1408 * The time, in seconds, when an email confirmation email expires
1409 */
1410 $wgUserEmailConfirmationTokenExpiry = 7 * 24 * 60 * 60;
1411
1412 /**
1413 * The number of days that a user's password is good for. After this number of days, the
1414 * user will be asked to reset their password. Set to false to disable password expiration.
1415 */
1416 $wgPasswordExpirationDays = false;
1417
1418 /**
1419 * If a user's password is expired, the number of seconds when they can still login,
1420 * and cancel their password change, but are sent to the password change form on each login.
1421 */
1422 $wgPasswordExpireGrace = 3600 * 24 * 7; // 7 days
1423
1424 /**
1425 * SMTP Mode.
1426 *
1427 * For using a direct (authenticated) SMTP server connection.
1428 * Default to false or fill an array :
1429 *
1430 * @code
1431 * $wgSMTP = array(
1432 * 'host' => 'SMTP domain',
1433 * 'IDHost' => 'domain for MessageID',
1434 * 'port' => '25',
1435 * 'auth' => [true|false],
1436 * 'username' => [SMTP username],
1437 * 'password' => [SMTP password],
1438 * );
1439 * @endcode
1440 */
1441 $wgSMTP = false;
1442
1443 /**
1444 * Additional email parameters, will be passed as the last argument to mail() call.
1445 * If using safe_mode this has no effect
1446 */
1447 $wgAdditionalMailParams = null;
1448
1449 /**
1450 * For parts of the system that have been updated to provide HTML email content, send
1451 * both text and HTML parts as the body of the email
1452 */
1453 $wgAllowHTMLEmail = false;
1454
1455 /**
1456 * True: from page editor if s/he opted-in. False: Enotif mails appear to come
1457 * from $wgEmergencyContact
1458 */
1459 $wgEnotifFromEditor = false;
1460
1461 // TODO move UPO to preferences probably ?
1462 # If set to true, users get a corresponding option in their preferences and can choose to
1463 # enable or disable at their discretion
1464 # If set to false, the corresponding input form on the user preference page is suppressed
1465 # It call this to be a "user-preferences-option (UPO)"
1466
1467 /**
1468 * Require email authentication before sending mail to an email address.
1469 * This is highly recommended. It prevents MediaWiki from being used as an open
1470 * spam relay.
1471 */
1472 $wgEmailAuthentication = true;
1473
1474 /**
1475 * Allow users to enable email notification ("enotif") on watchlist changes.
1476 */
1477 $wgEnotifWatchlist = false;
1478
1479 /**
1480 * Allow users to enable email notification ("enotif") when someone edits their
1481 * user talk page.
1482 */
1483 $wgEnotifUserTalk = false;
1484
1485 /**
1486 * Set the Reply-to address in notifications to the editor's address, if user
1487 * allowed this in the preferences.
1488 */
1489 $wgEnotifRevealEditorAddress = false;
1490
1491 /**
1492 * Send notification mails on minor edits to watchlist pages. This is enabled
1493 * by default. Does not affect user talk notifications.
1494 */
1495 $wgEnotifMinorEdits = true;
1496
1497 /**
1498 * Send a generic mail instead of a personalised mail for each user. This
1499 * always uses UTC as the time zone, and doesn't include the username.
1500 *
1501 * For pages with many users watching, this can significantly reduce mail load.
1502 * Has no effect when using sendmail rather than SMTP.
1503 */
1504 $wgEnotifImpersonal = false;
1505
1506 /**
1507 * Maximum number of users to mail at once when using impersonal mail. Should
1508 * match the limit on your mail server.
1509 */
1510 $wgEnotifMaxRecips = 500;
1511
1512 /**
1513 * Send mails via the job queue. This can be useful to reduce the time it
1514 * takes to save a page that a lot of people are watching.
1515 */
1516 $wgEnotifUseJobQ = false;
1517
1518 /**
1519 * Use real name instead of username in e-mail "from" field.
1520 */
1521 $wgEnotifUseRealName = false;
1522
1523 /**
1524 * Array of usernames who will be sent a notification email for every change
1525 * which occurs on a wiki. Users will not be notified of their own changes.
1526 */
1527 $wgUsersNotifiedOnAllChanges = array();
1528
1529 /** @} */ # end of email settings
1530
1531 /************************************************************************//**
1532 * @name Database settings
1533 * @{
1534 */
1535
1536 /**
1537 * Database host name or IP address
1538 */
1539 $wgDBserver = 'localhost';
1540
1541 /**
1542 * Database port number (for PostgreSQL and Microsoft SQL Server).
1543 */
1544 $wgDBport = 5432;
1545
1546 /**
1547 * Name of the database
1548 */
1549 $wgDBname = 'my_wiki';
1550
1551 /**
1552 * Database username
1553 */
1554 $wgDBuser = 'wikiuser';
1555
1556 /**
1557 * Database user's password
1558 */
1559 $wgDBpassword = '';
1560
1561 /**
1562 * Database type
1563 */
1564 $wgDBtype = 'mysql';
1565
1566 /**
1567 * Whether to use SSL in DB connection.
1568 *
1569 * This setting is only used $wgLBFactoryConf['class'] is set to
1570 * 'LBFactorySimple' and $wgDBservers is an empty array; otherwise
1571 * the DBO_SSL flag must be set in the 'flags' option of the database
1572 * connection to achieve the same functionality.
1573 */
1574 $wgDBssl = false;
1575
1576 /**
1577 * Whether to use compression in DB connection.
1578 *
1579 * This setting is only used $wgLBFactoryConf['class'] is set to
1580 * 'LBFactorySimple' and $wgDBservers is an empty array; otherwise
1581 * the DBO_COMPRESS flag must be set in the 'flags' option of the database
1582 * connection to achieve the same functionality.
1583 */
1584 $wgDBcompress = false;
1585
1586 /**
1587 * Separate username for maintenance tasks. Leave as null to use the default.
1588 */
1589 $wgDBadminuser = null;
1590
1591 /**
1592 * Separate password for maintenance tasks. Leave as null to use the default.
1593 */
1594 $wgDBadminpassword = null;
1595
1596 /**
1597 * Search type.
1598 * Leave as null to select the default search engine for the
1599 * selected database type (eg SearchMySQL), or set to a class
1600 * name to override to a custom search engine.
1601 */
1602 $wgSearchType = null;
1603
1604 /**
1605 * Alternative search types
1606 * Sometimes you want to support multiple search engines for testing. This
1607 * allows users to select their search engine of choice via url parameters
1608 * to Special:Search and the action=search API. If using this, there's no
1609 * need to add $wgSearchType to it, that is handled automatically.
1610 */
1611 $wgSearchTypeAlternatives = null;
1612
1613 /**
1614 * Table name prefix
1615 */
1616 $wgDBprefix = '';
1617
1618 /**
1619 * MySQL table options to use during installation or update
1620 */
1621 $wgDBTableOptions = 'ENGINE=InnoDB';
1622
1623 /**
1624 * SQL Mode - default is turning off all modes, including strict, if set.
1625 * null can be used to skip the setting for performance reasons and assume
1626 * DBA has done his best job.
1627 * String override can be used for some additional fun :-)
1628 */
1629 $wgSQLMode = '';
1630
1631 /**
1632 * Mediawiki schema
1633 */
1634 $wgDBmwschema = null;
1635
1636 /**
1637 * To override default SQLite data directory ($docroot/../data)
1638 */
1639 $wgSQLiteDataDir = '';
1640
1641 /**
1642 * Make all database connections secretly go to localhost. Fool the load balancer
1643 * thinking there is an arbitrarily large cluster of servers to connect to.
1644 * Useful for debugging.
1645 */
1646 $wgAllDBsAreLocalhost = false;
1647
1648 /**
1649 * Shared database for multiple wikis. Commonly used for storing a user table
1650 * for single sign-on. The server for this database must be the same as for the
1651 * main database.
1652 *
1653 * For backwards compatibility the shared prefix is set to the same as the local
1654 * prefix, and the user table is listed in the default list of shared tables.
1655 * The user_properties table is also added so that users will continue to have their
1656 * preferences shared (preferences were stored in the user table prior to 1.16)
1657 *
1658 * $wgSharedTables may be customized with a list of tables to share in the shared
1659 * database. However it is advised to limit what tables you do share as many of
1660 * MediaWiki's tables may have side effects if you try to share them.
1661 *
1662 * $wgSharedPrefix is the table prefix for the shared database. It defaults to
1663 * $wgDBprefix.
1664 *
1665 * @deprecated since 1.21 In new code, use the $wiki parameter to wfGetLB() to
1666 * access remote databases. Using wfGetLB() allows the shared database to
1667 * reside on separate servers to the wiki's own database, with suitable
1668 * configuration of $wgLBFactoryConf.
1669 */
1670 $wgSharedDB = null;
1671
1672 /**
1673 * @see $wgSharedDB
1674 */
1675 $wgSharedPrefix = false;
1676
1677 /**
1678 * @see $wgSharedDB
1679 */
1680 $wgSharedTables = array( 'user', 'user_properties' );
1681
1682 /**
1683 * Database load balancer
1684 * This is a two-dimensional array, an array of server info structures
1685 * Fields are:
1686 * - host: Host name
1687 * - dbname: Default database name
1688 * - user: DB user
1689 * - password: DB password
1690 * - type: DB type
1691 *
1692 * - load: Ratio of DB_SLAVE load, must be >=0, the sum of all loads must be >0.
1693 * If this is zero for any given server, no normal query traffic will be
1694 * sent to it. It will be excluded from lag checks in maintenance scripts.
1695 * The only way it can receive traffic is if groupLoads is used.
1696 *
1697 * - groupLoads: array of load ratios, the key is the query group name. A query may belong
1698 * to several groups, the most specific group defined here is used.
1699 *
1700 * - flags: bit field
1701 * - DBO_DEFAULT -- turns on DBO_TRX only if !$wgCommandLineMode (recommended)
1702 * - DBO_DEBUG -- equivalent of $wgDebugDumpSql
1703 * - DBO_TRX -- wrap entire request in a transaction
1704 * - DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php)
1705 * - DBO_PERSISTENT -- enables persistent database connections
1706 * - DBO_SSL -- uses SSL/TLS encryption in database connections, if available
1707 * - DBO_COMPRESS -- uses internal compression in database connections,
1708 * if available
1709 *
1710 * - max lag: (optional) Maximum replication lag before a slave will taken out of rotation
1711 *
1712 * These and any other user-defined properties will be assigned to the mLBInfo member
1713 * variable of the Database object.
1714 *
1715 * Leave at false to use the single-server variables above. If you set this
1716 * variable, the single-server variables will generally be ignored (except
1717 * perhaps in some command-line scripts).
1718 *
1719 * The first server listed in this array (with key 0) will be the master. The
1720 * rest of the servers will be slaves. To prevent writes to your slaves due to
1721 * accidental misconfiguration or MediaWiki bugs, set read_only=1 on all your
1722 * slaves in my.cnf. You can set read_only mode at runtime using:
1723 *
1724 * @code
1725 * SET @@read_only=1;
1726 * @endcode
1727 *
1728 * Since the effect of writing to a slave is so damaging and difficult to clean
1729 * up, we at Wikimedia set read_only=1 in my.cnf on all our DB servers, even
1730 * our masters, and then set read_only=0 on masters at runtime.
1731 */
1732 $wgDBservers = false;
1733
1734 /**
1735 * Load balancer factory configuration
1736 * To set up a multi-master wiki farm, set the class here to something that
1737 * can return a LoadBalancer with an appropriate master on a call to getMainLB().
1738 * The class identified here is responsible for reading $wgDBservers,
1739 * $wgDBserver, etc., so overriding it may cause those globals to be ignored.
1740 *
1741 * The LBFactoryMulti class is provided for this purpose, please see
1742 * includes/db/LBFactoryMulti.php for configuration information.
1743 */
1744 $wgLBFactoryConf = array( 'class' => 'LBFactorySimple' );
1745
1746 /**
1747 * How long to wait for a slave to catch up to the master
1748 * @deprecated since 1.24
1749 */
1750 $wgMasterWaitTimeout = 10;
1751
1752 /**
1753 * File to log database errors to
1754 */
1755 $wgDBerrorLog = false;
1756
1757 /**
1758 * Timezone to use in the error log.
1759 * Defaults to the wiki timezone ($wgLocaltimezone).
1760 *
1761 * A list of usable timezones can found at:
1762 * http://php.net/manual/en/timezones.php
1763 *
1764 * @par Examples:
1765 * @code
1766 * $wgLocaltimezone = 'UTC';
1767 * $wgLocaltimezone = 'GMT';
1768 * $wgLocaltimezone = 'PST8PDT';
1769 * $wgLocaltimezone = 'Europe/Sweden';
1770 * $wgLocaltimezone = 'CET';
1771 * @endcode
1772 *
1773 * @since 1.20
1774 */
1775 $wgDBerrorLogTZ = false;
1776
1777 /**
1778 * Scale load balancer polling time so that under overload conditions, the
1779 * database server receives a SHOW STATUS query at an average interval of this
1780 * many microseconds
1781 */
1782 $wgDBAvgStatusPoll = 2000;
1783
1784 /**
1785 * Set to true to engage MySQL 4.1/5.0 charset-related features;
1786 * for now will just cause sending of 'SET NAMES=utf8' on connect.
1787 *
1788 * @warning THIS IS EXPERIMENTAL!
1789 *
1790 * May break if you're not using the table defs from mysql5/tables.sql.
1791 * May break if you're upgrading an existing wiki if set differently.
1792 * Broken symptoms likely to include incorrect behavior with page titles,
1793 * usernames, comments etc containing non-ASCII characters.
1794 * Might also cause failures on the object cache and other things.
1795 *
1796 * Even correct usage may cause failures with Unicode supplementary
1797 * characters (those not in the Basic Multilingual Plane) unless MySQL
1798 * has enhanced their Unicode support.
1799 */
1800 $wgDBmysql5 = false;
1801
1802 /**
1803 * Set true to enable Oracle DCRP (supported from 11gR1 onward)
1804 *
1805 * To use this feature set to true and use a datasource defined as
1806 * POOLED (i.e. in tnsnames definition set server=pooled in connect_data
1807 * block).
1808 *
1809 * Starting from 11gR1 you can use DCRP (Database Resident Connection
1810 * Pool) that maintains established sessions and reuses them on new
1811 * connections.
1812 *
1813 * Not completely tested, but it should fall back on normal connection
1814 * in case the pool is full or the datasource is not configured as
1815 * pooled.
1816 * And the other way around; using oci_pconnect on a non pooled
1817 * datasource should produce a normal connection.
1818 *
1819 * When it comes to frequent shortlived DB connections like with MW
1820 * Oracle tends to s***. The problem is the driver connects to the
1821 * database reasonably fast, but establishing a session takes time and
1822 * resources. MW does not rely on session state (as it does not use
1823 * features such as package variables) so establishing a valid session
1824 * is in this case an unwanted overhead that just slows things down.
1825 *
1826 * @warning EXPERIMENTAL!
1827 *
1828 */
1829 $wgDBOracleDRCP = false;
1830
1831 /**
1832 * Other wikis on this site, can be administered from a single developer
1833 * account.
1834 * Array numeric key => database name
1835 */
1836 $wgLocalDatabases = array();
1837
1838 /**
1839 * If lag is higher than $wgSlaveLagWarning, show a warning in some special
1840 * pages (like watchlist). If the lag is higher than $wgSlaveLagCritical,
1841 * show a more obvious warning.
1842 */
1843 $wgSlaveLagWarning = 10;
1844
1845 /**
1846 * @see $wgSlaveLagWarning
1847 */
1848 $wgSlaveLagCritical = 30;
1849
1850 /**
1851 * Use Windows Authentication instead of $wgDBuser / $wgDBpassword for MS SQL Server
1852 */
1853 $wgDBWindowsAuthentication = false;
1854
1855 /**@}*/ # End of DB settings }
1856
1857 /************************************************************************//**
1858 * @name Text storage
1859 * @{
1860 */
1861
1862 /**
1863 * We can also compress text stored in the 'text' table. If this is set on, new
1864 * revisions will be compressed on page save if zlib support is available. Any
1865 * compressed revisions will be decompressed on load regardless of this setting,
1866 * but will not be readable at all* if zlib support is not available.
1867 */
1868 $wgCompressRevisions = false;
1869
1870 /**
1871 * External stores allow including content
1872 * from non database sources following URL links.
1873 *
1874 * Short names of ExternalStore classes may be specified in an array here:
1875 * @code
1876 * $wgExternalStores = array("http","file","custom")...
1877 * @endcode
1878 *
1879 * CAUTION: Access to database might lead to code execution
1880 */
1881 $wgExternalStores = array();
1882
1883 /**
1884 * An array of external MySQL servers.
1885 *
1886 * @par Example:
1887 * Create a cluster named 'cluster1' containing three servers:
1888 * @code
1889 * $wgExternalServers = array(
1890 * 'cluster1' => array( 'srv28', 'srv29', 'srv30' )
1891 * );
1892 * @endcode
1893 *
1894 * Used by LBFactorySimple, may be ignored if $wgLBFactoryConf is set to
1895 * another class.
1896 */
1897 $wgExternalServers = array();
1898
1899 /**
1900 * The place to put new revisions, false to put them in the local text table.
1901 * Part of a URL, e.g. DB://cluster1
1902 *
1903 * Can be an array instead of a single string, to enable data distribution. Keys
1904 * must be consecutive integers, starting at zero.
1905 *
1906 * @par Example:
1907 * @code
1908 * $wgDefaultExternalStore = array( 'DB://cluster1', 'DB://cluster2' );
1909 * @endcode
1910 *
1911 * @var array
1912 */
1913 $wgDefaultExternalStore = false;
1914
1915 /**
1916 * Revision text may be cached in $wgMemc to reduce load on external storage
1917 * servers and object extraction overhead for frequently-loaded revisions.
1918 *
1919 * Set to 0 to disable, or number of seconds before cache expiry.
1920 */
1921 $wgRevisionCacheExpiry = 0;
1922
1923 /** @} */ # end text storage }
1924
1925 /************************************************************************//**
1926 * @name Performance hacks and limits
1927 * @{
1928 */
1929
1930 /**
1931 * Disable database-intensive features
1932 */
1933 $wgMiserMode = false;
1934
1935 /**
1936 * Disable all query pages if miser mode is on, not just some
1937 */
1938 $wgDisableQueryPages = false;
1939
1940 /**
1941 * Number of rows to cache in 'querycache' table when miser mode is on
1942 */
1943 $wgQueryCacheLimit = 1000;
1944
1945 /**
1946 * Number of links to a page required before it is deemed "wanted"
1947 */
1948 $wgWantedPagesThreshold = 1;
1949
1950 /**
1951 * Enable slow parser functions
1952 */
1953 $wgAllowSlowParserFunctions = false;
1954
1955 /**
1956 * Allow schema updates
1957 */
1958 $wgAllowSchemaUpdates = true;
1959
1960 /**
1961 * Anti-lock flags - bitfield
1962 * - ALF_NO_LINK_LOCK:
1963 * Don't use locking reads when updating the link table. This is
1964 * necessary for wikis with a high edit rate for performance
1965 * reasons, but may cause link table inconsistency
1966 */
1967 $wgAntiLockFlags = 0;
1968
1969 /**
1970 * Maximum article size in kilobytes
1971 */
1972 $wgMaxArticleSize = 2048;
1973
1974 /**
1975 * The minimum amount of memory that MediaWiki "needs"; MediaWiki will try to
1976 * raise PHP's memory limit if it's below this amount.
1977 */
1978 $wgMemoryLimit = "50M";
1979
1980 /** @} */ # end performance hacks }
1981
1982 /************************************************************************//**
1983 * @name Cache settings
1984 * @{
1985 */
1986
1987 /**
1988 * Directory for caching data in the local filesystem. Should not be accessible
1989 * from the web. Set this to false to not use any local caches.
1990 *
1991 * Note: if multiple wikis share the same localisation cache directory, they
1992 * must all have the same set of extensions. You can set a directory just for
1993 * the localisation cache using $wgLocalisationCacheConf['storeDirectory'].
1994 */
1995 $wgCacheDirectory = false;
1996
1997 /**
1998 * Main cache type. This should be a cache with fast access, but it may have
1999 * limited space. By default, it is disabled, since the database is not fast
2000 * enough to make it worthwhile.
2001 *
2002 * The options are:
2003 *
2004 * - CACHE_ANYTHING: Use anything, as long as it works
2005 * - CACHE_NONE: Do not cache
2006 * - CACHE_DB: Store cache objects in the DB
2007 * - CACHE_MEMCACHED: MemCached, must specify servers in $wgMemCachedServers
2008 * - CACHE_ACCEL: APC, XCache or WinCache
2009 * - (other): A string may be used which identifies a cache
2010 * configuration in $wgObjectCaches.
2011 *
2012 * @see $wgMessageCacheType, $wgParserCacheType
2013 */
2014 $wgMainCacheType = CACHE_NONE;
2015
2016 /**
2017 * The cache type for storing the contents of the MediaWiki namespace. This
2018 * cache is used for a small amount of data which is expensive to regenerate.
2019 *
2020 * For available types see $wgMainCacheType.
2021 */
2022 $wgMessageCacheType = CACHE_ANYTHING;
2023
2024 /**
2025 * The cache type for storing article HTML. This is used to store data which
2026 * is expensive to regenerate, and benefits from having plenty of storage space.
2027 *
2028 * For available types see $wgMainCacheType.
2029 */
2030 $wgParserCacheType = CACHE_ANYTHING;
2031
2032 /**
2033 * The cache type for storing session data. Used if $wgSessionsInObjectCache is true.
2034 *
2035 * For available types see $wgMainCacheType.
2036 */
2037 $wgSessionCacheType = CACHE_ANYTHING;
2038
2039 /**
2040 * The cache type for storing language conversion tables,
2041 * which are used when parsing certain text and interface messages.
2042 *
2043 * For available types see $wgMainCacheType.
2044 *
2045 * @since 1.20
2046 */
2047 $wgLanguageConverterCacheType = CACHE_ANYTHING;
2048
2049 /**
2050 * Advanced object cache configuration.
2051 *
2052 * Use this to define the class names and constructor parameters which are used
2053 * for the various cache types. Custom cache types may be defined here and
2054 * referenced from $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType,
2055 * or $wgLanguageConverterCacheType.
2056 *
2057 * The format is an associative array where the key is a cache identifier, and
2058 * the value is an associative array of parameters. The "class" parameter is the
2059 * class name which will be used. Alternatively, a "factory" parameter may be
2060 * given, giving a callable function which will generate a suitable cache object.
2061 */
2062 $wgObjectCaches = array(
2063 CACHE_NONE => array( 'class' => 'EmptyBagOStuff' ),
2064 CACHE_DB => array( 'class' => 'SqlBagOStuff', 'table' => 'objectcache' ),
2065
2066 CACHE_ANYTHING => array( 'factory' => 'ObjectCache::newAnything' ),
2067 CACHE_ACCEL => array( 'factory' => 'ObjectCache::newAccelerator' ),
2068 CACHE_MEMCACHED => array( 'factory' => 'ObjectCache::newMemcached' ),
2069
2070 'apc' => array( 'class' => 'APCBagOStuff' ),
2071 'xcache' => array( 'class' => 'XCacheBagOStuff' ),
2072 'wincache' => array( 'class' => 'WinCacheBagOStuff' ),
2073 'memcached-php' => array( 'class' => 'MemcachedPhpBagOStuff' ),
2074 'memcached-pecl' => array( 'class' => 'MemcachedPeclBagOStuff' ),
2075 'hash' => array( 'class' => 'HashBagOStuff' ),
2076 );
2077
2078 /**
2079 * The expiry time for the parser cache, in seconds.
2080 * The default is 86400 (one day).
2081 */
2082 $wgParserCacheExpireTime = 86400;
2083
2084 /**
2085 * Deprecated alias for $wgSessionsInObjectCache.
2086 *
2087 * @deprecated since 1.20; Use $wgSessionsInObjectCache
2088 */
2089 $wgSessionsInMemcached = false;
2090
2091 /**
2092 * Store sessions in an object cache, configured by $wgSessionCacheType. This
2093 * can be useful to improve performance, or to avoid the locking behavior of
2094 * PHP's default session handler, which tends to prevent multiple requests for
2095 * the same user from acting concurrently.
2096 */
2097 $wgSessionsInObjectCache = false;
2098
2099 /**
2100 * The expiry time to use for session storage when $wgSessionsInObjectCache is
2101 * enabled, in seconds.
2102 */
2103 $wgObjectCacheSessionExpiry = 3600;
2104
2105 /**
2106 * This is used for setting php's session.save_handler. In practice, you will
2107 * almost never need to change this ever. Other options might be 'user' or
2108 * 'session_mysql.' Setting to null skips setting this entirely (which might be
2109 * useful if you're doing cross-application sessions, see bug 11381)
2110 */
2111 $wgSessionHandler = null;
2112
2113 /**
2114 * If enabled, will send MemCached debugging information to $wgDebugLogFile
2115 */
2116 $wgMemCachedDebug = false;
2117
2118 /**
2119 * The list of MemCached servers and port numbers
2120 */
2121 $wgMemCachedServers = array( '127.0.0.1:11211' );
2122
2123 /**
2124 * Use persistent connections to MemCached, which are shared across multiple
2125 * requests.
2126 */
2127 $wgMemCachedPersistent = false;
2128
2129 /**
2130 * Read/write timeout for MemCached server communication, in microseconds.
2131 */
2132 $wgMemCachedTimeout = 500000;
2133
2134 /**
2135 * Set this to true to make a local copy of the message cache, for use in
2136 * addition to memcached. The files will be put in $wgCacheDirectory.
2137 */
2138 $wgUseLocalMessageCache = false;
2139
2140 /**
2141 * Instead of caching everything, only cache those messages which have
2142 * been customised in the site content language. This means that
2143 * MediaWiki:Foo/ja is ignored if MediaWiki:Foo doesn't exist.
2144 * This option is probably only useful for translatewiki.net.
2145 */
2146 $wgAdaptiveMessageCache = false;
2147
2148 /**
2149 * Localisation cache configuration. Associative array with keys:
2150 * class: The class to use. May be overridden by extensions.
2151 *
2152 * store: The location to store cache data. May be 'files', 'db' or
2153 * 'detect'. If set to "files", data will be in CDB files. If set
2154 * to "db", data will be stored to the database. If set to
2155 * "detect", files will be used if $wgCacheDirectory is set,
2156 * otherwise the database will be used.
2157 *
2158 * storeClass: The class name for the underlying storage. If set to a class
2159 * name, it overrides the "store" setting.
2160 *
2161 * storeDirectory: If the store class puts its data in files, this is the
2162 * directory it will use. If this is false, $wgCacheDirectory
2163 * will be used.
2164 *
2165 * manualRecache: Set this to true to disable cache updates on web requests.
2166 * Use maintenance/rebuildLocalisationCache.php instead.
2167 */
2168 $wgLocalisationCacheConf = array(
2169 'class' => 'LocalisationCache',
2170 'store' => 'detect',
2171 'storeClass' => false,
2172 'storeDirectory' => false,
2173 'manualRecache' => false,
2174 );
2175
2176 /**
2177 * Allow client-side caching of pages
2178 */
2179 $wgCachePages = true;
2180
2181 /**
2182 * Set this to current time to invalidate all prior cached pages. Affects both
2183 * client-side and server-side caching.
2184 * You can get the current date on your server by using the command:
2185 * @verbatim
2186 * date +%Y%m%d%H%M%S
2187 * @endverbatim
2188 */
2189 $wgCacheEpoch = '20030516000000';
2190
2191 /**
2192 * Directory where GitInfo will look for pre-computed cache files. If false,
2193 * $wgCacheDirectory/gitinfo will be used.
2194 */
2195 $wgGitInfoCacheDirectory = false;
2196
2197 /**
2198 * Bump this number when changing the global style sheets and JavaScript.
2199 *
2200 * It should be appended in the query string of static CSS and JS includes,
2201 * to ensure that client-side caches do not keep obsolete copies of global
2202 * styles.
2203 */
2204 $wgStyleVersion = '303';
2205
2206 /**
2207 * This will cache static pages for non-logged-in users to reduce
2208 * database traffic on public sites.
2209 * Automatically sets $wgShowIPinHeader = false
2210 * ResourceLoader requests to default language and skins are cached
2211 * as well as single module requests.
2212 */
2213 $wgUseFileCache = false;
2214
2215 /**
2216 * Depth of the subdirectory hierarchy to be created under
2217 * $wgFileCacheDirectory. The subdirectories will be named based on
2218 * the MD5 hash of the title. A value of 0 means all cache files will
2219 * be put directly into the main file cache directory.
2220 */
2221 $wgFileCacheDepth = 2;
2222
2223 /**
2224 * Keep parsed pages in a cache (objectcache table or memcached)
2225 * to speed up output of the same page viewed by another user with the
2226 * same options.
2227 *
2228 * This can provide a significant speedup for medium to large pages,
2229 * so you probably want to keep it on. Extensions that conflict with the
2230 * parser cache should disable the cache on a per-page basis instead.
2231 */
2232 $wgEnableParserCache = true;
2233
2234 /**
2235 * Append a configured value to the parser cache and the sitenotice key so
2236 * that they can be kept separate for some class of activity.
2237 */
2238 $wgRenderHashAppend = '';
2239
2240 /**
2241 * If on, the sidebar navigation links are cached for users with the
2242 * current language set. This can save a touch of load on a busy site
2243 * by shaving off extra message lookups.
2244 *
2245 * However it is also fragile: changing the site configuration, or
2246 * having a variable $wgArticlePath, can produce broken links that
2247 * don't update as expected.
2248 */
2249 $wgEnableSidebarCache = false;
2250
2251 /**
2252 * Expiry time for the sidebar cache, in seconds
2253 */
2254 $wgSidebarCacheExpiry = 86400;
2255
2256 /**
2257 * When using the file cache, we can store the cached HTML gzipped to save disk
2258 * space. Pages will then also be served compressed to clients that support it.
2259 *
2260 * Requires zlib support enabled in PHP.
2261 */
2262 $wgUseGzip = false;
2263
2264 /**
2265 * Whether MediaWiki should send an ETag header. Seems to cause
2266 * broken behavior with Squid 2.6, see bug 7098.
2267 */
2268 $wgUseETag = false;
2269
2270 /**
2271 * Clock skew or the one-second resolution of time() can occasionally cause cache
2272 * problems when the user requests two pages within a short period of time. This
2273 * variable adds a given number of seconds to vulnerable timestamps, thereby giving
2274 * a grace period.
2275 */
2276 $wgClockSkewFudge = 5;
2277
2278 /**
2279 * Invalidate various caches when LocalSettings.php changes. This is equivalent
2280 * to setting $wgCacheEpoch to the modification time of LocalSettings.php, as
2281 * was previously done in the default LocalSettings.php file.
2282 *
2283 * On high-traffic wikis, this should be set to false, to avoid the need to
2284 * check the file modification time, and to avoid the performance impact of
2285 * unnecessary cache invalidations.
2286 */
2287 $wgInvalidateCacheOnLocalSettingsChange = true;
2288
2289 /** @} */ # end of cache settings
2290
2291 /************************************************************************//**
2292 * @name HTTP proxy (Squid) settings
2293 *
2294 * Many of these settings apply to any HTTP proxy used in front of MediaWiki,
2295 * although they are referred to as Squid settings for historical reasons.
2296 *
2297 * Achieving a high hit ratio with an HTTP proxy requires special
2298 * configuration. See https://www.mediawiki.org/wiki/Manual:Squid_caching for
2299 * more details.
2300 *
2301 * @{
2302 */
2303
2304 /**
2305 * Enable/disable Squid.
2306 * See https://www.mediawiki.org/wiki/Manual:Squid_caching
2307 */
2308 $wgUseSquid = false;
2309
2310 /**
2311 * If you run Squid3 with ESI support, enable this (default:false):
2312 */
2313 $wgUseESI = false;
2314
2315 /**
2316 * Send X-Vary-Options header for better caching (requires patched Squid)
2317 */
2318 $wgUseXVO = false;
2319
2320 /**
2321 * Add X-Forwarded-Proto to the Vary and X-Vary-Options headers for API
2322 * requests and RSS/Atom feeds. Use this if you have an SSL termination setup
2323 * and need to split the cache between HTTP and HTTPS for API requests,
2324 * feed requests and HTTP redirect responses in order to prevent cache
2325 * pollution. This does not affect 'normal' requests to index.php other than
2326 * HTTP redirects.
2327 */
2328 $wgVaryOnXFP = false;
2329
2330 /**
2331 * Internal server name as known to Squid, if different.
2332 *
2333 * @par Example:
2334 * @code
2335 * $wgInternalServer = 'http://yourinternal.tld:8000';
2336 * @endcode
2337 */
2338 $wgInternalServer = false;
2339
2340 /**
2341 * Cache timeout for the squid, will be sent as s-maxage (without ESI) or
2342 * Surrogate-Control (with ESI). Without ESI, you should strip out s-maxage in
2343 * the Squid config. 18000 seconds = 5 hours, more cache hits with 2678400 = 31
2344 * days
2345 */
2346 $wgSquidMaxage = 18000;
2347
2348 /**
2349 * Default maximum age for raw CSS/JS accesses
2350 */
2351 $wgForcedRawSMaxage = 300;
2352
2353 /**
2354 * List of proxy servers to purge on changes; default port is 80. Use IP addresses.
2355 *
2356 * When MediaWiki is running behind a proxy, it will trust X-Forwarded-For
2357 * headers sent/modified from these proxies when obtaining the remote IP address
2358 *
2359 * For a list of trusted servers which *aren't* purged, see $wgSquidServersNoPurge.
2360 */
2361 $wgSquidServers = array();
2362
2363 /**
2364 * As above, except these servers aren't purged on page changes; use to set a
2365 * list of trusted proxies, etc. Supports both individual IP addresses and
2366 * CIDR blocks.
2367 * @since 1.23 Supports CIDR ranges
2368 */
2369 $wgSquidServersNoPurge = array();
2370
2371 /**
2372 * Maximum number of titles to purge in any one client operation
2373 */
2374 $wgMaxSquidPurgeTitles = 400;
2375
2376 /**
2377 * Whether to use a Host header in purge requests sent to the proxy servers
2378 * configured in $wgSquidServers. Set this to false to support Squid
2379 * configured in forward-proxy mode.
2380 *
2381 * If this is set to true, a Host header will be sent, and only the path
2382 * component of the URL will appear on the request line, as if the request
2383 * were a non-proxy HTTP 1.1 request. Varnish only supports this style of
2384 * request. Squid supports this style of request only if reverse-proxy mode
2385 * (http_port ... accel) is enabled.
2386 *
2387 * If this is set to false, no Host header will be sent, and the absolute URL
2388 * will be sent in the request line, as is the standard for an HTTP proxy
2389 * request in both HTTP 1.0 and 1.1. This style of request is not supported
2390 * by Varnish, but is supported by Squid in either configuration (forward or
2391 * reverse).
2392 *
2393 * @since 1.21
2394 */
2395 $wgSquidPurgeUseHostHeader = true;
2396
2397 /**
2398 * Routing configuration for HTCP multicast purging. Add elements here to
2399 * enable HTCP and determine which purges are sent where. If set to an empty
2400 * array, HTCP is disabled.
2401 *
2402 * Each key in this array is a regular expression to match against the purged
2403 * URL, or an empty string to match all URLs. The purged URL is matched against
2404 * the regexes in the order specified, and the first rule whose regex matches
2405 * is used, all remaining rules will thus be ignored.
2406 *
2407 * @par Example configuration to send purges for upload.wikimedia.org to one
2408 * multicast group and all other purges to another:
2409 * @code
2410 * $wgHTCPRouting = array(
2411 * '|^https?://upload\.wikimedia\.org|' => array(
2412 * 'host' => '239.128.0.113',
2413 * 'port' => 4827,
2414 * ),
2415 * '' => array(
2416 * 'host' => '239.128.0.112',
2417 * 'port' => 4827,
2418 * ),
2419 * );
2420 * @endcode
2421 *
2422 * You can also pass an array of hosts to send purges too. This is useful when
2423 * you have several multicast groups or unicast address that should receive a
2424 * given purge. Multiple hosts support was introduced in MediaWiki 1.22.
2425 *
2426 * @par Example of sending purges to multiple hosts:
2427 * @code
2428 * $wgHTCPRouting = array(
2429 * '' => array(
2430 * // Purges to text caches using multicast
2431 * array( 'host' => '239.128.0.114', 'port' => '4827' ),
2432 * // Purges to a hardcoded list of caches
2433 * array( 'host' => '10.88.66.1', 'port' => '4827' ),
2434 * array( 'host' => '10.88.66.2', 'port' => '4827' ),
2435 * array( 'host' => '10.88.66.3', 'port' => '4827' ),
2436 * ),
2437 * );
2438 * @endcode
2439 *
2440 * @since 1.22
2441 *
2442 * $wgHTCPRouting replaces $wgHTCPMulticastRouting that was introduced in 1.20.
2443 * For back compatibility purposes, whenever its array is empty
2444 * $wgHTCPMutlicastRouting will be used as a fallback if it not null.
2445 *
2446 * @see $wgHTCPMulticastTTL
2447 */
2448 $wgHTCPRouting = array();
2449
2450 /**
2451 * HTCP multicast TTL.
2452 * @see $wgHTCPRouting
2453 */
2454 $wgHTCPMulticastTTL = 1;
2455
2456 /**
2457 * Should forwarded Private IPs be accepted?
2458 */
2459 $wgUsePrivateIPs = false;
2460
2461 /** @} */ # end of HTTP proxy settings
2462
2463 /************************************************************************//**
2464 * @name Language, regional and character encoding settings
2465 * @{
2466 */
2467
2468 /**
2469 * Site language code. See languages/Names.php for languages supported by
2470 * MediaWiki out of the box. Not all languages listed there have translations,
2471 * see languages/messages/ for the list of languages with some localisation.
2472 *
2473 * Warning: Don't use language codes listed in $wgDummyLanguageCodes like "no"
2474 * for Norwegian (use "nb" instead), or things will break unexpectedly.
2475 *
2476 * This defines the default interface language for all users, but users can
2477 * change it in their preferences.
2478 *
2479 * This also defines the language of pages in the wiki. The content is wrapped
2480 * in a html element with lang=XX attribute. This behavior can be overridden
2481 * via hooks, see Title::getPageLanguage.
2482 */
2483 $wgLanguageCode = 'en';
2484
2485 /**
2486 * Language cache size, or really how many languages can we handle
2487 * simultaneously without degrading to crawl speed.
2488 */
2489 $wgLangObjCacheSize = 10;
2490
2491 /**
2492 * Some languages need different word forms, usually for different cases.
2493 * Used in Language::convertGrammar().
2494 *
2495 * @par Example:
2496 * @code
2497 * $wgGrammarForms['en']['genitive']['car'] = 'car\'s';
2498 * @endcode
2499 */
2500 $wgGrammarForms = array();
2501
2502 /**
2503 * Treat language links as magic connectors, not inline links
2504 */
2505 $wgInterwikiMagic = true;
2506
2507 /**
2508 * Hide interlanguage links from the sidebar
2509 */
2510 $wgHideInterlanguageLinks = false;
2511
2512 /**
2513 * List of additional interwiki prefixes that should be treated as
2514 * interlanguage links (i.e. placed in the sidebar).
2515 * Notes:
2516 * - This will not do anything unless the prefixes are defined in the interwiki
2517 * map.
2518 * - The display text for these custom interlanguage links will be fetched from
2519 * the system message "interlanguage-link-xyz" where xyz is the prefix in
2520 * this array.
2521 * - A friendly name for each site, used for tooltip text, may optionally be
2522 * placed in the system message "interlanguage-link-sitename-xyz" where xyz is
2523 * the prefix in this array.
2524 */
2525 $wgExtraInterlanguageLinkPrefixes = array();
2526
2527 /**
2528 * List of language names or overrides for default names in Names.php
2529 */
2530 $wgExtraLanguageNames = array();
2531
2532 /**
2533 * List of language codes that don't correspond to an actual language.
2534 * These codes are mostly left-offs from renames, or other legacy things.
2535 * This array makes them not appear as a selectable language on the installer,
2536 * and excludes them when running the transstat.php script.
2537 */
2538 $wgDummyLanguageCodes = array(
2539 'als' => 'gsw',
2540 'bat-smg' => 'sgs',
2541 'be-x-old' => 'be-tarask',
2542 'bh' => 'bho',
2543 'fiu-vro' => 'vro',
2544 'no' => 'nb',
2545 'qqq' => 'qqq', # Used for message documentation.
2546 'qqx' => 'qqx', # Used for viewing message keys.
2547 'roa-rup' => 'rup',
2548 'simple' => 'en',
2549 'zh-classical' => 'lzh',
2550 'zh-min-nan' => 'nan',
2551 'zh-yue' => 'yue',
2552 );
2553
2554 /**
2555 * Character set for use in the article edit box. Language-specific encodings
2556 * may be defined.
2557 *
2558 * This historic feature is one of the first that was added by former MediaWiki
2559 * team leader Brion Vibber, and is used to support the Esperanto x-system.
2560 */
2561 $wgEditEncoding = '';
2562
2563 /**
2564 * Set this to true to replace Arabic presentation forms with their standard
2565 * forms in the U+0600-U+06FF block. This only works if $wgLanguageCode is
2566 * set to "ar".
2567 *
2568 * Note that pages with titles containing presentation forms will become
2569 * inaccessible, run maintenance/cleanupTitles.php to fix this.
2570 */
2571 $wgFixArabicUnicode = true;
2572
2573 /**
2574 * Set this to true to replace ZWJ-based chillu sequences in Malayalam text
2575 * with their Unicode 5.1 equivalents. This only works if $wgLanguageCode is
2576 * set to "ml". Note that some clients (even new clients as of 2010) do not
2577 * support these characters.
2578 *
2579 * If you enable this on an existing wiki, run maintenance/cleanupTitles.php to
2580 * fix any ZWJ sequences in existing page titles.
2581 */
2582 $wgFixMalayalamUnicode = true;
2583
2584 /**
2585 * Set this to always convert certain Unicode sequences to modern ones
2586 * regardless of the content language. This has a small performance
2587 * impact.
2588 *
2589 * See $wgFixArabicUnicode and $wgFixMalayalamUnicode for conversion
2590 * details.
2591 *
2592 * @since 1.17
2593 */
2594 $wgAllUnicodeFixes = false;
2595
2596 /**
2597 * Set this to eg 'ISO-8859-1' to perform character set conversion when
2598 * loading old revisions not marked with "utf-8" flag. Use this when
2599 * converting a wiki from MediaWiki 1.4 or earlier to UTF-8 without the
2600 * burdensome mass conversion of old text data.
2601 *
2602 * @note This DOES NOT touch any fields other than old_text. Titles, comments,
2603 * user names, etc still must be converted en masse in the database before
2604 * continuing as a UTF-8 wiki.
2605 */
2606 $wgLegacyEncoding = false;
2607
2608 /**
2609 * Browser Blacklist for unicode non compliant browsers. Contains a list of
2610 * regexps : "/regexp/" matching problematic browsers. These browsers will
2611 * be served encoded unicode in the edit box instead of real unicode.
2612 */
2613 $wgBrowserBlackList = array(
2614 /**
2615 * Netscape 2-4 detection
2616 * The minor version may contain strings such as "Gold" or "SGoldC-SGI"
2617 * Lots of non-netscape user agents have "compatible", so it's useful to check for that
2618 * with a negative assertion. The [UIN] identifier specifies the level of security
2619 * in a Netscape/Mozilla browser, checking for it rules out a number of fakers.
2620 * The language string is unreliable, it is missing on NS4 Mac.
2621 *
2622 * Reference: http://www.psychedelix.com/agents/index.shtml
2623 */
2624 '/^Mozilla\/2\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
2625 '/^Mozilla\/3\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
2626 '/^Mozilla\/4\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
2627
2628 /**
2629 * MSIE on Mac OS 9 is teh sux0r, converts þ to <thorn>, ð to <eth>,
2630 * Þ to <THORN> and Ð to <ETH>
2631 *
2632 * Known useragents:
2633 * - Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)
2634 * - Mozilla/4.0 (compatible; MSIE 5.15; Mac_PowerPC)
2635 * - Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)
2636 * - [...]
2637 *
2638 * @link http://en.wikipedia.org/w/index.php?diff=12356041&oldid=12355864
2639 * @link http://en.wikipedia.org/wiki/Template%3AOS9
2640 */
2641 '/^Mozilla\/4\.0 \(compatible; MSIE \d+\.\d+; Mac_PowerPC\)/',
2642
2643 /**
2644 * Google wireless transcoder, seems to eat a lot of chars alive
2645 * http://it.wikipedia.org/w/index.php?title=Luciano_Ligabue&diff=prev&oldid=8857361
2646 */
2647 '/^Mozilla\/4\.0 \(compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder;\)/'
2648 );
2649
2650 /**
2651 * If set to true, the MediaWiki 1.4 to 1.5 schema conversion will
2652 * create stub reference rows in the text table instead of copying
2653 * the full text of all current entries from 'cur' to 'text'.
2654 *
2655 * This will speed up the conversion step for large sites, but
2656 * requires that the cur table be kept around for those revisions
2657 * to remain viewable.
2658 *
2659 * This option affects the updaters *only*. Any present cur stub
2660 * revisions will be readable at runtime regardless of this setting.
2661 */
2662 $wgLegacySchemaConversion = false;
2663
2664 /**
2665 * Enable dates like 'May 12' instead of '12 May', this only takes effect if
2666 * the interface is set to English.
2667 */
2668 $wgAmericanDates = false;
2669
2670 /**
2671 * For Hindi and Arabic use local numerals instead of Western style (0-9)
2672 * numerals in interface.
2673 */
2674 $wgTranslateNumerals = true;
2675
2676 /**
2677 * Translation using MediaWiki: namespace.
2678 * Interface messages will be loaded from the database.
2679 */
2680 $wgUseDatabaseMessages = true;
2681
2682 /**
2683 * Expiry time for the message cache key
2684 */
2685 $wgMsgCacheExpiry = 86400;
2686
2687 /**
2688 * Maximum entry size in the message cache, in bytes
2689 */
2690 $wgMaxMsgCacheEntrySize = 10000;
2691
2692 /**
2693 * Whether to enable language variant conversion.
2694 */
2695 $wgDisableLangConversion = false;
2696
2697 /**
2698 * Whether to enable language variant conversion for links.
2699 */
2700 $wgDisableTitleConversion = false;
2701
2702 /**
2703 * Whether to enable canonical language links in meta data.
2704 */
2705 $wgCanonicalLanguageLinks = true;
2706
2707 /**
2708 * Default variant code, if false, the default will be the language code
2709 */
2710 $wgDefaultLanguageVariant = false;
2711
2712 /**
2713 * Disabled variants array of language variant conversion.
2714 *
2715 * @par Example:
2716 * @code
2717 * $wgDisabledVariants[] = 'zh-mo';
2718 * $wgDisabledVariants[] = 'zh-my';
2719 * @endcode
2720 */
2721 $wgDisabledVariants = array();
2722
2723 /**
2724 * Like $wgArticlePath, but on multi-variant wikis, this provides a
2725 * path format that describes which parts of the URL contain the
2726 * language variant.
2727 *
2728 * @par Example:
2729 * @code
2730 * $wgLanguageCode = 'sr';
2731 * $wgVariantArticlePath = '/$2/$1';
2732 * $wgArticlePath = '/wiki/$1';
2733 * @endcode
2734 *
2735 * A link to /wiki/ would be redirected to /sr/Главна_страна
2736 *
2737 * It is important that $wgArticlePath not overlap with possible values
2738 * of $wgVariantArticlePath.
2739 */
2740 $wgVariantArticlePath = false;
2741
2742 /**
2743 * Show a bar of language selection links in the user login and user
2744 * registration forms; edit the "loginlanguagelinks" message to
2745 * customise these.
2746 */
2747 $wgLoginLanguageSelector = false;
2748
2749 /**
2750 * When translating messages with wfMessage(), it is not always clear what
2751 * should be considered UI messages and what should be content messages.
2752 *
2753 * For example, for the English Wikipedia, there should be only one 'mainpage',
2754 * so when getting the link for 'mainpage', we should treat it as site content
2755 * and call ->inContentLanguage()->text(), but for rendering the text of the
2756 * link, we call ->text(). The code behaves this way by default. However,
2757 * sites like the Wikimedia Commons do offer different versions of 'mainpage'
2758 * and the like for different languages. This array provides a way to override
2759 * the default behavior.
2760 *
2761 * @par Example:
2762 * To allow language-specific main page and community
2763 * portal:
2764 * @code
2765 * $wgForceUIMsgAsContentMsg = array( 'mainpage', 'portal-url' );
2766 * @endcode
2767 */
2768 $wgForceUIMsgAsContentMsg = array();
2769
2770 /**
2771 * Fake out the timezone that the server thinks it's in. This will be used for
2772 * date display and not for what's stored in the DB. Leave to null to retain
2773 * your server's OS-based timezone value.
2774 *
2775 * This variable is currently used only for signature formatting and for local
2776 * time/date parser variables ({{LOCALTIME}} etc.)
2777 *
2778 * Timezones can be translated by editing MediaWiki messages of type
2779 * timezone-nameinlowercase like timezone-utc.
2780 *
2781 * A list of usable timezones can found at:
2782 * http://php.net/manual/en/timezones.php
2783 *
2784 * @par Examples:
2785 * @code
2786 * $wgLocaltimezone = 'UTC';
2787 * $wgLocaltimezone = 'GMT';
2788 * $wgLocaltimezone = 'PST8PDT';
2789 * $wgLocaltimezone = 'Europe/Sweden';
2790 * $wgLocaltimezone = 'CET';
2791 * @endcode
2792 */
2793 $wgLocaltimezone = null;
2794
2795 /**
2796 * Set an offset from UTC in minutes to use for the default timezone setting
2797 * for anonymous users and new user accounts.
2798 *
2799 * This setting is used for most date/time displays in the software, and is
2800 * overridable in user preferences. It is *not* used for signature timestamps.
2801 *
2802 * By default, this will be set to match $wgLocaltimezone.
2803 */
2804 $wgLocalTZoffset = null;
2805
2806 /** @} */ # End of language/charset settings
2807
2808 /*************************************************************************//**
2809 * @name Output format and skin settings
2810 * @{
2811 */
2812
2813 /**
2814 * The default Content-Type header.
2815 */
2816 $wgMimeType = 'text/html';
2817
2818 /**
2819 * Previously used as content type in HTML script tags. This is now ignored since
2820 * HTML5 doesn't require a MIME type for script tags (javascript is the default).
2821 * It was also previously used by RawAction to determine the ctype query parameter
2822 * value that will result in a javascript response.
2823 * @deprecated since 1.22
2824 */
2825 $wgJsMimeType = null;
2826
2827 /**
2828 * The default xmlns attribute. The option to define this has been removed.
2829 * The value of this variable is no longer used by core and is set to a fixed
2830 * value in Setup.php for compatibility with extensions that depend on the value
2831 * of this variable being set. Such a dependency however is deprecated.
2832 * @deprecated since 1.22
2833 */
2834 $wgXhtmlDefaultNamespace = null;
2835
2836 /**
2837 * Previously used to determine if we should output an HTML5 doctype.
2838 * This is no longer used as we always output HTML5 now. For compatibility with
2839 * extensions that still check the value of this config it's value is now forced
2840 * to true by Setup.php.
2841 * @deprecated since 1.22
2842 */
2843 $wgHtml5 = true;
2844
2845 /**
2846 * Defines the value of the version attribute in the &lt;html&gt; tag, if any.
2847 * If $wgAllowRdfaAttributes is true, and this evaluates to boolean false
2848 * (like if it's left at the default null value), it will be auto-initialized
2849 * to the correct value for RDFa+HTML5. As such, you should have no reason to
2850 * ever actually set this to anything.
2851 */
2852 $wgHtml5Version = null;
2853
2854 /**
2855 * Temporary variable that allows HTMLForms to be rendered as tables.
2856 * Table based layouts cause various issues when designing for mobile.
2857 * This global allows skins or extensions a means to force non-table based rendering.
2858 * Setting to false forces form components to always render as div elements.
2859 * @since 1.24
2860 */
2861 $wgHTMLFormAllowTableFormat = true;
2862
2863 /**
2864 * Temporary variable that applies MediaWiki UI wherever it can be supported.
2865 * Temporary variable that should be removed when mediawiki ui is more
2866 * stable and change has been communicated.
2867 * @since 1.24
2868 */
2869 $wgUseMediaWikiUIEverywhere = false;
2870
2871 /**
2872 * Enabled RDFa attributes for use in wikitext.
2873 * NOTE: Interaction with HTML5 is somewhat underspecified.
2874 */
2875 $wgAllowRdfaAttributes = false;
2876
2877 /**
2878 * Enabled HTML5 microdata attributes for use in wikitext.
2879 */
2880 $wgAllowMicrodataAttributes = false;
2881
2882 /**
2883 * Should we try to make our HTML output well-formed XML? If set to false,
2884 * output will be a few bytes shorter, and the HTML will arguably be more
2885 * readable. If set to true, life will be much easier for the authors of
2886 * screen-scraping bots, and the HTML will arguably be more readable.
2887 *
2888 * Setting this to false may omit quotation marks on some attributes, omit
2889 * slashes from some self-closing tags, omit some ending tags, etc., where
2890 * permitted by HTML5. Setting it to true will not guarantee that all pages
2891 * will be well-formed, although non-well-formed pages should be rare and it's
2892 * a bug if you find one. Conversely, setting it to false doesn't mean that
2893 * all XML-y constructs will be omitted, just that they might be.
2894 *
2895 * Because of compatibility with screen-scraping bots, and because it's
2896 * controversial, this is currently left to true by default.
2897 */
2898 $wgWellFormedXml = true;
2899
2900 /**
2901 * Permit other namespaces in addition to the w3.org default.
2902 *
2903 * Use the prefix for the key and the namespace for the value.
2904 *
2905 * @par Example:
2906 * @code
2907 * $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg';
2908 * @endcode
2909 * Normally we wouldn't have to define this in the root "<html>"
2910 * element, but IE needs it there in some circumstances.
2911 *
2912 * This is ignored if $wgMimeType is set to a non-XML MIME type.
2913 */
2914 $wgXhtmlNamespaces = array();
2915
2916 /**
2917 * Show IP address, for non-logged in users. It's necessary to switch this off
2918 * for some forms of caching.
2919 * @warning Will disable file cache.
2920 */
2921 $wgShowIPinHeader = true;
2922
2923 /**
2924 * Site notice shown at the top of each page
2925 *
2926 * MediaWiki:Sitenotice page, which will override this. You can also
2927 * provide a separate message for logged-out users using the
2928 * MediaWiki:Anonnotice page.
2929 */
2930 $wgSiteNotice = '';
2931
2932 /**
2933 * If this is set, a "donate" link will appear in the sidebar. Set it to a URL.
2934 */
2935 $wgSiteSupportPage = '';
2936
2937 /**
2938 * Validate the overall output using tidy and refuse
2939 * to display the page if it's not valid.
2940 */
2941 $wgValidateAllHtml = false;
2942
2943 /**
2944 * Default skin, for new users and anonymous visitors. Registered users may
2945 * change this to any one of the other available skins in their preferences.
2946 */
2947 $wgDefaultSkin = 'vector';
2948
2949 /**
2950 * Fallback skin used when the skin defined by $wgDefaultSkin can't be found.
2951 *
2952 * @since 1.24
2953 */
2954 $wgFallbackSkin = 'fallback';
2955
2956 /**
2957 * Specify the names of skins that should not be presented in the list of
2958 * available skins in user preferences. If you want to remove a skin entirely,
2959 * remove it from the skins/ directory and its entry from LocalSettings.php.
2960 */
2961 $wgSkipSkins = array();
2962
2963 /**
2964 * @deprecated since 1.23; use $wgSkipSkins instead
2965 */
2966 $wgSkipSkin = '';
2967
2968 /**
2969 * Allow user Javascript page?
2970 * This enables a lot of neat customizations, but may
2971 * increase security risk to users and server load.
2972 */
2973 $wgAllowUserJs = false;
2974
2975 /**
2976 * Allow user Cascading Style Sheets (CSS)?
2977 * This enables a lot of neat customizations, but may
2978 * increase security risk to users and server load.
2979 */
2980 $wgAllowUserCss = false;
2981
2982 /**
2983 * Allow user-preferences implemented in CSS?
2984 * This allows users to customise the site appearance to a greater
2985 * degree; disabling it will improve page load times.
2986 */
2987 $wgAllowUserCssPrefs = true;
2988
2989 /**
2990 * Use the site's Javascript page?
2991 */
2992 $wgUseSiteJs = true;
2993
2994 /**
2995 * Use the site's Cascading Style Sheets (CSS)?
2996 */
2997 $wgUseSiteCss = true;
2998
2999 /**
3000 * Break out of framesets. This can be used to prevent clickjacking attacks,
3001 * or to prevent external sites from framing your site with ads.
3002 */
3003 $wgBreakFrames = false;
3004
3005 /**
3006 * The X-Frame-Options header to send on pages sensitive to clickjacking
3007 * attacks, such as edit pages. This prevents those pages from being displayed
3008 * in a frame or iframe. The options are:
3009 *
3010 * - 'DENY': Do not allow framing. This is recommended for most wikis.
3011 *
3012 * - 'SAMEORIGIN': Allow framing by pages on the same domain. This can be used
3013 * to allow framing within a trusted domain. This is insecure if there
3014 * is a page on the same domain which allows framing of arbitrary URLs.
3015 *
3016 * - false: Allow all framing. This opens up the wiki to XSS attacks and thus
3017 * full compromise of local user accounts. Private wikis behind a
3018 * corporate firewall are especially vulnerable. This is not
3019 * recommended.
3020 *
3021 * For extra safety, set $wgBreakFrames = true, to prevent framing on all pages,
3022 * not just edit pages.
3023 */
3024 $wgEditPageFrameOptions = 'DENY';
3025
3026 /**
3027 * Disallow framing of API pages directly, by setting the X-Frame-Options
3028 * header. Since the API returns CSRF tokens, allowing the results to be
3029 * framed can compromise your user's account security.
3030 * Options are:
3031 * - 'DENY': Do not allow framing. This is recommended for most wikis.
3032 * - 'SAMEORIGIN': Allow framing by pages on the same domain.
3033 * - false: Allow all framing.
3034 */
3035 $wgApiFrameOptions = 'DENY';
3036
3037 /**
3038 * Disable output compression (enabled by default if zlib is available)
3039 */
3040 $wgDisableOutputCompression = false;
3041
3042 /**
3043 * Should we allow a broader set of characters in id attributes, per HTML5? If
3044 * not, use only HTML 4-compatible IDs. This option is for testing -- when the
3045 * functionality is ready, it will be on by default with no option.
3046 *
3047 * Currently this appears to work fine in all browsers, but it's disabled by
3048 * default because it normalizes id's a bit too aggressively, breaking preexisting
3049 * content (particularly Cite). See bug 27733, bug 27694, bug 27474.
3050 */
3051 $wgExperimentalHtmlIds = false;
3052
3053 /**
3054 * Abstract list of footer icons for skins in place of old copyrightico and poweredbyico code
3055 * You can add new icons to the built in copyright or poweredby, or you can create
3056 * a new block. Though note that you may need to add some custom css to get good styling
3057 * of new blocks in monobook. vector and modern should work without any special css.
3058 *
3059 * $wgFooterIcons itself is a key/value array.
3060 * The key is the name of a block that the icons will be wrapped in. The final id varies
3061 * by skin; Monobook and Vector will turn poweredby into f-poweredbyico while Modern
3062 * turns it into mw_poweredby.
3063 * The value is either key/value array of icons or a string.
3064 * In the key/value array the key may or may not be used by the skin but it can
3065 * be used to find the icon and unset it or change the icon if needed.
3066 * This is useful for disabling icons that are set by extensions.
3067 * The value should be either a string or an array. If it is a string it will be output
3068 * directly as html, however some skins may choose to ignore it. An array is the preferred format
3069 * for the icon, the following keys are used:
3070 * - src: An absolute url to the image to use for the icon, this is recommended
3071 * but not required, however some skins will ignore icons without an image
3072 * - url: The url to use in the a element around the text or icon, if not set an a element will
3073 * not be outputted
3074 * - alt: This is the text form of the icon, it will be displayed without an image in
3075 * skins like Modern or if src is not set, and will otherwise be used as
3076 * the alt="" for the image. This key is required.
3077 * - width and height: If the icon specified by src is not of the standard size
3078 * you can specify the size of image to use with these keys.
3079 * Otherwise they will default to the standard 88x31.
3080 * @todo Reformat documentation.
3081 */
3082 $wgFooterIcons = array(
3083 "copyright" => array(
3084 "copyright" => array(), // placeholder for the built in copyright icon
3085 ),
3086 "poweredby" => array(
3087 "mediawiki" => array(
3088 "src" => null, // Defaults to "$wgStylePath/common/images/poweredby_mediawiki_88x31.png"
3089 "url" => "//www.mediawiki.org/",
3090 "alt" => "Powered by MediaWiki",
3091 )
3092 ),
3093 );
3094
3095 /**
3096 * Login / create account link behavior when it's possible for anonymous users
3097 * to create an account.
3098 * - true = use a combined login / create account link
3099 * - false = split login and create account into two separate links
3100 */
3101 $wgUseCombinedLoginLink = false;
3102
3103 /**
3104 * Display user edit counts in various prominent places.
3105 */
3106 $wgEdititis = false;
3107
3108 /**
3109 * Some web hosts attempt to rewrite all responses with a 404 (not found)
3110 * status code, mangling or hiding MediaWiki's output. If you are using such a
3111 * host, you should start looking for a better one. While you're doing that,
3112 * set this to false to convert some of MediaWiki's 404 responses to 200 so
3113 * that the generated error pages can be seen.
3114 *
3115 * In cases where for technical reasons it is more important for MediaWiki to
3116 * send the correct status code than for the body to be transmitted intact,
3117 * this configuration variable is ignored.
3118 */
3119 $wgSend404Code = true;
3120
3121 /**
3122 * The $wgShowRollbackEditCount variable is used to show how many edits will be
3123 * rollback. The numeric value of the variable are the limit up to are counted.
3124 * If the value is false or 0, the edits are not counted. Disabling this will
3125 * furthermore prevent MediaWiki from hiding some useless rollback links.
3126 *
3127 * @since 1.20
3128 */
3129 $wgShowRollbackEditCount = 10;
3130
3131 /**
3132 * Output a <link rel="canonical"> tag on every page indicating the canonical
3133 * server which should be used, i.e. $wgServer or $wgCanonicalServer. Since
3134 * detection of the current server is unreliable, the link is sent
3135 * unconditionally.
3136 */
3137 $wgEnableCanonicalServerLink = false;
3138
3139 /** @} */ # End of output format settings }
3140
3141 /*************************************************************************//**
3142 * @name Resource loader settings
3143 * @{
3144 */
3145
3146 /**
3147 * Client-side resource modules.
3148 *
3149 * Extensions should add their resource loader module definitions
3150 * to the $wgResourceModules variable.
3151 *
3152 * @par Example:
3153 * @code
3154 * $wgResourceModules['ext.myExtension'] = array(
3155 * 'scripts' => 'myExtension.js',
3156 * 'styles' => 'myExtension.css',
3157 * 'dependencies' => array( 'jquery.cookie', 'jquery.tabIndex' ),
3158 * 'localBasePath' => __DIR__,
3159 * 'remoteExtPath' => 'MyExtension',
3160 * );
3161 * @endcode
3162 */
3163 $wgResourceModules = array();
3164
3165 /**
3166 * Skin-specific styles for resource modules.
3167 *
3168 * These are later added to the 'skinStyles' list of the existing module. The 'styles' list can
3169 * not be modified or disabled.
3170 *
3171 * For example, here is a module "bar" and how skin Foo would provide additional styles for it.
3172 *
3173 * @par Example:
3174 * @code
3175 * $wgResourceModules['bar'] = array(
3176 * 'scripts' => 'resources/bar/bar.js',
3177 * 'styles' => 'resources/bar/main.css',
3178 * );
3179 *
3180 * $wgResourceModuleSkinStyles['foo'] = array(
3181 * 'bar' => 'skins/Foo/bar.css',
3182 * );
3183 * @endcode
3184 *
3185 * This is mostly equivalent to:
3186 *
3187 * @par Equivalent:
3188 * @code
3189 * $wgResourceModules['bar'] = array(
3190 * 'scripts' => 'resources/bar/bar.js',
3191 * 'styles' => 'resources/bar/main.css',
3192 * 'skinStyles' => array(
3193 * 'foo' => skins/Foo/bar.css',
3194 * ),
3195 * );
3196 * @endcode
3197 *
3198 * If the module already defines its own entry in `skinStyles` for a given skin, then
3199 * $wgResourceModuleSkinStyles is ignored.
3200 *
3201 * If a module defines a `skinStyles['default']` the skin may want to extend that instead
3202 * of replacing them. This can be done using the `+` prefix.
3203 *
3204 * @par Example:
3205 * @code
3206 * $wgResourceModules['bar'] = array(
3207 * 'scripts' => 'resources/bar/bar.js',
3208 * 'styles' => 'resources/bar/basic.css',
3209 * 'skinStyles' => array(
3210 * 'default' => 'resources/bar/additional.css',
3211 * ),
3212 * );
3213 * // Note the '+' character:
3214 * $wgResourceModuleSkinStyles['+foo'] = array(
3215 * 'bar' => 'skins/Foo/bar.css',
3216 * );
3217 * @endcode
3218 *
3219 * This is mostly equivalent to:
3220 *
3221 * @par Equivalent:
3222 * @code
3223 * $wgResourceModules['bar'] = array(
3224 * 'scripts' => 'resources/bar/bar.js',
3225 * 'styles' => 'resources/bar/basic.css',
3226 * 'skinStyles' => array(
3227 * 'default' => 'resources/bar/additional.css',
3228 * 'foo' => array(
3229 * 'resources/bar/additional.css',
3230 * 'skins/Foo/bar.css',
3231 * ),
3232 * ),
3233 * );
3234 * @endcode
3235 *
3236 * In other words, as a module author, use the `styles` list for stylesheets that may not be
3237 * disabled by a skin. To provide default styles that may be extended or replaced,
3238 * use `skinStyles['default']`.
3239 *
3240 * As with $wgResourceModules, paths default to being relative to the MediaWiki root.
3241 * You should always provide a localBasePath and remoteBasePath (or remoteExtPath/remoteSkinPath).
3242 * Either for all skin styles at once (first example below) or for each module separately (second
3243 * example).
3244 *
3245 * @par Example:
3246 * @code
3247 * $wgResourceModuleSkinStyles['foo'] = array(
3248 * 'bar' => 'bar.css',
3249 * 'quux' => 'quux.css',
3250 * 'remoteSkinPath' => 'Foo',
3251 * 'localBasePath' => __DIR__,
3252 * );
3253 *
3254 * $wgResourceModuleSkinStyles['foo'] = array(
3255 * 'bar' => array(
3256 * 'bar.css',
3257 * 'remoteSkinPath' => 'Foo',
3258 * 'localBasePath' => __DIR__,
3259 * ),
3260 * 'quux' => array(
3261 * 'quux.css',
3262 * 'remoteSkinPath' => 'Foo',
3263 * 'localBasePath' => __DIR__,
3264 * ),
3265 * );
3266 * @endcode
3267 */
3268 $wgResourceModuleSkinStyles = array();
3269
3270 /**
3271 * Extensions should register foreign module sources here. 'local' is a
3272 * built-in source that is not in this array, but defined by
3273 * ResourceLoader::__construct() so that it cannot be unset.
3274 *
3275 * @par Example:
3276 * @code
3277 * $wgResourceLoaderSources['foo'] = array(
3278 * 'loadScript' => 'http://example.org/w/load.php',
3279 * 'apiScript' => 'http://example.org/w/api.php'
3280 * );
3281 * @endcode
3282 */
3283 $wgResourceLoaderSources = array();
3284
3285 /**
3286 * Default 'remoteBasePath' value for instances of ResourceLoaderFileModule.
3287 * If not set, then $wgScriptPath will be used as a fallback.
3288 */
3289 $wgResourceBasePath = null;
3290
3291 /**
3292 * Maximum time in seconds to cache resources served by the resource loader.
3293 * Used to set last modified headers (max-age/s-maxage).
3294 *
3295 * Following options to distinguish:
3296 * - versioned: Used for modules with a version, because changing version
3297 * numbers causes cache misses. This normally has a long expiry time.
3298 * - unversioned: Used for modules without a version to propagate changes
3299 * quickly to clients. Also used for modules with errors to recover quickly.
3300 * This normally has a short expiry time.
3301 *
3302 * Expiry time for the options to distinguish:
3303 * - server: Squid/Varnish but also any other public proxy cache between the
3304 * client and MediaWiki.
3305 * - client: On the client side (e.g. in the browser cache).
3306 */
3307 $wgResourceLoaderMaxage = array(
3308 'versioned' => array(
3309 'server' => 30 * 24 * 60 * 60, // 30 days
3310 'client' => 30 * 24 * 60 * 60, // 30 days
3311 ),
3312 'unversioned' => array(
3313 'server' => 5 * 60, // 5 minutes
3314 'client' => 5 * 60, // 5 minutes
3315 ),
3316 );
3317
3318 /**
3319 * The default debug mode (on/off) for of ResourceLoader requests.
3320 *
3321 * This will still be overridden when the debug URL parameter is used.
3322 */
3323 $wgResourceLoaderDebug = false;
3324
3325 /**
3326 * Enable embedding of certain resources using Edge Side Includes. This will
3327 * improve performance but only works if there is something in front of the
3328 * web server (e..g a Squid or Varnish server) configured to process the ESI.
3329 */
3330 $wgResourceLoaderUseESI = false;
3331
3332 /**
3333 * Put each statement on its own line when minifying JavaScript. This makes
3334 * debugging in non-debug mode a bit easier.
3335 */
3336 $wgResourceLoaderMinifierStatementsOnOwnLine = false;
3337
3338 /**
3339 * Maximum line length when minifying JavaScript. This is not a hard maximum:
3340 * the minifier will try not to produce lines longer than this, but may be
3341 * forced to do so in certain cases.
3342 */
3343 $wgResourceLoaderMinifierMaxLineLength = 1000;
3344
3345 /**
3346 * Whether to include the mediawiki.legacy JS library (old wikibits.js), and its
3347 * dependencies.
3348 */
3349 $wgIncludeLegacyJavaScript = true;
3350
3351 /**
3352 * Whether to include the jQuery Migrate library, which lets legacy JS that
3353 * requires jQuery 1.8.x to work and breaks with 1.9.x+.
3354 *
3355 * @since 1.24
3356 * @deprecated since 1.24, to be removed in 1.25
3357 */
3358 $wgIncludejQueryMigrate = false;
3359
3360 /**
3361 * Whether to preload the mediawiki.util module as blocking module in the top
3362 * queue.
3363 *
3364 * Before MediaWiki 1.19, modules used to load slower/less asynchronous which
3365 * allowed modules to lack dependencies on 'popular' modules that were likely
3366 * loaded already.
3367 *
3368 * This setting is to aid scripts during migration by providing mediawiki.util
3369 * unconditionally (which was the most commonly missed dependency).
3370 * It doesn't cover all missing dependencies obviously but should fix most of
3371 * them.
3372 *
3373 * This should be removed at some point after site/user scripts have been fixed.
3374 * Enable this if your wiki has a large amount of user/site scripts that are
3375 * lacking dependencies.
3376 * @todo Deprecate
3377 */
3378 $wgPreloadJavaScriptMwUtil = false;
3379
3380 /**
3381 * Whether or not to assign configuration variables to the global window object.
3382 *
3383 * If this is set to false, old code using deprecated variables will no longer
3384 * work.
3385 *
3386 * @par Example of legacy code:
3387 * @code{,js}
3388 * if ( window.wgRestrictionEdit ) { ... }
3389 * @endcode
3390 * or:
3391 * @code{,js}
3392 * if ( wgIsArticle ) { ... }
3393 * @endcode
3394 *
3395 * Instead, one needs to use mw.config.
3396 * @par Example using mw.config global configuration:
3397 * @code{,js}
3398 * if ( mw.config.exists('wgRestrictionEdit') ) { ... }
3399 * @endcode
3400 * or:
3401 * @code{,js}
3402 * if ( mw.config.get('wgIsArticle') ) { ... }
3403 * @endcode
3404 */
3405 $wgLegacyJavaScriptGlobals = true;
3406
3407 /**
3408 * If set to a positive number, ResourceLoader will not generate URLs whose
3409 * query string is more than this many characters long, and will instead use
3410 * multiple requests with shorter query strings. This degrades performance,
3411 * but may be needed if your web server has a low (less than, say 1024)
3412 * query string length limit or a low value for suhosin.get.max_value_length
3413 * that you can't increase.
3414 *
3415 * If set to a negative number, ResourceLoader will assume there is no query
3416 * string length limit.
3417 *
3418 * Defaults to a value based on php configuration.
3419 */
3420 $wgResourceLoaderMaxQueryLength = false;
3421
3422 /**
3423 * If set to true, JavaScript modules loaded from wiki pages will be parsed
3424 * prior to minification to validate it.
3425 *
3426 * Parse errors will result in a JS exception being thrown during module load,
3427 * which avoids breaking other modules loaded in the same request.
3428 */
3429 $wgResourceLoaderValidateJS = true;
3430
3431 /**
3432 * If set to true, statically-sourced (file-backed) JavaScript resources will
3433 * be parsed for validity before being bundled up into ResourceLoader modules.
3434 *
3435 * This can be helpful for development by providing better error messages in
3436 * default (non-debug) mode, but JavaScript parsing is slow and memory hungry
3437 * and may fail on large pre-bundled frameworks.
3438 */
3439 $wgResourceLoaderValidateStaticJS = false;
3440
3441 /**
3442 * If set to true, asynchronous loading of bottom-queue scripts in the "<head>"
3443 * will be enabled. This is an experimental feature that's supposed to make
3444 * JavaScript load faster.
3445 */
3446 $wgResourceLoaderExperimentalAsyncLoading = false;
3447
3448 /**
3449 * Global LESS variables. An associative array binding variable names to
3450 * LESS code snippets representing their values.
3451 *
3452 * Adding an item here is equivalent to writing `@variable: value;`
3453 * at the beginning of all your .less files, with all the consequences.
3454 * In particular, string values must be escaped and quoted.
3455 *
3456 * Changes to LESS variables do not trigger cache invalidation.
3457 *
3458 * @par Example:
3459 * @code
3460 * $wgResourceLoaderLESSVars = array(
3461 * 'baseFontSize' => '1em',
3462 * 'smallFontSize' => '0.75em',
3463 * 'WikimediaBlue' => '#006699',
3464 * );
3465 * @endcode
3466 * @since 1.22
3467 */
3468 $wgResourceLoaderLESSVars = array();
3469
3470 /**
3471 * Custom LESS functions. An associative array mapping function name to PHP
3472 * callable.
3473 *
3474 * Changes to LESS functions do not trigger cache invalidation.
3475 *
3476 * @since 1.22
3477 */
3478 $wgResourceLoaderLESSFunctions = array(
3479 'embeddable' => 'ResourceLoaderLESSFunctions::embeddable',
3480 'embed' => 'ResourceLoaderLESSFunctions::embed',
3481 );
3482
3483 /**
3484 * Default import paths for LESS modules. LESS files referenced in @import
3485 * statements will be looked up here first, and relative to the importing file
3486 * second. To avoid collisions, it's important for the LESS files in these
3487 * directories to have a common, predictable file name prefix.
3488 *
3489 * Extensions need not (and should not) register paths in
3490 * $wgResourceLoaderLESSImportPaths. The import path includes the path of the
3491 * currently compiling LESS file, which allows each extension to freely import
3492 * files from its own tree.
3493 *
3494 * @since 1.22
3495 */
3496 $wgResourceLoaderLESSImportPaths = array(
3497 "$IP/resources/src/mediawiki.less/",
3498 );
3499
3500 /**
3501 * Whether ResourceLoader should attempt to persist modules in localStorage on
3502 * browsers that support the Web Storage API.
3503 *
3504 * @since 1.23 - Client-side module persistence is experimental. Exercise care.
3505 */
3506 $wgResourceLoaderStorageEnabled = false;
3507
3508 /**
3509 * Cache version for client-side ResourceLoader module storage. You can trigger
3510 * invalidation of the contents of the module store by incrementing this value.
3511 *
3512 * @since 1.23
3513 */
3514 $wgResourceLoaderStorageVersion = 1;
3515
3516 /** @} */ # End of resource loader settings }
3517
3518 /*************************************************************************//**
3519 * @name Page title and interwiki link settings
3520 * @{
3521 */
3522
3523 /**
3524 * Name of the project namespace. If left set to false, $wgSitename will be
3525 * used instead.
3526 */
3527 $wgMetaNamespace = false;
3528
3529 /**
3530 * Name of the project talk namespace.
3531 *
3532 * Normally you can ignore this and it will be something like
3533 * $wgMetaNamespace . "_talk". In some languages, you may want to set this
3534 * manually for grammatical reasons.
3535 */
3536 $wgMetaNamespaceTalk = false;
3537
3538 /**
3539 * Additional namespaces. If the namespaces defined in Language.php and
3540 * Namespace.php are insufficient, you can create new ones here, for example,
3541 * to import Help files in other languages. You can also override the namespace
3542 * names of existing namespaces. Extensions developers should use
3543 * $wgCanonicalNamespaceNames.
3544 *
3545 * @warning Once you delete a namespace, the pages in that namespace will
3546 * no longer be accessible. If you rename it, then you can access them through
3547 * the new namespace name.
3548 *
3549 * Custom namespaces should start at 100 to avoid conflicting with standard
3550 * namespaces, and should always follow the even/odd main/talk pattern.
3551 *
3552 * @par Example:
3553 * @code
3554 * $wgExtraNamespaces = array(
3555 * 100 => "Hilfe",
3556 * 101 => "Hilfe_Diskussion",
3557 * 102 => "Aide",
3558 * 103 => "Discussion_Aide"
3559 * );
3560 * @endcode
3561 *
3562 * @todo Add a note about maintenance/namespaceDupes.php
3563 */
3564 $wgExtraNamespaces = array();
3565
3566 /**
3567 * Same as above, but for namespaces with gender distinction.
3568 * Note: the default form for the namespace should also be set
3569 * using $wgExtraNamespaces for the same index.
3570 * @since 1.18
3571 */
3572 $wgExtraGenderNamespaces = array();
3573
3574 /**
3575 * Namespace aliases.
3576 *
3577 * These are alternate names for the primary localised namespace names, which
3578 * are defined by $wgExtraNamespaces and the language file. If a page is
3579 * requested with such a prefix, the request will be redirected to the primary
3580 * name.
3581 *
3582 * Set this to a map from namespace names to IDs.
3583 *
3584 * @par Example:
3585 * @code
3586 * $wgNamespaceAliases = array(
3587 * 'Wikipedian' => NS_USER,
3588 * 'Help' => 100,
3589 * );
3590 * @endcode
3591 */
3592 $wgNamespaceAliases = array();
3593
3594 /**
3595 * Allowed title characters -- regex character class
3596 * Don't change this unless you know what you're doing
3597 *
3598 * Problematic punctuation:
3599 * - []{}|# Are needed for link syntax, never enable these
3600 * - <> Causes problems with HTML escaping, don't use
3601 * - % Enabled by default, minor problems with path to query rewrite rules, see below
3602 * - + Enabled by default, but doesn't work with path to query rewrite rules,
3603 * corrupted by apache
3604 * - ? Enabled by default, but doesn't work with path to PATH_INFO rewrites
3605 *
3606 * All three of these punctuation problems can be avoided by using an alias,
3607 * instead of a rewrite rule of either variety.
3608 *
3609 * The problem with % is that when using a path to query rewrite rule, URLs are
3610 * double-unescaped: once by Apache's path conversion code, and again by PHP. So
3611 * %253F, for example, becomes "?". Our code does not double-escape to compensate
3612 * for this, indeed double escaping would break if the double-escaped title was
3613 * passed in the query string rather than the path. This is a minor security issue
3614 * because articles can be created such that they are hard to view or edit.
3615 *
3616 * In some rare cases you may wish to remove + for compatibility with old links.
3617 *
3618 * Theoretically 0x80-0x9F of ISO 8859-1 should be disallowed, but
3619 * this breaks interlanguage links
3620 */
3621 $wgLegalTitleChars = " %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+";
3622
3623 /**
3624 * The interwiki prefix of the current wiki, or false if it doesn't have one.
3625 *
3626 * @deprecated since 1.23; use $wgLocalInterwikis instead
3627 */
3628 $wgLocalInterwiki = false;
3629
3630 /**
3631 * Array for multiple $wgLocalInterwiki values, in case there are several
3632 * interwiki prefixes that point to the current wiki. If $wgLocalInterwiki is
3633 * set, its value is prepended to this array, for backwards compatibility.
3634 *
3635 * Note, recent changes feeds use only the first entry in this array (or
3636 * $wgLocalInterwiki, if it is set). See $wgRCFeeds
3637 */
3638 $wgLocalInterwikis = array();
3639
3640 /**
3641 * Expiry time for cache of interwiki table
3642 */
3643 $wgInterwikiExpiry = 10800;
3644
3645 /**
3646 * @name Interwiki caching settings.
3647 * @{
3648 */
3649
3650 /**
3651 *$wgInterwikiCache specifies path to constant database file.
3652 *
3653 * This cdb database is generated by dumpInterwiki from maintenance and has
3654 * such key formats:
3655 * - dbname:key - a simple key (e.g. enwiki:meta)
3656 * - _sitename:key - site-scope key (e.g. wiktionary:meta)
3657 * - __global:key - global-scope key (e.g. __global:meta)
3658 * - __sites:dbname - site mapping (e.g. __sites:enwiki)
3659 *
3660 * Sites mapping just specifies site name, other keys provide "local url"
3661 * data layout.
3662 */
3663 $wgInterwikiCache = false;
3664
3665 /**
3666 * Specify number of domains to check for messages.
3667 * - 1: Just wiki(db)-level
3668 * - 2: wiki and global levels
3669 * - 3: site levels
3670 */
3671 $wgInterwikiScopes = 3;
3672
3673 /**
3674 * Fallback site, if unable to resolve from cache
3675 */
3676 $wgInterwikiFallbackSite = 'wiki';
3677
3678 /** @} */ # end of Interwiki caching settings.
3679
3680 /**
3681 * If local interwikis are set up which allow redirects,
3682 * set this regexp to restrict URLs which will be displayed
3683 * as 'redirected from' links.
3684 *
3685 * @par Example:
3686 * It might look something like this:
3687 * @code
3688 * $wgRedirectSources = '!^https?://[a-z-]+\.wikipedia\.org/!';
3689 * @endcode
3690 *
3691 * Leave at false to avoid displaying any incoming redirect markers.
3692 * This does not affect intra-wiki redirects, which don't change
3693 * the URL.
3694 */
3695 $wgRedirectSources = false;
3696
3697 /**
3698 * Set this to false to avoid forcing the first letter of links to capitals.
3699 *
3700 * @warning may break links! This makes links COMPLETELY case-sensitive. Links
3701 * appearing with a capital at the beginning of a sentence will *not* go to the
3702 * same place as links in the middle of a sentence using a lowercase initial.
3703 */
3704 $wgCapitalLinks = true;
3705
3706 /**
3707 * @since 1.16 - This can now be set per-namespace. Some special namespaces (such
3708 * as Special, see MWNamespace::$alwaysCapitalizedNamespaces for the full list) must be
3709 * true by default (and setting them has no effect), due to various things that
3710 * require them to be so. Also, since Talk namespaces need to directly mirror their
3711 * associated content namespaces, the values for those are ignored in favor of the
3712 * subject namespace's setting. Setting for NS_MEDIA is taken automatically from
3713 * NS_FILE.
3714 *
3715 * @par Example:
3716 * @code
3717 * $wgCapitalLinkOverrides[ NS_FILE ] = false;
3718 * @endcode
3719 */
3720 $wgCapitalLinkOverrides = array();
3721
3722 /**
3723 * Which namespaces should support subpages?
3724 * See Language.php for a list of namespaces.
3725 */
3726 $wgNamespacesWithSubpages = array(
3727 NS_TALK => true,
3728 NS_USER => true,
3729 NS_USER_TALK => true,
3730 NS_PROJECT => true,
3731 NS_PROJECT_TALK => true,
3732 NS_FILE_TALK => true,
3733 NS_MEDIAWIKI => true,
3734 NS_MEDIAWIKI_TALK => true,
3735 NS_TEMPLATE_TALK => true,
3736 NS_HELP => true,
3737 NS_HELP_TALK => true,
3738 NS_CATEGORY_TALK => true
3739 );
3740
3741 /**
3742 * Array holding default tracking category names.
3743 *
3744 * Array contains the system messages for each tracking category.
3745 * Tracking categories allow pages with certain characteristics to be tracked.
3746 * It works by adding any such page to a category automatically.
3747 *
3748 * A message with the suffix '-desc' should be added as a description message
3749 * to have extra information on Special:TrackingCategories.
3750 *
3751 * @since 1.23
3752 */
3753 $wgTrackingCategories = array(
3754 'index-category',
3755 'noindex-category',
3756 'expensive-parserfunction-category',
3757 'post-expand-template-argument-category',
3758 'post-expand-template-inclusion-category',
3759 'hidden-category-category',
3760 'broken-file-category',
3761 'node-count-exceeded-category',
3762 'expansion-depth-exceeded-category',
3763 );
3764
3765 /**
3766 * Array of namespaces which can be deemed to contain valid "content", as far
3767 * as the site statistics are concerned. Useful if additional namespaces also
3768 * contain "content" which should be considered when generating a count of the
3769 * number of articles in the wiki.
3770 */
3771 $wgContentNamespaces = array( NS_MAIN );
3772
3773 /**
3774 * Max number of redirects to follow when resolving redirects.
3775 * 1 means only the first redirect is followed (default behavior).
3776 * 0 or less means no redirects are followed.
3777 */
3778 $wgMaxRedirects = 1;
3779
3780 /**
3781 * Array of invalid page redirect targets.
3782 * Attempting to create a redirect to any of the pages in this array
3783 * will make the redirect fail.
3784 * Userlogout is hard-coded, so it does not need to be listed here.
3785 * (bug 10569) Disallow Mypage and Mytalk as well.
3786 *
3787 * As of now, this only checks special pages. Redirects to pages in
3788 * other namespaces cannot be invalidated by this variable.
3789 */
3790 $wgInvalidRedirectTargets = array( 'Filepath', 'Mypage', 'Mytalk', 'Redirect' );
3791
3792 /** @} */ # End of title and interwiki settings }
3793
3794 /************************************************************************//**
3795 * @name Parser settings
3796 * These settings configure the transformation from wikitext to HTML.
3797 * @{
3798 */
3799
3800 /**
3801 * Parser configuration. Associative array with the following members:
3802 *
3803 * class The class name
3804 *
3805 * preprocessorClass The preprocessor class. Two classes are currently available:
3806 * Preprocessor_Hash, which uses plain PHP arrays for temporary
3807 * storage, and Preprocessor_DOM, which uses the DOM module for
3808 * temporary storage. Preprocessor_DOM generally uses less memory;
3809 * the speed of the two is roughly the same.
3810 *
3811 * If this parameter is not given, it uses Preprocessor_DOM if the
3812 * DOM module is available, otherwise it uses Preprocessor_Hash.
3813 *
3814 * The entire associative array will be passed through to the constructor as
3815 * the first parameter. Note that only Setup.php can use this variable --
3816 * the configuration will change at runtime via $wgParser member functions, so
3817 * the contents of this variable will be out-of-date. The variable can only be
3818 * changed during LocalSettings.php, in particular, it can't be changed during
3819 * an extension setup function.
3820 */
3821 $wgParserConf = array(
3822 'class' => 'Parser',
3823 #'preprocessorClass' => 'Preprocessor_Hash',
3824 );
3825
3826 /**
3827 * Maximum indent level of toc.
3828 */
3829 $wgMaxTocLevel = 999;
3830
3831 /**
3832 * A complexity limit on template expansion: the maximum number of nodes visited
3833 * by PPFrame::expand()
3834 */
3835 $wgMaxPPNodeCount = 1000000;
3836
3837 /**
3838 * A complexity limit on template expansion: the maximum number of elements
3839 * generated by Preprocessor::preprocessToObj(). This allows you to limit the
3840 * amount of memory used by the Preprocessor_DOM node cache: testing indicates
3841 * that each element uses about 160 bytes of memory on a 64-bit processor, so
3842 * this default corresponds to about 155 MB.
3843 *
3844 * When the limit is exceeded, an exception is thrown.
3845 */
3846 $wgMaxGeneratedPPNodeCount = 1000000;
3847
3848 /**
3849 * Maximum recursion depth for templates within templates.
3850 * The current parser adds two levels to the PHP call stack for each template,
3851 * and xdebug limits the call stack to 100 by default. So this should hopefully
3852 * stop the parser before it hits the xdebug limit.
3853 */
3854 $wgMaxTemplateDepth = 40;
3855
3856 /**
3857 * @see $wgMaxTemplateDepth
3858 */
3859 $wgMaxPPExpandDepth = 40;
3860
3861 /**
3862 * URL schemes that should be recognized as valid by wfParseUrl().
3863 * @see wfParseUrl
3864 */
3865 $wgUrlProtocols = array(
3866 'bitcoin:', 'ftp://', 'ftps://', 'geo:', 'git://', 'gopher://', 'http://',
3867 'https://', 'irc://', 'ircs://', 'magnet:', 'mailto:', 'mms://', 'news:',
3868 'nntp://', 'redis://', 'sftp://', 'sip:', 'sips:', 'sms:', 'ssh://',
3869 'svn://', 'tel:', 'telnet://', 'urn:', 'worldwind://', 'xmpp:', '//'
3870 );
3871
3872 /**
3873 * If true, removes (substitutes) templates in "~~~~" signatures.
3874 */
3875 $wgCleanSignatures = true;
3876
3877 /**
3878 * Whether to allow inline image pointing to other websites
3879 */
3880 $wgAllowExternalImages = false;
3881
3882 /**
3883 * If the above is false, you can specify an exception here. Image URLs
3884 * that start with this string are then rendered, while all others are not.
3885 * You can use this to set up a trusted, simple repository of images.
3886 * You may also specify an array of strings to allow multiple sites
3887 *
3888 * @par Examples:
3889 * @code
3890 * $wgAllowExternalImagesFrom = 'http://127.0.0.1/';
3891 * $wgAllowExternalImagesFrom = array( 'http://127.0.0.1/', 'http://example.com' );
3892 * @endcode
3893 */
3894 $wgAllowExternalImagesFrom = '';
3895
3896 /**
3897 * If $wgAllowExternalImages is false, you can allow an on-wiki
3898 * whitelist of regular expression fragments to match the image URL
3899 * against. If the image matches one of the regular expression fragments,
3900 * The image will be displayed.
3901 *
3902 * Set this to true to enable the on-wiki whitelist (MediaWiki:External image whitelist)
3903 * Or false to disable it
3904 */
3905 $wgEnableImageWhitelist = true;
3906
3907 /**
3908 * A different approach to the above: simply allow the "<img>" tag to be used.
3909 * This allows you to specify alt text and other attributes, copy-paste HTML to
3910 * your wiki more easily, etc. However, allowing external images in any manner
3911 * will allow anyone with editing rights to snoop on your visitors' IP
3912 * addresses and so forth, if they wanted to, by inserting links to images on
3913 * sites they control.
3914 */
3915 $wgAllowImageTag = false;
3916
3917 /**
3918 * $wgUseTidy: use tidy to make sure HTML output is sane.
3919 * Tidy is a free tool that fixes broken HTML.
3920 * See http://www.w3.org/People/Raggett/tidy/
3921 *
3922 * - $wgTidyBin should be set to the path of the binary and
3923 * - $wgTidyConf to the path of the configuration file.
3924 * - $wgTidyOpts can include any number of parameters.
3925 * - $wgTidyInternal controls the use of the PECL extension or the
3926 * libtidy (PHP >= 5) extension to use an in-process tidy library instead
3927 * of spawning a separate program.
3928 * Normally you shouldn't need to override the setting except for
3929 * debugging. To install, use 'pear install tidy' and add a line
3930 * 'extension=tidy.so' to php.ini.
3931 */
3932 $wgUseTidy = false;
3933
3934 /**
3935 * @see $wgUseTidy
3936 */
3937 $wgAlwaysUseTidy = false;
3938
3939 /**
3940 * @see $wgUseTidy
3941 */
3942 $wgTidyBin = 'tidy';
3943
3944 /**
3945 * @see $wgUseTidy
3946 */
3947 $wgTidyConf = $IP . '/includes/tidy.conf';
3948
3949 /**
3950 * @see $wgUseTidy
3951 */
3952 $wgTidyOpts = '';
3953
3954 /**
3955 * @see $wgUseTidy
3956 */
3957 $wgTidyInternal = extension_loaded( 'tidy' );
3958
3959 /**
3960 * Put tidy warnings in HTML comments
3961 * Only works for internal tidy.
3962 */
3963 $wgDebugTidy = false;
3964
3965 /**
3966 * Allow raw, unchecked HTML in "<html>...</html>" sections.
3967 * THIS IS VERY DANGEROUS on a publicly editable site, so USE wgGroupPermissions
3968 * TO RESTRICT EDITING to only those that you trust
3969 */
3970 $wgRawHtml = false;
3971
3972 /**
3973 * Set a default target for external links, e.g. _blank to pop up a new window
3974 */
3975 $wgExternalLinkTarget = false;
3976
3977 /**
3978 * If true, external URL links in wiki text will be given the
3979 * rel="nofollow" attribute as a hint to search engines that
3980 * they should not be followed for ranking purposes as they
3981 * are user-supplied and thus subject to spamming.
3982 */
3983 $wgNoFollowLinks = true;
3984
3985 /**
3986 * Namespaces in which $wgNoFollowLinks doesn't apply.
3987 * See Language.php for a list of namespaces.
3988 */
3989 $wgNoFollowNsExceptions = array();
3990
3991 /**
3992 * If this is set to an array of domains, external links to these domain names
3993 * (or any subdomains) will not be set to rel="nofollow" regardless of the
3994 * value of $wgNoFollowLinks. For instance:
3995 *
3996 * $wgNoFollowDomainExceptions = array( 'en.wikipedia.org', 'wiktionary.org',
3997 * 'mediawiki.org' );
3998 *
3999 * This would add rel="nofollow" to links to de.wikipedia.org, but not
4000 * en.wikipedia.org, wiktionary.org, en.wiktionary.org, us.en.wikipedia.org,
4001 * etc.
4002 *
4003 * Defaults to mediawiki.org for the links included in the software by default.
4004 */
4005 $wgNoFollowDomainExceptions = array( 'mediawiki.org' );
4006
4007 /**
4008 * Allow DISPLAYTITLE to change title display
4009 */
4010 $wgAllowDisplayTitle = true;
4011
4012 /**
4013 * For consistency, restrict DISPLAYTITLE to text that normalizes to the same
4014 * canonical DB key. Also disallow some inline CSS rules like display: none;
4015 * which can cause the text to be hidden or unselectable.
4016 */
4017 $wgRestrictDisplayTitle = true;
4018
4019 /**
4020 * Maximum number of calls per parse to expensive parser functions such as
4021 * PAGESINCATEGORY.
4022 */
4023 $wgExpensiveParserFunctionLimit = 100;
4024
4025 /**
4026 * Preprocessor caching threshold
4027 * Setting it to 'false' will disable the preprocessor cache.
4028 */
4029 $wgPreprocessorCacheThreshold = 1000;
4030
4031 /**
4032 * Enable interwiki transcluding. Only when iw_trans=1 in the interwiki table.
4033 */
4034 $wgEnableScaryTranscluding = false;
4035
4036 /**
4037 * Expiry time for transcluded templates cached in transcache database table.
4038 * Only used $wgEnableInterwikiTranscluding is set to true.
4039 */
4040 $wgTranscludeCacheExpiry = 3600;
4041
4042 /** @} */ # end of parser settings }
4043
4044 /************************************************************************//**
4045 * @name Statistics
4046 * @{
4047 */
4048
4049 /**
4050 * Method used to determine if a page in a content namespace should be counted
4051 * as a valid article.
4052 *
4053 * Redirect pages will never be counted as valid articles.
4054 *
4055 * This variable can have the following values:
4056 * - 'any': all pages as considered as valid articles
4057 * - 'comma': the page must contain a comma to be considered valid
4058 * - 'link': the page must contain a [[wiki link]] to be considered valid
4059 *
4060 * See also See https://www.mediawiki.org/wiki/Manual:Article_count
4061 *
4062 * Retroactively changing this variable will not affect the existing count,
4063 * to update it, you will need to run the maintenance/updateArticleCount.php
4064 * script.
4065 */
4066 $wgArticleCountMethod = 'link';
4067
4068 /**
4069 * wgHitcounterUpdateFreq sets how often page counters should be updated, higher
4070 * values are easier on the database. A value of 1 causes the counters to be
4071 * updated on every hit, any higher value n cause them to update *on average*
4072 * every n hits. Should be set to either 1 or something largish, eg 1000, for
4073 * maximum efficiency.
4074 */
4075 $wgHitcounterUpdateFreq = 1;
4076
4077 /**
4078 * How many days user must be idle before he is considered inactive. Will affect
4079 * the number shown on Special:Statistics, Special:ActiveUsers, and the
4080 * {{NUMBEROFACTIVEUSERS}} magic word in wikitext.
4081 * You might want to leave this as the default value, to provide comparable
4082 * numbers between different wikis.
4083 */
4084 $wgActiveUserDays = 30;
4085
4086 /** @} */ # End of statistics }
4087
4088 /************************************************************************//**
4089 * @name User accounts, authentication
4090 * @{
4091 */
4092
4093 /**
4094 * For compatibility with old installations set to false
4095 * @deprecated since 1.24 will be removed in future
4096 */
4097 $wgPasswordSalt = true;
4098
4099 /**
4100 * Specifies the minimal length of a user password. If set to 0, empty pass-
4101 * words are allowed.
4102 */
4103 $wgMinimalPasswordLength = 1;
4104
4105 /**
4106 * Specifies if users should be sent to a password-reset form on login, if their
4107 * password doesn't meet the requirements of User::isValidPassword().
4108 * @since 1.23
4109 */
4110 $wgInvalidPasswordReset = true;
4111
4112 /**
4113 * Default password type to use when hashing user passwords
4114 *
4115 * @since 1.24
4116 */
4117 $wgPasswordDefault = 'pbkdf2';
4118
4119 /**
4120 * Configuration for built-in password types. Maps the password type
4121 * to an array of options. The 'class' option is the Password class to
4122 * use. All other options are class-dependent.
4123 *
4124 * An advanced example:
4125 * @code
4126 * $wgPasswordConfig['bcrypt-peppered'] = array(
4127 * 'class' => 'EncryptedPassword',
4128 * 'underlying' => 'bcrypt',
4129 * 'secrets' => array(),
4130 * 'cipher' => MCRYPT_RIJNDAEL_256,
4131 * 'mode' => MCRYPT_MODE_CBC,
4132 * 'cost' => 5,
4133 * );
4134 * @endcode
4135 *
4136 * @since 1.24
4137 */
4138 $wgPasswordConfig = array(
4139 'A' => array(
4140 'class' => 'MWOldPassword',
4141 ),
4142 'B' => array(
4143 'class' => 'MWSaltedPassword',
4144 ),
4145 'pbkdf2-legacyA' => array(
4146 'class' => 'LayeredParameterizedPassword',
4147 'types' => array(
4148 'A',
4149 'pbkdf2',
4150 ),
4151 ),
4152 'pbkdf2-legacyB' => array(
4153 'class' => 'LayeredParameterizedPassword',
4154 'types' => array(
4155 'B',
4156 'pbkdf2',
4157 ),
4158 ),
4159 'bcrypt' => array(
4160 'class' => 'BcryptPassword',
4161 'cost' => 9,
4162 ),
4163 'pbkdf2' => array(
4164 'class' => 'Pbkdf2Password',
4165 'algo' => 'sha256',
4166 'cost' => '10000',
4167 'length' => '128',
4168 ),
4169 );
4170
4171 /**
4172 * Whether to allow password resets ("enter some identifying data, and we'll send an email
4173 * with a temporary password you can use to get back into the account") identified by
4174 * various bits of data. Setting all of these to false (or the whole variable to false)
4175 * has the effect of disabling password resets entirely
4176 */
4177 $wgPasswordResetRoutes = array(
4178 'username' => true,
4179 'email' => false,
4180 );
4181
4182 /**
4183 * Maximum number of Unicode characters in signature
4184 */
4185 $wgMaxSigChars = 255;
4186
4187 /**
4188 * Maximum number of bytes in username. You want to run the maintenance
4189 * script ./maintenance/checkUsernames.php once you have changed this value.
4190 */
4191 $wgMaxNameChars = 255;
4192
4193 /**
4194 * Array of usernames which may not be registered or logged in from
4195 * Maintenance scripts can still use these
4196 */
4197 $wgReservedUsernames = array(
4198 'MediaWiki default', // Default 'Main Page' and MediaWiki: message pages
4199 'Conversion script', // Used for the old Wikipedia software upgrade
4200 'Maintenance script', // Maintenance scripts which perform editing, image import script
4201 'Template namespace initialisation script', // Used in 1.2->1.3 upgrade
4202 'ScriptImporter', // Default user name used by maintenance/importSiteScripts.php
4203 'msg:double-redirect-fixer', // Automatic double redirect fix
4204 'msg:usermessage-editor', // Default user for leaving user messages
4205 'msg:proxyblocker', // For $wgProxyList and Special:Blockme (removed in 1.22)
4206 );
4207
4208 /**
4209 * Settings added to this array will override the default globals for the user
4210 * preferences used by anonymous visitors and newly created accounts.
4211 * For instance, to disable editing on double clicks:
4212 * $wgDefaultUserOptions ['editondblclick'] = 0;
4213 */
4214 $wgDefaultUserOptions = array(
4215 'ccmeonemails' => 0,
4216 'cols' => 80,
4217 'date' => 'default',
4218 'diffonly' => 0,
4219 'disablemail' => 0,
4220 'editfont' => 'default',
4221 'editondblclick' => 0,
4222 'editsectiononrightclick' => 0,
4223 'enotifminoredits' => 0,
4224 'enotifrevealaddr' => 0,
4225 'enotifusertalkpages' => 1,
4226 'enotifwatchlistpages' => 1,
4227 'extendwatchlist' => 0,
4228 'fancysig' => 0,
4229 'forceeditsummary' => 0,
4230 'gender' => 'unknown',
4231 'hideminor' => 0,
4232 'hidepatrolled' => 0,
4233 'imagesize' => 2,
4234 'math' => 1,
4235 'minordefault' => 0,
4236 'newpageshidepatrolled' => 0,
4237 'nickname' => '',
4238 'norollbackdiff' => 0,
4239 'numberheadings' => 0,
4240 'previewonfirst' => 0,
4241 'previewontop' => 1,
4242 'rcdays' => 7,
4243 'rclimit' => 50,
4244 'rows' => 25,
4245 'showhiddencats' => 0,
4246 'shownumberswatching' => 1,
4247 'showtoolbar' => 1,
4248 'skin' => false,
4249 'stubthreshold' => 0,
4250 'thumbsize' => 5,
4251 'underline' => 2,
4252 'uselivepreview' => 0,
4253 'usenewrc' => 0,
4254 'watchcreations' => 1,
4255 'watchdefault' => 1,
4256 'watchdeletion' => 0,
4257 'watchlistdays' => 3.0,
4258 'watchlisthideanons' => 0,
4259 'watchlisthidebots' => 0,
4260 'watchlisthideliu' => 0,
4261 'watchlisthideminor' => 0,
4262 'watchlisthideown' => 0,
4263 'watchlisthidepatrolled' => 0,
4264 'watchmoves' => 0,
4265 'watchrollback' => 0,
4266 'wllimit' => 250,
4267 'useeditwarning' => 1,
4268 'prefershttps' => 1,
4269 );
4270
4271 /**
4272 * An array of preferences to not show for the user
4273 */
4274 $wgHiddenPrefs = array();
4275
4276 /**
4277 * Characters to prevent during new account creations.
4278 * This is used in a regular expression character class during
4279 * registration (regex metacharacters like / are escaped).
4280 */
4281 $wgInvalidUsernameCharacters = '@';
4282
4283 /**
4284 * Character used as a delimiter when testing for interwiki userrights
4285 * (In Special:UserRights, it is possible to modify users on different
4286 * databases if the delimiter is used, e.g. "Someuser@enwiki").
4287 *
4288 * It is recommended that you have this delimiter in
4289 * $wgInvalidUsernameCharacters above, or you will not be able to
4290 * modify the user rights of those users via Special:UserRights
4291 */
4292 $wgUserrightsInterwikiDelimiter = '@';
4293
4294 /**
4295 * This is to let user authenticate using https when they come from http.
4296 * Based on an idea by George Herbert on wikitech-l:
4297 * http://lists.wikimedia.org/pipermail/wikitech-l/2010-October/050039.html
4298 * @since 1.17
4299 */
4300 $wgSecureLogin = false;
4301
4302 /** @} */ # end user accounts }
4303
4304 /************************************************************************//**
4305 * @name User rights, access control and monitoring
4306 * @{
4307 */
4308
4309 /**
4310 * Number of seconds before autoblock entries expire. Default 86400 = 1 day.
4311 */
4312 $wgAutoblockExpiry = 86400;
4313
4314 /**
4315 * Set this to true to allow blocked users to edit their own user talk page.
4316 */
4317 $wgBlockAllowsUTEdit = false;
4318
4319 /**
4320 * Allow sysops to ban users from accessing Emailuser
4321 */
4322 $wgSysopEmailBans = true;
4323
4324 /**
4325 * Limits on the possible sizes of range blocks.
4326 *
4327 * CIDR notation is hard to understand, it's easy to mistakenly assume that a
4328 * /1 is a small range and a /31 is a large range. For IPv4, setting a limit of
4329 * half the number of bits avoids such errors, and allows entire ISPs to be
4330 * blocked using a small number of range blocks.
4331 *
4332 * For IPv6, RFC 3177 recommends that a /48 be allocated to every residential
4333 * customer, so range blocks larger than /64 (half the number of bits) will
4334 * plainly be required. RFC 4692 implies that a very large ISP may be
4335 * allocated a /19 if a generous HD-Ratio of 0.8 is used, so we will use that
4336 * as our limit. As of 2012, blocking the whole world would require a /4 range.
4337 */
4338 $wgBlockCIDRLimit = array(
4339 'IPv4' => 16, # Blocks larger than a /16 (64k addresses) will not be allowed
4340 'IPv6' => 19,
4341 );
4342
4343 /**
4344 * If true, blocked users will not be allowed to login. When using this with
4345 * a public wiki, the effect of logging out blocked users may actually be
4346 * avers: unless the user's address is also blocked (e.g. auto-block),
4347 * logging the user out will again allow reading and editing, just as for
4348 * anonymous visitors.
4349 */
4350 $wgBlockDisablesLogin = false;
4351
4352 /**
4353 * Pages anonymous user may see, set as an array of pages titles.
4354 *
4355 * @par Example:
4356 * @code
4357 * $wgWhitelistRead = array ( "Main Page", "Wikipedia:Help");
4358 * @endcode
4359 *
4360 * Special:Userlogin and Special:ChangePassword are always whitelisted.
4361 *
4362 * @note This will only work if $wgGroupPermissions['*']['read'] is false --
4363 * see below. Otherwise, ALL pages are accessible, regardless of this setting.
4364 *
4365 * @note Also that this will only protect _pages in the wiki_. Uploaded files
4366 * will remain readable. You can use img_auth.php to protect uploaded files,
4367 * see https://www.mediawiki.org/wiki/Manual:Image_Authorization
4368 */
4369 $wgWhitelistRead = false;
4370
4371 /**
4372 * Pages anonymous user may see, set as an array of regular expressions.
4373 *
4374 * This function will match the regexp against the title name, which
4375 * is without underscore.
4376 *
4377 * @par Example:
4378 * To whitelist [[Main Page]]:
4379 * @code
4380 * $wgWhitelistReadRegexp = array( "/Main Page/" );
4381 * @endcode
4382 *
4383 * @note Unless ^ and/or $ is specified, a regular expression might match
4384 * pages not intended to be whitelisted. The above example will also
4385 * whitelist a page named 'Security Main Page'.
4386 *
4387 * @par Example:
4388 * To allow reading any page starting with 'User' regardless of the case:
4389 * @code
4390 * $wgWhitelistReadRegexp = array( "@^UsEr.*@i" );
4391 * @endcode
4392 * Will allow both [[User is banned]] and [[User:JohnDoe]]
4393 *
4394 * @note This will only work if $wgGroupPermissions['*']['read'] is false --
4395 * see below. Otherwise, ALL pages are accessible, regardless of this setting.
4396 */
4397 $wgWhitelistReadRegexp = false;
4398
4399 /**
4400 * Should editors be required to have a validated e-mail
4401 * address before being allowed to edit?
4402 */
4403 $wgEmailConfirmToEdit = false;
4404
4405 /**
4406 * Permission keys given to users in each group.
4407 *
4408 * This is an array where the keys are all groups and each value is an
4409 * array of the format (right => boolean).
4410 *
4411 * The second format is used to support per-namespace permissions.
4412 * Note that this feature does not fully work for all permission types.
4413 *
4414 * All users are implicitly in the '*' group including anonymous visitors;
4415 * logged-in users are all implicitly in the 'user' group. These will be
4416 * combined with the permissions of all groups that a given user is listed
4417 * in in the user_groups table.
4418 *
4419 * Note: Don't set $wgGroupPermissions = array(); unless you know what you're
4420 * doing! This will wipe all permissions, and may mean that your users are
4421 * unable to perform certain essential tasks or access new functionality
4422 * when new permissions are introduced and default grants established.
4423 *
4424 * Functionality to make pages inaccessible has not been extensively tested
4425 * for security. Use at your own risk!
4426 *
4427 * This replaces $wgWhitelistAccount and $wgWhitelistEdit
4428 */
4429 $wgGroupPermissions = array();
4430
4431 /** @cond file_level_code */
4432 // Implicit group for all visitors
4433 $wgGroupPermissions['*']['createaccount'] = true;
4434 $wgGroupPermissions['*']['read'] = true;
4435 $wgGroupPermissions['*']['edit'] = true;
4436 $wgGroupPermissions['*']['createpage'] = true;
4437 $wgGroupPermissions['*']['createtalk'] = true;
4438 $wgGroupPermissions['*']['writeapi'] = true;
4439 $wgGroupPermissions['*']['editmyusercss'] = true;
4440 $wgGroupPermissions['*']['editmyuserjs'] = true;
4441 $wgGroupPermissions['*']['viewmywatchlist'] = true;
4442 $wgGroupPermissions['*']['editmywatchlist'] = true;
4443 $wgGroupPermissions['*']['viewmyprivateinfo'] = true;
4444 $wgGroupPermissions['*']['editmyprivateinfo'] = true;
4445 $wgGroupPermissions['*']['editmyoptions'] = true;
4446 #$wgGroupPermissions['*']['patrolmarks'] = false; // let anons see what was patrolled
4447
4448 // Implicit group for all logged-in accounts
4449 $wgGroupPermissions['user']['move'] = true;
4450 $wgGroupPermissions['user']['move-subpages'] = true;
4451 $wgGroupPermissions['user']['move-rootuserpages'] = true; // can move root userpages
4452 $wgGroupPermissions['user']['move-categorypages'] = true;
4453 $wgGroupPermissions['user']['movefile'] = true;
4454 $wgGroupPermissions['user']['read'] = true;
4455 $wgGroupPermissions['user']['edit'] = true;
4456 $wgGroupPermissions['user']['createpage'] = true;
4457 $wgGroupPermissions['user']['createtalk'] = true;
4458 $wgGroupPermissions['user']['writeapi'] = true;
4459 $wgGroupPermissions['user']['upload'] = true;
4460 $wgGroupPermissions['user']['reupload'] = true;
4461 $wgGroupPermissions['user']['reupload-shared'] = true;
4462 $wgGroupPermissions['user']['minoredit'] = true;
4463 $wgGroupPermissions['user']['purge'] = true; // can use ?action=purge without clicking "ok"
4464 $wgGroupPermissions['user']['sendemail'] = true;
4465
4466 // Implicit group for accounts that pass $wgAutoConfirmAge
4467 $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;
4468 $wgGroupPermissions['autoconfirmed']['editsemiprotected'] = true;
4469
4470 // Users with bot privilege can have their edits hidden
4471 // from various log pages by default
4472 $wgGroupPermissions['bot']['bot'] = true;
4473 $wgGroupPermissions['bot']['autoconfirmed'] = true;
4474 $wgGroupPermissions['bot']['editsemiprotected'] = true;
4475 $wgGroupPermissions['bot']['nominornewtalk'] = true;
4476 $wgGroupPermissions['bot']['autopatrol'] = true;
4477 $wgGroupPermissions['bot']['suppressredirect'] = true;
4478 $wgGroupPermissions['bot']['apihighlimits'] = true;
4479 $wgGroupPermissions['bot']['writeapi'] = true;
4480
4481 // Most extra permission abilities go to this group
4482 $wgGroupPermissions['sysop']['block'] = true;
4483 $wgGroupPermissions['sysop']['createaccount'] = true;
4484 $wgGroupPermissions['sysop']['delete'] = true;
4485 // can be separately configured for pages with > $wgDeleteRevisionsLimit revs
4486 $wgGroupPermissions['sysop']['bigdelete'] = true;
4487 // can view deleted history entries, but not see or restore the text
4488 $wgGroupPermissions['sysop']['deletedhistory'] = true;
4489 // can view deleted revision text
4490 $wgGroupPermissions['sysop']['deletedtext'] = true;
4491 $wgGroupPermissions['sysop']['undelete'] = true;
4492 $wgGroupPermissions['sysop']['editinterface'] = true;
4493 $wgGroupPermissions['sysop']['editusercss'] = true;
4494 $wgGroupPermissions['sysop']['edituserjs'] = true;
4495 $wgGroupPermissions['sysop']['import'] = true;
4496 $wgGroupPermissions['sysop']['importupload'] = true;
4497 $wgGroupPermissions['sysop']['move'] = true;
4498 $wgGroupPermissions['sysop']['move-subpages'] = true;
4499 $wgGroupPermissions['sysop']['move-rootuserpages'] = true;
4500 $wgGroupPermissions['sysop']['move-categorypages'] = true;
4501 $wgGroupPermissions['sysop']['patrol'] = true;
4502 $wgGroupPermissions['sysop']['autopatrol'] = true;
4503 $wgGroupPermissions['sysop']['protect'] = true;
4504 $wgGroupPermissions['sysop']['editprotected'] = true;
4505 $wgGroupPermissions['sysop']['proxyunbannable'] = true;
4506 $wgGroupPermissions['sysop']['rollback'] = true;
4507 $wgGroupPermissions['sysop']['upload'] = true;
4508 $wgGroupPermissions['sysop']['reupload'] = true;
4509 $wgGroupPermissions['sysop']['reupload-shared'] = true;
4510 $wgGroupPermissions['sysop']['unwatchedpages'] = true;
4511 $wgGroupPermissions['sysop']['autoconfirmed'] = true;
4512 $wgGroupPermissions['sysop']['editsemiprotected'] = true;
4513 $wgGroupPermissions['sysop']['ipblock-exempt'] = true;
4514 $wgGroupPermissions['sysop']['blockemail'] = true;
4515 $wgGroupPermissions['sysop']['markbotedits'] = true;
4516 $wgGroupPermissions['sysop']['apihighlimits'] = true;
4517 $wgGroupPermissions['sysop']['browsearchive'] = true;
4518 $wgGroupPermissions['sysop']['noratelimit'] = true;
4519 $wgGroupPermissions['sysop']['movefile'] = true;
4520 $wgGroupPermissions['sysop']['unblockself'] = true;
4521 $wgGroupPermissions['sysop']['suppressredirect'] = true;
4522 #$wgGroupPermissions['sysop']['pagelang'] = true;
4523 #$wgGroupPermissions['sysop']['upload_by_url'] = true;
4524 $wgGroupPermissions['sysop']['mergehistory'] = true;
4525
4526 // Permission to change users' group assignments
4527 $wgGroupPermissions['bureaucrat']['userrights'] = true;
4528 $wgGroupPermissions['bureaucrat']['noratelimit'] = true;
4529 // Permission to change users' groups assignments across wikis
4530 #$wgGroupPermissions['bureaucrat']['userrights-interwiki'] = true;
4531 // Permission to export pages including linked pages regardless of $wgExportMaxLinkDepth
4532 #$wgGroupPermissions['bureaucrat']['override-export-depth'] = true;
4533
4534 #$wgGroupPermissions['sysop']['deletelogentry'] = true;
4535 #$wgGroupPermissions['sysop']['deleterevision'] = true;
4536 // To hide usernames from users and Sysops
4537 #$wgGroupPermissions['suppress']['hideuser'] = true;
4538 // To hide revisions/log items from users and Sysops
4539 #$wgGroupPermissions['suppress']['suppressrevision'] = true;
4540 // To view revisions/log items hidden from users and Sysops
4541 #$wgGroupPermissions['suppress']['viewsuppressed'] = true;
4542 // For private suppression log access
4543 #$wgGroupPermissions['suppress']['suppressionlog'] = true;
4544
4545 /**
4546 * The developer group is deprecated, but can be activated if need be
4547 * to use the 'lockdb' and 'unlockdb' special pages. Those require
4548 * that a lock file be defined and creatable/removable by the web
4549 * server.
4550 */
4551 # $wgGroupPermissions['developer']['siteadmin'] = true;
4552
4553 /** @endcond */
4554
4555 /**
4556 * Permission keys revoked from users in each group.
4557 *
4558 * This acts the same way as wgGroupPermissions above, except that
4559 * if the user is in a group here, the permission will be removed from them.
4560 *
4561 * Improperly setting this could mean that your users will be unable to perform
4562 * certain essential tasks, so use at your own risk!
4563 */
4564 $wgRevokePermissions = array();
4565
4566 /**
4567 * Implicit groups, aren't shown on Special:Listusers or somewhere else
4568 */
4569 $wgImplicitGroups = array( '*', 'user', 'autoconfirmed' );
4570
4571 /**
4572 * A map of group names that the user is in, to group names that those users
4573 * are allowed to add or revoke.
4574 *
4575 * Setting the list of groups to add or revoke to true is equivalent to "any
4576 * group".
4577 *
4578 * @par Example:
4579 * To allow sysops to add themselves to the "bot" group:
4580 * @code
4581 * $wgGroupsAddToSelf = array( 'sysop' => array( 'bot' ) );
4582 * @endcode
4583 *
4584 * @par Example:
4585 * Implicit groups may be used for the source group, for instance:
4586 * @code
4587 * $wgGroupsRemoveFromSelf = array( '*' => true );
4588 * @endcode
4589 * This allows users in the '*' group (i.e. any user) to remove themselves from
4590 * any group that they happen to be in.
4591 */
4592 $wgGroupsAddToSelf = array();
4593
4594 /**
4595 * @see $wgGroupsAddToSelf
4596 */
4597 $wgGroupsRemoveFromSelf = array();
4598
4599 /**
4600 * Set of available actions that can be restricted via action=protect
4601 * You probably shouldn't change this.
4602 * Translated through restriction-* messages.
4603 * Title::getRestrictionTypes() will remove restrictions that are not
4604 * applicable to a specific title (create and upload)
4605 */
4606 $wgRestrictionTypes = array( 'create', 'edit', 'move', 'upload' );
4607
4608 /**
4609 * Rights which can be required for each protection level (via action=protect)
4610 *
4611 * You can add a new protection level that requires a specific
4612 * permission by manipulating this array. The ordering of elements
4613 * dictates the order on the protection form's lists.
4614 *
4615 * - '' will be ignored (i.e. unprotected)
4616 * - 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility
4617 * - 'sysop' is quietly rewritten to 'editprotected' for backwards compatibility
4618 */
4619 $wgRestrictionLevels = array( '', 'autoconfirmed', 'sysop' );
4620
4621 /**
4622 * Restriction levels that can be used with cascading protection
4623 *
4624 * A page can only be protected with cascading protection if the
4625 * requested restriction level is included in this array.
4626 *
4627 * 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility.
4628 * 'sysop' is quietly rewritten to 'editprotected' for backwards compatibility.
4629 */
4630 $wgCascadingRestrictionLevels = array( 'sysop' );
4631
4632 /**
4633 * Restriction levels that should be considered "semiprotected"
4634 *
4635 * Certain places in the interface recognize a dichotomy between "protected"
4636 * and "semiprotected", without further distinguishing the specific levels. In
4637 * general, if anyone can be eligible to edit a protection level merely by
4638 * reaching some condition in $wgAutopromote, it should probably be considered
4639 * "semiprotected".
4640 *
4641 * 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility.
4642 * 'sysop' is not changed, since it really shouldn't be here.
4643 */
4644 $wgSemiprotectedRestrictionLevels = array( 'autoconfirmed' );
4645
4646 /**
4647 * Set the minimum permissions required to edit pages in each
4648 * namespace. If you list more than one permission, a user must
4649 * have all of them to edit pages in that namespace.
4650 *
4651 * @note NS_MEDIAWIKI is implicitly restricted to 'editinterface'.
4652 */
4653 $wgNamespaceProtection = array();
4654
4655 /**
4656 * Pages in namespaces in this array can not be used as templates.
4657 *
4658 * Elements MUST be numeric namespace ids, you can safely use the MediaWiki
4659 * namespaces constants (NS_USER, NS_MAIN...).
4660 *
4661 * Among other things, this may be useful to enforce read-restrictions
4662 * which may otherwise be bypassed by using the template mechanism.
4663 */
4664 $wgNonincludableNamespaces = array();
4665
4666 /**
4667 * Number of seconds an account is required to age before it's given the
4668 * implicit 'autoconfirm' group membership. This can be used to limit
4669 * privileges of new accounts.
4670 *
4671 * Accounts created by earlier versions of the software may not have a
4672 * recorded creation date, and will always be considered to pass the age test.
4673 *
4674 * When left at 0, all registered accounts will pass.
4675 *
4676 * @par Example:
4677 * Set automatic confirmation to 10 minutes (which is 600 seconds):
4678 * @code
4679 * $wgAutoConfirmAge = 600; // ten minutes
4680 * @endcode
4681 * Set age to one day:
4682 * @code
4683 * $wgAutoConfirmAge = 3600*24; // one day
4684 * @endcode
4685 */
4686 $wgAutoConfirmAge = 0;
4687
4688 /**
4689 * Number of edits an account requires before it is autoconfirmed.
4690 * Passing both this AND the time requirement is needed. Example:
4691 *
4692 * @par Example:
4693 * @code
4694 * $wgAutoConfirmCount = 50;
4695 * @endcode
4696 */
4697 $wgAutoConfirmCount = 0;
4698
4699 /**
4700 * Automatically add a usergroup to any user who matches certain conditions.
4701 *
4702 * @todo Redocument $wgAutopromote
4703 *
4704 * The format is
4705 * array( '&' or '|' or '^' or '!', cond1, cond2, ... )
4706 * where cond1, cond2, ... are themselves conditions; *OR*
4707 * APCOND_EMAILCONFIRMED, *OR*
4708 * array( APCOND_EMAILCONFIRMED ), *OR*
4709 * array( APCOND_EDITCOUNT, number of edits ), *OR*
4710 * array( APCOND_AGE, seconds since registration ), *OR*
4711 * array( APCOND_INGROUPS, group1, group2, ... ), *OR*
4712 * array( APCOND_ISIP, ip ), *OR*
4713 * array( APCOND_IPINRANGE, range ), *OR*
4714 * array( APCOND_AGE_FROM_EDIT, seconds since first edit ), *OR*
4715 * array( APCOND_BLOCKED ), *OR*
4716 * array( APCOND_ISBOT ), *OR*
4717 * similar constructs defined by extensions.
4718 *
4719 * If $wgEmailAuthentication is off, APCOND_EMAILCONFIRMED will be true for any
4720 * user who has provided an e-mail address.
4721 */
4722 $wgAutopromote = array(
4723 'autoconfirmed' => array( '&',
4724 array( APCOND_EDITCOUNT, &$wgAutoConfirmCount ),
4725 array( APCOND_AGE, &$wgAutoConfirmAge ),
4726 ),
4727 );
4728
4729 /**
4730 * Automatically add a usergroup to any user who matches certain conditions.
4731 *
4732 * Does not add the user to the group again if it has been removed.
4733 * Also, does not remove the group if the user no longer meets the criteria.
4734 *
4735 * The format is:
4736 * @code
4737 * array( event => criteria, ... )
4738 * @endcode
4739 * Where event is either:
4740 * - 'onEdit' (when user edits)
4741 * - 'onView' (when user views the wiki)
4742 *
4743 * Criteria has the same format as $wgAutopromote
4744 *
4745 * @see $wgAutopromote
4746 * @since 1.18
4747 */
4748 $wgAutopromoteOnce = array(
4749 'onEdit' => array(),
4750 'onView' => array()
4751 );
4752
4753 /**
4754 * Put user rights log entries for autopromotion in recent changes?
4755 * @since 1.18
4756 */
4757 $wgAutopromoteOnceLogInRC = true;
4758
4759 /**
4760 * $wgAddGroups and $wgRemoveGroups can be used to give finer control over who
4761 * can assign which groups at Special:Userrights.
4762 *
4763 * @par Example:
4764 * Bureaucrats can add any group:
4765 * @code
4766 * $wgAddGroups['bureaucrat'] = true;
4767 * @endcode
4768 * Bureaucrats can only remove bots and sysops:
4769 * @code
4770 * $wgRemoveGroups['bureaucrat'] = array( 'bot', 'sysop' );
4771 * @endcode
4772 * Sysops can make bots:
4773 * @code
4774 * $wgAddGroups['sysop'] = array( 'bot' );
4775 * @endcode
4776 * Sysops can disable other sysops in an emergency, and disable bots:
4777 * @code
4778 * $wgRemoveGroups['sysop'] = array( 'sysop', 'bot' );
4779 * @endcode
4780 */
4781 $wgAddGroups = array();
4782
4783 /**
4784 * @see $wgAddGroups
4785 */
4786 $wgRemoveGroups = array();
4787
4788 /**
4789 * A list of available rights, in addition to the ones defined by the core.
4790 * For extensions only.
4791 */
4792 $wgAvailableRights = array();
4793
4794 /**
4795 * Optional to restrict deletion of pages with higher revision counts
4796 * to users with the 'bigdelete' permission. (Default given to sysops.)
4797 */
4798 $wgDeleteRevisionsLimit = 0;
4799
4800 /**
4801 * The maximum number of edits a user can have and
4802 * can still be hidden by users with the hideuser permission.
4803 * This is limited for performance reason.
4804 * Set to false to disable the limit.
4805 * @since 1.23
4806 */
4807 $wgHideUserContribLimit = 1000;
4808
4809 /**
4810 * Number of accounts each IP address may create, 0 to disable.
4811 *
4812 * @warning Requires memcached
4813 */
4814 $wgAccountCreationThrottle = 0;
4815
4816 /**
4817 * Edits matching these regular expressions in body text
4818 * will be recognised as spam and rejected automatically.
4819 *
4820 * There's no administrator override on-wiki, so be careful what you set. :)
4821 * May be an array of regexes or a single string for backwards compatibility.
4822 *
4823 * @see http://en.wikipedia.org/wiki/Regular_expression
4824 *
4825 * @note Each regex needs a beginning/end delimiter, eg: # or /
4826 */
4827 $wgSpamRegex = array();
4828
4829 /**
4830 * Same as the above except for edit summaries
4831 */
4832 $wgSummarySpamRegex = array();
4833
4834 /**
4835 * Whether to use DNS blacklists in $wgDnsBlacklistUrls to check for open
4836 * proxies
4837 * @since 1.16
4838 */
4839 $wgEnableDnsBlacklist = false;
4840
4841 /**
4842 * List of DNS blacklists to use, if $wgEnableDnsBlacklist is true.
4843 *
4844 * This is an array of either a URL or an array with the URL and a key (should
4845 * the blacklist require a key).
4846 *
4847 * @par Example:
4848 * @code
4849 * $wgDnsBlacklistUrls = array(
4850 * // String containing URL
4851 * 'http.dnsbl.sorbs.net.',
4852 * // Array with URL and key, for services that require a key
4853 * array( 'dnsbl.httpbl.net.', 'mykey' ),
4854 * // Array with just the URL. While this works, it is recommended that you
4855 * // just use a string as shown above
4856 * array( 'opm.tornevall.org.' )
4857 * );
4858 * @endcode
4859 *
4860 * @note You should end the domain name with a . to avoid searching your
4861 * eventual domain search suffixes.
4862 * @since 1.16
4863 */
4864 $wgDnsBlacklistUrls = array( 'http.dnsbl.sorbs.net.' );
4865
4866 /**
4867 * Proxy whitelist, list of addresses that are assumed to be non-proxy despite
4868 * what the other methods might say.
4869 */
4870 $wgProxyWhitelist = array();
4871
4872 /**
4873 * Whether to look at the X-Forwarded-For header's list of (potentially spoofed)
4874 * IPs and apply IP blocks to them. This allows for IP blocks to work with correctly-configured
4875 * (transparent) proxies without needing to block the proxies themselves.
4876 */
4877 $wgApplyIpBlocksToXff = false;
4878
4879 /**
4880 * Simple rate limiter options to brake edit floods.
4881 *
4882 * Maximum number actions allowed in the given number of seconds; after that
4883 * the violating client receives HTTP 500 error pages until the period
4884 * elapses.
4885 *
4886 * @par Example:
4887 * To set a generic maximum of 4 hits in 60 seconds:
4888 * @code
4889 * $wgRateLimits = array( 4, 60 );
4890 * @endcode
4891 *
4892 * You could also limit per action and then type of users. See the inline
4893 * code for a template to use.
4894 *
4895 * This option set is experimental and likely to change.
4896 *
4897 * @warning Requires memcached.
4898 */
4899 $wgRateLimits = array(
4900 'edit' => array(
4901 'anon' => null, // for any and all anonymous edits (aggregate)
4902 'user' => null, // for each logged-in user
4903 'newbie' => null, // for each recent (autoconfirmed) account; overrides 'user'
4904 'ip' => null, // for each anon and recent account
4905 'subnet' => null, // ... within a /24 subnet in IPv4 or /64 in IPv6
4906 ),
4907 'move' => array(
4908 'user' => null,
4909 'newbie' => null,
4910 'ip' => null,
4911 'subnet' => null,
4912 ),
4913 'mailpassword' => array( // triggering password resets emails
4914 'anon' => null,
4915 ),
4916 'emailuser' => array( // emailing other users using MediaWiki
4917 'user' => null,
4918 ),
4919 'linkpurge' => array( // purges of link tables
4920 'anon' => null,
4921 'user' => null,
4922 'newbie' => null,
4923 'ip' => null,
4924 'subnet' => null,
4925 ),
4926 'renderfile' => array( // files rendered via thumb.php or thumb_handler.php
4927 'anon' => null,
4928 'user' => null,
4929 'newbie' => null,
4930 'ip' => null,
4931 'subnet' => null,
4932 ),
4933 'renderfile-nonstandard' => array( // same as above but for non-standard thumbnails
4934 'anon' => null,
4935 'user' => null,
4936 'newbie' => null,
4937 'ip' => null,
4938 'subnet' => null,
4939 ),
4940 );
4941
4942 /**
4943 * Set to a filename to log rate limiter hits.
4944 *
4945 * @deprecated since 1.23, use $wgDebugLogGroups['ratelimit'] instead
4946 */
4947 $wgRateLimitLog = null;
4948
4949 /**
4950 * Array of IPs which should be excluded from rate limits.
4951 * This may be useful for whitelisting NAT gateways for conferences, etc.
4952 */
4953 $wgRateLimitsExcludedIPs = array();
4954
4955 /**
4956 * Log IP addresses in the recentchanges table; can be accessed only by
4957 * extensions (e.g. CheckUser) or a DB admin
4958 * Used for retroactive autoblocks
4959 */
4960 $wgPutIPinRC = true;
4961
4962 /**
4963 * Integer defining default number of entries to show on
4964 * special pages which are query-pages such as Special:Whatlinkshere.
4965 */
4966 $wgQueryPageDefaultLimit = 50;
4967
4968 /**
4969 * Limit password attempts to X attempts per Y seconds per IP per account.
4970 *
4971 * @warning Requires memcached.
4972 */
4973 $wgPasswordAttemptThrottle = array( 'count' => 5, 'seconds' => 300 );
4974
4975 /** @} */ # end of user rights settings
4976
4977 /************************************************************************//**
4978 * @name Proxy scanner settings
4979 * @{
4980 */
4981
4982 /**
4983 * This should always be customised in LocalSettings.php
4984 */
4985 $wgSecretKey = false;
4986
4987 /**
4988 * Big list of banned IP addresses.
4989 *
4990 * This can have the following formats:
4991 * - An array of addresses, either in the values
4992 * or the keys (for backward compatibility)
4993 * - A string, in that case this is the path to a file
4994 * containing the list of IP addresses, one per line
4995 */
4996 $wgProxyList = array();
4997
4998 /** @} */ # end of proxy scanner settings
4999
5000 /************************************************************************//**
5001 * @name Cookie settings
5002 * @{
5003 */
5004
5005 /**
5006 * Default cookie lifetime, in seconds. Setting to 0 makes all cookies session-only.
5007 */
5008 $wgCookieExpiration = 180 * 86400;
5009
5010 /**
5011 * Set to set an explicit domain on the login cookies eg, "justthis.domain.org"
5012 * or ".any.subdomain.net"
5013 */
5014 $wgCookieDomain = '';
5015
5016 /**
5017 * Set this variable if you want to restrict cookies to a certain path within
5018 * the domain specified by $wgCookieDomain.
5019 */
5020 $wgCookiePath = '/';
5021
5022 /**
5023 * Whether the "secure" flag should be set on the cookie. This can be:
5024 * - true: Set secure flag
5025 * - false: Don't set secure flag
5026 * - "detect": Set the secure flag if $wgServer is set to an HTTPS URL
5027 */
5028 $wgCookieSecure = 'detect';
5029
5030 /**
5031 * By default, MediaWiki checks if the client supports cookies during the
5032 * login process, so that it can display an informative error message if
5033 * cookies are disabled. Set this to true if you want to disable this cookie
5034 * check.
5035 */
5036 $wgDisableCookieCheck = false;
5037
5038 /**
5039 * Cookies generated by MediaWiki have names starting with this prefix. Set it
5040 * to a string to use a custom prefix. Setting it to false causes the database
5041 * name to be used as a prefix.
5042 */
5043 $wgCookiePrefix = false;
5044
5045 /**
5046 * Set authentication cookies to HttpOnly to prevent access by JavaScript,
5047 * in browsers that support this feature. This can mitigates some classes of
5048 * XSS attack.
5049 */
5050 $wgCookieHttpOnly = true;
5051
5052 /**
5053 * A list of cookies that vary the cache (for use by extensions)
5054 */
5055 $wgCacheVaryCookies = array();
5056
5057 /**
5058 * Override to customise the session name
5059 */
5060 $wgSessionName = false;
5061
5062 /** @} */ # end of cookie settings }
5063
5064 /************************************************************************//**
5065 * @name LaTeX (mathematical formulas)
5066 * @{
5067 */
5068
5069 /**
5070 * To use inline TeX, you need to compile 'texvc' (in the 'math' subdirectory of
5071 * the MediaWiki package and have latex, dvips, gs (ghostscript), andconvert
5072 * (ImageMagick) installed and available in the PATH.
5073 * Please see math/README for more information.
5074 */
5075 $wgUseTeX = false;
5076
5077 /** @} */ # end LaTeX }
5078
5079 /************************************************************************//**
5080 * @name Profiling, testing and debugging
5081 *
5082 * To enable profiling, edit StartProfiler.php
5083 *
5084 * @{
5085 */
5086
5087 /**
5088 * Filename for debug logging. See https://www.mediawiki.org/wiki/How_to_debug
5089 * The debug log file should be not be publicly accessible if it is used, as it
5090 * may contain private data.
5091 */
5092 $wgDebugLogFile = '';
5093
5094 /**
5095 * Prefix for debug log lines
5096 */
5097 $wgDebugLogPrefix = '';
5098
5099 /**
5100 * If true, instead of redirecting, show a page with a link to the redirect
5101 * destination. This allows for the inspection of PHP error messages, and easy
5102 * resubmission of form data. For developer use only.
5103 */
5104 $wgDebugRedirects = false;
5105
5106 /**
5107 * If true, log debugging data from action=raw and load.php.
5108 * This is normally false to avoid overlapping debug entries due to gen=css
5109 * and gen=js requests.
5110 */
5111 $wgDebugRawPage = false;
5112
5113 /**
5114 * Send debug data to an HTML comment in the output.
5115 *
5116 * This may occasionally be useful when supporting a non-technical end-user.
5117 * It's more secure than exposing the debug log file to the web, since the
5118 * output only contains private data for the current user. But it's not ideal
5119 * for development use since data is lost on fatal errors and redirects.
5120 */
5121 $wgDebugComments = false;
5122
5123 /**
5124 * Extensive database transaction state debugging
5125 *
5126 * @since 1.20
5127 */
5128 $wgDebugDBTransactions = false;
5129
5130 /**
5131 * Write SQL queries to the debug log.
5132 *
5133 * This setting is only used $wgLBFactoryConf['class'] is set to
5134 * 'LBFactorySimple' and $wgDBservers is an empty array; otherwise
5135 * the DBO_DEBUG flag must be set in the 'flags' option of the database
5136 * connection to achieve the same functionality.
5137 */
5138 $wgDebugDumpSql = false;
5139
5140 /**
5141 * Trim logged SQL queries to this many bytes. Set 0/false/null to do no
5142 * trimming.
5143 * @since 1.24
5144 */
5145 $wgDebugDumpSqlLength = 500;
5146
5147 /**
5148 * Map of string log group names to log destinations.
5149 *
5150 * If set, wfDebugLog() output for that group will go to that file instead
5151 * of the regular $wgDebugLogFile. Useful for enabling selective logging
5152 * in production.
5153 *
5154 * Log destinations may be one of the following:
5155 * - false to completely remove from the output, including from $wgDebugLogFile.
5156 * - string values specifying a filename or URI.
5157 * - associative array mapping 'destination' key to the desired filename or URI.
5158 * The associative array may also contain a 'sample' key with an integer value,
5159 * specifying a sampling factor.
5160 *
5161 * @par Example:
5162 * @code
5163 * $wgDebugLogGroups['redis'] = '/var/log/mediawiki/redis.log';
5164 * @endcode
5165 *
5166 * @par Advanced example:
5167 * @code
5168 * $wgDebugLogGroups['memcached'] = (
5169 * 'destination' => '/var/log/mediawiki/memcached.log',
5170 * 'sample' => 1000, // log 1 message out of every 1,000.
5171 * );
5172 * @endcode
5173 */
5174 $wgDebugLogGroups = array();
5175
5176 /**
5177 * Display debug data at the bottom of the main content area.
5178 *
5179 * Useful for developers and technical users trying to working on a closed wiki.
5180 */
5181 $wgShowDebug = false;
5182
5183 /**
5184 * Prefix debug messages with relative timestamp. Very-poor man's profiler.
5185 * Since 1.19 also includes memory usage.
5186 */
5187 $wgDebugTimestamps = false;
5188
5189 /**
5190 * Print HTTP headers for every request in the debug information.
5191 */
5192 $wgDebugPrintHttpHeaders = true;
5193
5194 /**
5195 * Show the contents of $wgHooks in Special:Version
5196 */
5197 $wgSpecialVersionShowHooks = false;
5198
5199 /**
5200 * Whether to show "we're sorry, but there has been a database error" pages.
5201 * Displaying errors aids in debugging, but may display information useful
5202 * to an attacker.
5203 */
5204 $wgShowSQLErrors = false;
5205
5206 /**
5207 * If set to true, uncaught exceptions will print a complete stack trace
5208 * to output. This should only be used for debugging, as it may reveal
5209 * private information in function parameters due to PHP's backtrace
5210 * formatting.
5211 */
5212 $wgShowExceptionDetails = false;
5213
5214 /**
5215 * If true, show a backtrace for database errors
5216 *
5217 * @note This setting only applies when connection errors and query errors are
5218 * reported in the normal manner. $wgShowExceptionDetails applies in other cases,
5219 * including those in which an uncaught exception is thrown from within the
5220 * exception handler.
5221 */
5222 $wgShowDBErrorBacktrace = false;
5223
5224 /**
5225 * If true, send the exception backtrace to the error log
5226 */
5227 $wgLogExceptionBacktrace = true;
5228
5229 /**
5230 * Expose backend server host names through the API and various HTML comments
5231 */
5232 $wgShowHostnames = false;
5233
5234 /**
5235 * Override server hostname detection with a hardcoded value.
5236 * Should be a string, default false.
5237 * @since 1.20
5238 */
5239 $wgOverrideHostname = false;
5240
5241 /**
5242 * If set to true MediaWiki will throw notices for some possible error
5243 * conditions and for deprecated functions.
5244 */
5245 $wgDevelopmentWarnings = false;
5246
5247 /**
5248 * Release limitation to wfDeprecated warnings, if set to a release number
5249 * development warnings will not be generated for deprecations added in releases
5250 * after the limit.
5251 */
5252 $wgDeprecationReleaseLimit = false;
5253
5254 /**
5255 * Only record profiling info for pages that took longer than this
5256 */
5257 $wgProfileLimit = 0.0;
5258
5259 /**
5260 * Don't put non-profiling info into log file
5261 *
5262 * @deprecated since 1.23, set the log file in
5263 * $wgDebugLogGroups['profileoutput'] instead.
5264 */
5265 $wgProfileOnly = false;
5266
5267 /**
5268 * If true, print a raw call tree instead of per-function report
5269 */
5270 $wgProfileCallTree = false;
5271
5272 /**
5273 * Should application server host be put into profiling table
5274 */
5275 $wgProfilePerHost = false;
5276
5277 /**
5278 * Host for UDP profiler.
5279 *
5280 * The host should be running a daemon which can be obtained from MediaWiki
5281 * Git at:
5282 * http://git.wikimedia.org/tree/operations%2Fsoftware.git/master/udpprofile
5283 */
5284 $wgUDPProfilerHost = '127.0.0.1';
5285
5286 /**
5287 * Port for UDP profiler.
5288 * @see $wgUDPProfilerHost
5289 */
5290 $wgUDPProfilerPort = '3811';
5291
5292 /**
5293 * Format string for the UDP profiler. The UDP profiler invokes sprintf() with
5294 * (profile id, count, cpu, cpu_sq, real, real_sq, entry name, memory) as
5295 * arguments. You can use sprintf's argument numbering/swapping capability to
5296 * repeat, re-order or omit fields.
5297 *
5298 * @see $wgStatsFormatString
5299 * @since 1.22
5300 */
5301 $wgUDPProfilerFormatString = "%s - %d %f %f %f %f %s\n";
5302
5303 /**
5304 * Output debug message on every wfProfileIn/wfProfileOut
5305 */
5306 $wgDebugFunctionEntry = false;
5307
5308 /**
5309 * Destination for wfIncrStats() data...
5310 * 'cache' to go into the system cache, if enabled (memcached)
5311 * 'udp' to be sent to the UDP profiler (see $wgUDPProfilerHost)
5312 * false to disable
5313 */
5314 $wgStatsMethod = 'cache';
5315
5316 /**
5317 * When $wgStatsMethod is 'udp', setting this to a string allows statistics to
5318 * be aggregated over more than one wiki. The string will be used in place of
5319 * the DB name in outgoing UDP packets. If this is set to false, the DB name
5320 * will be used.
5321 */
5322 $wgAggregateStatsID = false;
5323
5324 /**
5325 * When $wgStatsMethod is 'udp', this variable specifies how stats should be
5326 * formatted. Its value should be a format string suitable for a sprintf()
5327 * invocation with (id, count, key) arguments, where 'id' is either
5328 * $wgAggregateStatsID or the DB name, 'count' is the value by which the metric
5329 * is being incremented, and 'key' is the metric name.
5330 *
5331 * @see $wgUDPProfilerFormatString
5332 * @see $wgAggregateStatsID
5333 * @since 1.22
5334 */
5335 $wgStatsFormatString = "stats/%s - %s 1 1 1 1 %s\n";
5336
5337 /**
5338 * Whereas to count the number of time an article is viewed.
5339 * Does not work if pages are cached (for example with squid).
5340 */
5341 $wgDisableCounters = false;
5342
5343 /**
5344 * InfoAction retrieves a list of transclusion links (both to and from).
5345 * This number puts a limit on that query in the case of highly transcluded
5346 * templates.
5347 */
5348 $wgPageInfoTransclusionLimit = 50;
5349
5350 /**
5351 * Set this to an integer to only do synchronous site_stats updates
5352 * one every *this many* updates. The other requests go into pending
5353 * delta values in $wgMemc. Make sure that $wgMemc is a global cache.
5354 * If set to -1, updates *only* go to $wgMemc (useful for daemons).
5355 */
5356 $wgSiteStatsAsyncFactor = false;
5357
5358 /**
5359 * Parser test suite files to be run by parserTests.php when no specific
5360 * filename is passed to it.
5361 *
5362 * Extensions may add their own tests to this array, or site-local tests
5363 * may be added via LocalSettings.php
5364 *
5365 * Use full paths.
5366 */
5367 $wgParserTestFiles = array(
5368 "$IP/tests/parser/parserTests.txt",
5369 "$IP/tests/parser/extraParserTests.txt"
5370 );
5371
5372 /**
5373 * Allow running of javascript test suites via [[Special:JavaScriptTest]] (such as QUnit).
5374 */
5375 $wgEnableJavaScriptTest = false;
5376
5377 /**
5378 * Configuration for javascript testing.
5379 */
5380 $wgJavaScriptTestConfig = array(
5381 'qunit' => array(
5382 // Page where documentation can be found relevant to the QUnit test suite being ran.
5383 // Used in the intro paragraph on [[Special:JavaScriptTest/qunit]] for the
5384 // documentation link in the "javascripttest-qunit-intro" message.
5385 'documentation' => '//www.mediawiki.org/wiki/Manual:JavaScript_unit_testing',
5386 // If you are submitting the QUnit test suite to a TestSwarm instance,
5387 // point this to the "inject.js" script of that instance. This is was registers
5388 // the QUnit hooks to extract the test results and push them back up into the
5389 // TestSwarm database.
5390 // @example 'http://localhost/testswarm/js/inject.js'
5391 // @example '//integration.mediawiki.org/testswarm/js/inject.js'
5392 'testswarm-injectjs' => false,
5393 ),
5394 );
5395
5396 /**
5397 * Overwrite the caching key prefix with custom value.
5398 * @since 1.19
5399 */
5400 $wgCachePrefix = false;
5401
5402 /**
5403 * Display the new debugging toolbar. This also enables profiling on database
5404 * queries and other useful output.
5405 * Will disable file cache.
5406 *
5407 * @since 1.19
5408 */
5409 $wgDebugToolbar = false;
5410
5411 /** @} */ # end of profiling, testing and debugging }
5412
5413 /************************************************************************//**
5414 * @name Search
5415 * @{
5416 */
5417
5418 /**
5419 * Set this to true to disable the full text search feature.
5420 */
5421 $wgDisableTextSearch = false;
5422
5423 /**
5424 * Set to true to have nicer highlighted text in search results,
5425 * by default off due to execution overhead
5426 */
5427 $wgAdvancedSearchHighlighting = false;
5428
5429 /**
5430 * Regexp to match word boundaries, defaults for non-CJK languages
5431 * should be empty for CJK since the words are not separate
5432 */
5433 $wgSearchHighlightBoundaries = '[\p{Z}\p{P}\p{C}]';
5434
5435 /**
5436 * Template for OpenSearch suggestions, defaults to API action=opensearch
5437 *
5438 * Sites with heavy load would typically have these point to a custom
5439 * PHP wrapper to avoid firing up mediawiki for every keystroke
5440 *
5441 * Placeholders: {searchTerms}
5442 */
5443 $wgOpenSearchTemplate = false;
5444
5445 /**
5446 * Enable OpenSearch suggestions requested by MediaWiki. Set this to
5447 * false if you've disabled scripts that use api?action=opensearch and
5448 * want reduce load caused by cached scripts still pulling suggestions.
5449 * It will let the API fallback by responding with an empty array.
5450 */
5451 $wgEnableOpenSearchSuggest = true;
5452
5453 /**
5454 * Integer defining default number of entries to show on
5455 * OpenSearch call.
5456 */
5457 $wgOpenSearchDefaultLimit = 10;
5458
5459 /**
5460 * Expiry time for search suggestion responses
5461 */
5462 $wgSearchSuggestCacheExpiry = 1200;
5463
5464 /**
5465 * If you've disabled search semi-permanently, this also disables updates to the
5466 * table. If you ever re-enable, be sure to rebuild the search table.
5467 */
5468 $wgDisableSearchUpdate = false;
5469
5470 /**
5471 * List of namespaces which are searched by default.
5472 *
5473 * @par Example:
5474 * @code
5475 * $wgNamespacesToBeSearchedDefault[NS_MAIN] = true;
5476 * $wgNamespacesToBeSearchedDefault[NS_PROJECT] = true;
5477 * @endcode
5478 */
5479 $wgNamespacesToBeSearchedDefault = array(
5480 NS_MAIN => true,
5481 );
5482
5483 /**
5484 * Disable the internal MySQL-based search, to allow it to be
5485 * implemented by an extension instead.
5486 */
5487 $wgDisableInternalSearch = false;
5488
5489 /**
5490 * Set this to a URL to forward search requests to some external location.
5491 * If the URL includes '$1', this will be replaced with the URL-encoded
5492 * search term.
5493 *
5494 * @par Example:
5495 * To forward to Google you'd have something like:
5496 * @code
5497 * $wgSearchForwardUrl =
5498 * 'http://www.google.com/search?q=$1' .
5499 * '&domains=http://example.com' .
5500 * '&sitesearch=http://example.com' .
5501 * '&ie=utf-8&oe=utf-8';
5502 * @endcode
5503 */
5504 $wgSearchForwardUrl = null;
5505
5506 /**
5507 * Search form behavior.
5508 * - true = use Go & Search buttons
5509 * - false = use Go button & Advanced search link
5510 */
5511 $wgUseTwoButtonsSearchForm = true;
5512
5513 /**
5514 * Array of namespaces to generate a Google sitemap for when the
5515 * maintenance/generateSitemap.php script is run, or false if one is to be
5516 * generated for all namespaces.
5517 */
5518 $wgSitemapNamespaces = false;
5519
5520 /**
5521 * Custom namespace priorities for sitemaps. Setting this will allow you to
5522 * set custom priorities to namespaces when sitemaps are generated using the
5523 * maintenance/generateSitemap.php script.
5524 *
5525 * This should be a map of namespace IDs to priority
5526 * @par Example:
5527 * @code
5528 * $wgSitemapNamespacesPriorities = array(
5529 * NS_USER => '0.9',
5530 * NS_HELP => '0.0',
5531 * );
5532 * @endcode
5533 */
5534 $wgSitemapNamespacesPriorities = false;
5535
5536 /**
5537 * If true, searches for IP addresses will be redirected to that IP's
5538 * contributions page. E.g. searching for "1.2.3.4" will redirect to
5539 * [[Special:Contributions/1.2.3.4]]
5540 */
5541 $wgEnableSearchContributorsByIP = true;
5542
5543 /** @} */ # end of search settings
5544
5545 /************************************************************************//**
5546 * @name Edit user interface
5547 * @{
5548 */
5549
5550 /**
5551 * Path to the GNU diff3 utility. If the file doesn't exist, edit conflicts will
5552 * fall back to the old behavior (no merging).
5553 */
5554 $wgDiff3 = '/usr/bin/diff3';
5555
5556 /**
5557 * Path to the GNU diff utility.
5558 */
5559 $wgDiff = '/usr/bin/diff';
5560
5561 /**
5562 * Which namespaces have special treatment where they should be preview-on-open
5563 * Internally only Category: pages apply, but using this extensions (e.g. Semantic MediaWiki)
5564 * can specify namespaces of pages they have special treatment for
5565 */
5566 $wgPreviewOnOpenNamespaces = array(
5567 NS_CATEGORY => true
5568 );
5569
5570 /**
5571 * Go button goes straight to the edit screen if the article doesn't exist.
5572 */
5573 $wgGoToEdit = false;
5574
5575 /**
5576 * Enable the UniversalEditButton for browsers that support it
5577 * (currently only Firefox with an extension)
5578 * See http://universaleditbutton.org for more background information
5579 */
5580 $wgUniversalEditButton = true;
5581
5582 /**
5583 * If user doesn't specify any edit summary when making a an edit, MediaWiki
5584 * will try to automatically create one. This feature can be disabled by set-
5585 * ting this variable false.
5586 */
5587 $wgUseAutomaticEditSummaries = true;
5588
5589 /** @} */ # end edit UI }
5590
5591 /************************************************************************//**
5592 * @name Maintenance
5593 * See also $wgSiteNotice
5594 * @{
5595 */
5596
5597 /**
5598 * @cond file_level_code
5599 * Set $wgCommandLineMode if it's not set already, to avoid notices
5600 */
5601 if ( !isset( $wgCommandLineMode ) ) {
5602 $wgCommandLineMode = false;
5603 }
5604 /** @endcond */
5605
5606 /**
5607 * For colorized maintenance script output, is your terminal background dark ?
5608 */
5609 $wgCommandLineDarkBg = false;
5610
5611 /**
5612 * Set this to a string to put the wiki into read-only mode. The text will be
5613 * used as an explanation to users.
5614 *
5615 * This prevents most write operations via the web interface. Cache updates may
5616 * still be possible. To prevent database writes completely, use the read_only
5617 * option in MySQL.
5618 */
5619 $wgReadOnly = null;
5620
5621 /**
5622 * If this lock file exists (size > 0), the wiki will be forced into read-only mode.
5623 * Its contents will be shown to users as part of the read-only warning
5624 * message.
5625 *
5626 * Will default to "{$wgUploadDirectory}/lock_yBgMBwiR" in Setup.php
5627 */
5628 $wgReadOnlyFile = false;
5629
5630 /**
5631 * When you run the web-based upgrade utility, it will tell you what to set
5632 * this to in order to authorize the upgrade process. It will subsequently be
5633 * used as a password, to authorize further upgrades.
5634 *
5635 * For security, do not set this to a guessable string. Use the value supplied
5636 * by the install/upgrade process. To cause the upgrader to generate a new key,
5637 * delete the old key from LocalSettings.php.
5638 */
5639 $wgUpgradeKey = false;
5640
5641 /**
5642 * Fully specified path to git binary
5643 */
5644 $wgGitBin = '/usr/bin/git';
5645
5646 /**
5647 * Map GIT repository URLs to viewer URLs to provide links in Special:Version
5648 *
5649 * Key is a pattern passed to preg_match() and preg_replace(),
5650 * without the delimiters (which are #) and must match the whole URL.
5651 * The value is the replacement for the key (it can contain $1, etc.)
5652 * %h will be replaced by the short SHA-1 (7 first chars) and %H by the
5653 * full SHA-1 of the HEAD revision.
5654 * %r will be replaced with a URL-encoded version of $1.
5655 *
5656 * @since 1.20
5657 */
5658 $wgGitRepositoryViewers = array(
5659 'https://(?:[a-z0-9_]+@)?gerrit.wikimedia.org/r/(?:p/)?(.*)' =>
5660 'https://git.wikimedia.org/tree/%r/%H',
5661 'ssh://(?:[a-z0-9_]+@)?gerrit.wikimedia.org:29418/(.*)' =>
5662 'https://git.wikimedia.org/tree/%r/%H',
5663 );
5664
5665 /** @} */ # End of maintenance }
5666
5667 /************************************************************************//**
5668 * @name Recent changes, new pages, watchlist and history
5669 * @{
5670 */
5671
5672 /**
5673 * Recentchanges items are periodically purged; entries older than this many
5674 * seconds will go.
5675 * Default: 13 weeks = about three months
5676 */
5677 $wgRCMaxAge = 13 * 7 * 24 * 3600;
5678
5679 /**
5680 * Filter $wgRCLinkDays by $wgRCMaxAge to avoid showing links for numbers
5681 * higher than what will be stored. Note that this is disabled by default
5682 * because we sometimes do have RC data which is beyond the limit for some
5683 * reason, and some users may use the high numbers to display that data which
5684 * is still there.
5685 */
5686 $wgRCFilterByAge = false;
5687
5688 /**
5689 * List of Limits options to list in the Special:Recentchanges and
5690 * Special:Recentchangeslinked pages.
5691 */
5692 $wgRCLinkLimits = array( 50, 100, 250, 500 );
5693
5694 /**
5695 * List of Days options to list in the Special:Recentchanges and
5696 * Special:Recentchangeslinked pages.
5697 */
5698 $wgRCLinkDays = array( 1, 3, 7, 14, 30 );
5699
5700 /**
5701 * Destinations to which notifications about recent changes
5702 * should be sent.
5703 *
5704 * As of MediaWiki 1.22, there are 2 supported 'engine' parameter option in core:
5705 * * 'UDPRCFeedEngine', which is used to send recent changes over UDP to the
5706 * specified server.
5707 * * 'RedisPubSubFeedEngine', which is used to send recent changes to Redis.
5708 *
5709 * The common options are:
5710 * * 'uri' -- the address to which the notices are to be sent.
5711 * * 'formatter' -- the class name (implementing RCFeedFormatter) which will
5712 * produce the text to send. This can also be an object of the class.
5713 * * 'omit_bots' -- whether the bot edits should be in the feed
5714 * * 'omit_anon' -- whether anonymous edits should be in the feed
5715 * * 'omit_user' -- whether edits by registered users should be in the feed
5716 * * 'omit_minor' -- whether minor edits should be in the feed
5717 * * 'omit_patrolled' -- whether patrolled edits should be in the feed
5718 *
5719 * The IRC-specific options are:
5720 * * 'add_interwiki_prefix' -- whether the titles should be prefixed with
5721 * the first entry in the $wgLocalInterwikis array (or the value of
5722 * $wgLocalInterwiki, if set)
5723 *
5724 * The JSON-specific options are:
5725 * * 'channel' -- if set, the 'channel' parameter is also set in JSON values.
5726 *
5727 * @example $wgRCFeeds['example'] = array(
5728 * 'formatter' => 'JSONRCFeedFormatter',
5729 * 'uri' => "udp://localhost:1336",
5730 * 'add_interwiki_prefix' => false,
5731 * 'omit_bots' => true,
5732 * );
5733 * @example $wgRCFeeds['exampleirc'] = array(
5734 * 'formatter' => 'IRCColourfulRCFeedFormatter',
5735 * 'uri' => "udp://localhost:1338",
5736 * 'add_interwiki_prefix' => false,
5737 * 'omit_bots' => true,
5738 * );
5739 * @since 1.22
5740 */
5741 $wgRCFeeds = array();
5742
5743 /**
5744 * Used by RecentChange::getEngine to find the correct engine to use for a given URI scheme.
5745 * Keys are scheme names, values are names of engine classes.
5746 */
5747 $wgRCEngines = array(
5748 'redis' => 'RedisPubSubFeedEngine',
5749 'udp' => 'UDPRCFeedEngine',
5750 );
5751
5752 /**
5753 * Use RC Patrolling to check for vandalism
5754 */
5755 $wgUseRCPatrol = true;
5756
5757 /**
5758 * Use new page patrolling to check new pages on Special:Newpages
5759 */
5760 $wgUseNPPatrol = true;
5761
5762 /**
5763 * Log autopatrol actions to the log table
5764 */
5765 $wgLogAutopatrol = true;
5766
5767 /**
5768 * Provide syndication feeds (RSS, Atom) for, e.g., Recentchanges, Newpages
5769 */
5770 $wgFeed = true;
5771
5772 /**
5773 * Set maximum number of results to return in syndication feeds (RSS, Atom) for
5774 * eg Recentchanges, Newpages.
5775 */
5776 $wgFeedLimit = 50;
5777
5778 /**
5779 * _Minimum_ timeout for cached Recentchanges feed, in seconds.
5780 * A cached version will continue to be served out even if changes
5781 * are made, until this many seconds runs out since the last render.
5782 *
5783 * If set to 0, feed caching is disabled. Use this for debugging only;
5784 * feed generation can be pretty slow with diffs.
5785 */
5786 $wgFeedCacheTimeout = 60;
5787
5788 /**
5789 * When generating Recentchanges RSS/Atom feed, diffs will not be generated for
5790 * pages larger than this size.
5791 */
5792 $wgFeedDiffCutoff = 32768;
5793
5794 /**
5795 * Override the site's default RSS/ATOM feed for recentchanges that appears on
5796 * every page. Some sites might have a different feed they'd like to promote
5797 * instead of the RC feed (maybe like a "Recent New Articles" or "Breaking news" one).
5798 * Should be a format as key (either 'rss' or 'atom') and an URL to the feed
5799 * as value.
5800 * @par Example:
5801 * Configure the 'atom' feed to http://example.com/somefeed.xml
5802 * @code
5803 * $wgSiteFeed['atom'] = "http://example.com/somefeed.xml";
5804 * @endcode
5805 */
5806 $wgOverrideSiteFeed = array();
5807
5808 /**
5809 * Available feeds objects.
5810 * Should probably only be defined when a page is syndicated ie when
5811 * $wgOut->isSyndicated() is true.
5812 */
5813 $wgFeedClasses = array(
5814 'rss' => 'RSSFeed',
5815 'atom' => 'AtomFeed',
5816 );
5817
5818 /**
5819 * Which feed types should we provide by default? This can include 'rss',
5820 * 'atom', neither, or both.
5821 */
5822 $wgAdvertisedFeedTypes = array( 'atom' );
5823
5824 /**
5825 * Show watching users in recent changes, watchlist and page history views
5826 */
5827 $wgRCShowWatchingUsers = false; # UPO
5828
5829 /**
5830 * Show watching users in Page views
5831 */
5832 $wgPageShowWatchingUsers = false;
5833
5834 /**
5835 * Show the amount of changed characters in recent changes
5836 */
5837 $wgRCShowChangedSize = true;
5838
5839 /**
5840 * If the difference between the character counts of the text
5841 * before and after the edit is below that value, the value will be
5842 * highlighted on the RC page.
5843 */
5844 $wgRCChangedSizeThreshold = 500;
5845
5846 /**
5847 * Show "Updated (since my last visit)" marker in RC view, watchlist and history
5848 * view for watched pages with new changes
5849 */
5850 $wgShowUpdatedMarker = true;
5851
5852 /**
5853 * Disable links to talk pages of anonymous users (IPs) in listings on special
5854 * pages like page history, Special:Recentchanges, etc.
5855 */
5856 $wgDisableAnonTalk = false;
5857
5858 /**
5859 * Enable filtering of categories in Recentchanges
5860 */
5861 $wgAllowCategorizedRecentChanges = false;
5862
5863 /**
5864 * Allow filtering by change tag in recentchanges, history, etc
5865 * Has no effect if no tags are defined in valid_tag.
5866 */
5867 $wgUseTagFilter = true;
5868
5869 /**
5870 * If set to an integer, pages that are watched by this many users or more
5871 * will not require the unwatchedpages permission to view the number of
5872 * watchers.
5873 *
5874 * @since 1.21
5875 */
5876 $wgUnwatchedPageThreshold = false;
5877
5878 /**
5879 * Flags (letter symbols) shown in recent changes and watchlist to indicate
5880 * certain types of edits.
5881 *
5882 * To register a new one:
5883 * @code
5884 * $wgRecentChangesFlags['flag'] => array(
5885 * // message for the letter displayed next to rows on changes lists
5886 * 'letter' => 'letter-msg',
5887 * // message for the tooltip of the letter
5888 * 'title' => 'tooltip-msg',
5889 * // optional (defaults to 'tooltip-msg'), message to use in the legend box
5890 * 'legend' => 'legend-msg',
5891 * // optional (defaults to 'flag'), CSS class to put on changes lists rows
5892 * 'class' => 'css-class',
5893 * );
5894 * @endcode
5895 *
5896 * @since 1.22
5897 */
5898 $wgRecentChangesFlags = array(
5899 'newpage' => array(
5900 'letter' => 'newpageletter',
5901 'title' => 'recentchanges-label-newpage',
5902 'legend' => 'recentchanges-legend-newpage',
5903 ),
5904 'minor' => array(
5905 'letter' => 'minoreditletter',
5906 'title' => 'recentchanges-label-minor',
5907 'legend' => 'recentchanges-legend-minor',
5908 'class' => 'minoredit',
5909 ),
5910 'bot' => array(
5911 'letter' => 'boteditletter',
5912 'title' => 'recentchanges-label-bot',
5913 'legend' => 'recentchanges-legend-bot',
5914 'class' => 'botedit',
5915 ),
5916 'unpatrolled' => array(
5917 'letter' => 'unpatrolledletter',
5918 'title' => 'recentchanges-label-unpatrolled',
5919 'legend' => 'recentchanges-legend-unpatrolled',
5920 ),
5921 );
5922
5923 /** @} */ # end RC/watchlist }
5924
5925 /************************************************************************//**
5926 * @name Copyright and credits settings
5927 * @{
5928 */
5929
5930 /**
5931 * Override for copyright metadata.
5932 *
5933 * This is the name of the page containing information about the wiki's copyright status,
5934 * which will be added as a link in the footer if it is specified. It overrides
5935 * $wgRightsUrl if both are specified.
5936 */
5937 $wgRightsPage = null;
5938
5939 /**
5940 * Set this to specify an external URL containing details about the content license used on your
5941 * wiki.
5942 * If $wgRightsPage is set then this setting is ignored.
5943 */
5944 $wgRightsUrl = null;
5945
5946 /**
5947 * If either $wgRightsUrl or $wgRightsPage is specified then this variable gives the text for the
5948 * link.
5949 * If using $wgRightsUrl then this value must be specified. If using $wgRightsPage then the name
5950 * of the page will also be used as the link if this variable is not set.
5951 */
5952 $wgRightsText = null;
5953
5954 /**
5955 * Override for copyright metadata.
5956 */
5957 $wgRightsIcon = null;
5958
5959 /**
5960 * Set this to some HTML to override the rights icon with an arbitrary logo
5961 * @deprecated since 1.18 Use $wgFooterIcons['copyright']['copyright']
5962 */
5963 $wgCopyrightIcon = null;
5964
5965 /**
5966 * Set this to true if you want detailed copyright information forms on Upload.
5967 */
5968 $wgUseCopyrightUpload = false;
5969
5970 /**
5971 * Set this to the number of authors that you want to be credited below an
5972 * article text. Set it to zero to hide the attribution block, and a negative
5973 * number (like -1) to show all authors. Note that this will require 2-3 extra
5974 * database hits, which can have a not insignificant impact on performance for
5975 * large wikis.
5976 */
5977 $wgMaxCredits = 0;
5978
5979 /**
5980 * If there are more than $wgMaxCredits authors, show $wgMaxCredits of them.
5981 * Otherwise, link to a separate credits page.
5982 */
5983 $wgShowCreditsIfMax = true;
5984
5985 /** @} */ # end of copyright and credits settings }
5986
5987 /************************************************************************//**
5988 * @name Import / Export
5989 * @{
5990 */
5991
5992 /**
5993 * List of interwiki prefixes for wikis we'll accept as sources for
5994 * Special:Import (for sysops). Since complete page history can be imported,
5995 * these should be 'trusted'.
5996 *
5997 * This can either be a regular array, or an associative map specifying
5998 * subprojects on the interwiki map of the target wiki, or a mix of the two,
5999 * e.g.
6000 * @code
6001 * $wgImportSources = array(
6002 * 'wikipedia' => array( 'cs', 'en', 'fr', 'zh' ),
6003 * 'wikispecies',
6004 * 'wikia' => array( 'animanga', 'brickipedia', 'desserts' ),
6005 * );
6006 * @endcode
6007 *
6008 * If a user has the 'import' permission but not the 'importupload' permission,
6009 * they will only be able to run imports through this transwiki interface.
6010 */
6011 $wgImportSources = array();
6012
6013 /**
6014 * Optional default target namespace for interwiki imports.
6015 * Can use this to create an incoming "transwiki"-style queue.
6016 * Set to numeric key, not the name.
6017 *
6018 * Users may override this in the Special:Import dialog.
6019 */
6020 $wgImportTargetNamespace = null;
6021
6022 /**
6023 * If set to false, disables the full-history option on Special:Export.
6024 * This is currently poorly optimized for long edit histories, so is
6025 * disabled on Wikimedia's sites.
6026 */
6027 $wgExportAllowHistory = true;
6028
6029 /**
6030 * If set nonzero, Special:Export requests for history of pages with
6031 * more revisions than this will be rejected. On some big sites things
6032 * could get bogged down by very very long pages.
6033 */
6034 $wgExportMaxHistory = 0;
6035
6036 /**
6037 * Return distinct author list (when not returning full history)
6038 */
6039 $wgExportAllowListContributors = false;
6040
6041 /**
6042 * If non-zero, Special:Export accepts a "pagelink-depth" parameter
6043 * up to this specified level, which will cause it to include all
6044 * pages linked to from the pages you specify. Since this number
6045 * can become *insanely large* and could easily break your wiki,
6046 * it's disabled by default for now.
6047 *
6048 * @warning There's a HARD CODED limit of 5 levels of recursion to prevent a
6049 * crazy-big export from being done by someone setting the depth number too
6050 * high. In other words, last resort safety net.
6051 */
6052 $wgExportMaxLinkDepth = 0;
6053
6054 /**
6055 * Whether to allow the "export all pages in namespace" option
6056 */
6057 $wgExportFromNamespaces = false;
6058
6059 /**
6060 * Whether to allow exporting the entire wiki into a single file
6061 */
6062 $wgExportAllowAll = false;
6063
6064 /** @} */ # end of import/export }
6065
6066 /*************************************************************************//**
6067 * @name Extensions
6068 * @{
6069 */
6070
6071 /**
6072 * A list of callback functions which are called once MediaWiki is fully
6073 * initialised
6074 */
6075 $wgExtensionFunctions = array();
6076
6077 /**
6078 * Extension messages files.
6079 *
6080 * Associative array mapping extension name to the filename where messages can be
6081 * found. The file should contain variable assignments. Any of the variables
6082 * present in languages/messages/MessagesEn.php may be defined, but $messages
6083 * is the most common.
6084 *
6085 * Variables defined in extensions will override conflicting variables defined
6086 * in the core.
6087 *
6088 * Since MediaWiki 1.23, use of this variable to define messages is discouraged; instead, store
6089 * messages in JSON format and use $wgMessagesDirs. For setting other variables than
6090 * $messages, $wgExtensionMessagesFiles should still be used. Use a DIFFERENT key because
6091 * any entry having a key that also exists in $wgMessagesDirs will be ignored.
6092 *
6093 * Extensions using the JSON message format can preserve backward compatibility with
6094 * earlier versions of MediaWiki by using a compatibility shim, such as one generated
6095 * by the generateJsonI18n.php maintenance script, listing it under the SAME key
6096 * as for the $wgMessagesDirs entry.
6097 *
6098 * @par Example:
6099 * @code
6100 * $wgExtensionMessagesFiles['ConfirmEdit'] = __DIR__.'/ConfirmEdit.i18n.php';
6101 * @endcode
6102 */
6103 $wgExtensionMessagesFiles = array();
6104
6105 /**
6106 * Extension messages directories.
6107 *
6108 * Associative array mapping extension name to the path of the directory where message files can
6109 * be found. The message files are expected to be JSON files named for their language code, e.g.
6110 * en.json, de.json, etc. Extensions with messages in multiple places may specify an array of
6111 * message directories.
6112 *
6113 * @par Simple example:
6114 * @code
6115 * $wgMessagesDirs['Example'] = __DIR__ . '/i18n';
6116 * @endcode
6117 *
6118 * @par Complex example:
6119 * @code
6120 * $wgMessagesDirs['Example'] = array(
6121 * __DIR__ . '/lib/ve/i18n',
6122 * __DIR__ . '/lib/oojs-ui/i18n',
6123 * __DIR__ . '/i18n',
6124 * )
6125 * @endcode
6126 * @since 1.23
6127 */
6128 $wgMessagesDirs = array(
6129 'core' => "$IP/languages/i18n",
6130 'oojs-ui' => "$IP/resources/lib/oojs-ui/i18n",
6131 );
6132
6133 /**
6134 * Array of files with list(s) of extension entry points to be used in
6135 * maintenance/mergeMessageFileList.php
6136 * @since 1.22
6137 */
6138 $wgExtensionEntryPointListFiles = array();
6139
6140 /**
6141 * Parser output hooks.
6142 * This is an associative array where the key is an extension-defined tag
6143 * (typically the extension name), and the value is a PHP callback.
6144 * These will be called as an OutputPageParserOutput hook, if the relevant
6145 * tag has been registered with the parser output object.
6146 *
6147 * Registration is done with $pout->addOutputHook( $tag, $data ).
6148 *
6149 * The callback has the form:
6150 * @code
6151 * function outputHook( $outputPage, $parserOutput, $data ) { ... }
6152 * @endcode
6153 */
6154 $wgParserOutputHooks = array();
6155
6156 /**
6157 * Whether to include the NewPP limit report as a HTML comment
6158 */
6159 $wgEnableParserLimitReporting = true;
6160
6161 /**
6162 * List of valid skin names
6163 *
6164 * The key should be the name in all lower case, the value should be a properly
6165 * cased name for the skin. This value will be prefixed with "Skin" to create
6166 * the class name of the skin to load. Use Skin::getSkinNames() as an accessor
6167 * if you wish to have access to the full list.
6168 */
6169 $wgValidSkinNames = array();
6170
6171 /**
6172 * Special page list.
6173 * See the top of SpecialPage.php for documentation.
6174 */
6175 $wgSpecialPages = array();
6176
6177 /**
6178 * Array mapping class names to filenames, for autoloading.
6179 */
6180 $wgAutoloadClasses = array();
6181
6182 /**
6183 * Switch controlling legacy case-insensitive classloading.
6184 * Do not disable if your wiki must support data created by PHP4, or by
6185 * MediaWiki 1.4 or earlier.
6186 */
6187 $wgAutoloadAttemptLowercase = true;
6188
6189 /**
6190 * An array of information about installed extensions keyed by their type.
6191 *
6192 * All but 'name', 'path' and 'author' can be omitted.
6193 *
6194 * @code
6195 * $wgExtensionCredits[$type][] = array(
6196 * 'path' => __FILE__,
6197 * 'name' => 'Example extension',
6198 * 'namemsg' => 'exampleextension-name',
6199 * 'author' => array(
6200 * 'Foo Barstein',
6201 * ),
6202 * 'version' => '1.9.0',
6203 * 'url' => 'http://example.org/example-extension/',
6204 * 'descriptionmsg' => 'exampleextension-desc',
6205 * 'license-name' => 'GPL-2.0',
6206 * );
6207 * @endcode
6208 *
6209 * The extensions are listed on Special:Version. This page also looks for a file
6210 * named COPYING or LICENSE (optional .txt extension) and provides a link to
6211 * view said file. When the 'license-name' key is specified, this file is
6212 * interpreted as wikitext.
6213 *
6214 * - $type: One of 'specialpage', 'parserhook', 'variable', 'media', 'antispam',
6215 * 'skin', 'api', or 'other', or any additional types as specified through the
6216 * ExtensionTypes hook as used in SpecialVersion::getExtensionTypes().
6217 *
6218 * - name: Name of extension as an inline string instead of localizable message.
6219 * Do not omit this even if 'namemsg' is provided, as it is used to override
6220 * the path Special:Version uses to find extension's license info, and is
6221 * required for backwards-compatibility with MediaWiki 1.23 and older.
6222 *
6223 * - namemsg (since MW 1.24): A message key for a message containing the
6224 * extension's name, if the name is localizable. (For example, skin names
6225 * usually are.)
6226 *
6227 * - author: A string or an array of strings. Authors can be linked using
6228 * the regular wikitext link syntax. To have an internationalized version of
6229 * "and others" show, add an element "...". This element can also be linked,
6230 * for instance "[http://example ...]".
6231 *
6232 * - descriptionmsg: A message key or an an array with message key and parameters:
6233 * `'descriptionmsg' => 'exampleextension-desc',`
6234 *
6235 * - description: Description of extension as an inline string instead of
6236 * localizable message (omit in favour of 'descriptionmsg').
6237 *
6238 * - license-name: Short name of the license (used as label for the link), such
6239 * as "GPL-2.0" or "MIT" (https://spdx.org/licenses/ for a list of identifiers).
6240 */
6241 $wgExtensionCredits = array();
6242
6243 /**
6244 * Authentication plugin.
6245 * @var $wgAuth AuthPlugin
6246 */
6247 $wgAuth = null;
6248
6249 /**
6250 * Global list of hooks.
6251 *
6252 * The key is one of the events made available by MediaWiki, you can find
6253 * a description for most of them in docs/hooks.txt. The array is used
6254 * internally by Hook:run().
6255 *
6256 * The value can be one of:
6257 *
6258 * - A function name:
6259 * @code
6260 * $wgHooks['event_name'][] = $function;
6261 * @endcode
6262 * - A function with some data:
6263 * @code
6264 * $wgHooks['event_name'][] = array( $function, $data );
6265 * @endcode
6266 * - A an object method:
6267 * @code
6268 * $wgHooks['event_name'][] = array( $object, 'method' );
6269 * @endcode
6270 * - A closure:
6271 * @code
6272 * $wgHooks['event_name'][] = function ( $hookParam ) {
6273 * // Handler code goes here.
6274 * };
6275 * @endcode
6276 *
6277 * @warning You should always append to an event array or you will end up
6278 * deleting a previous registered hook.
6279 *
6280 * @warning Hook handlers should be registered at file scope. Registering
6281 * handlers after file scope can lead to unexpected results due to caching.
6282 */
6283 $wgHooks = array();
6284
6285 /**
6286 * Maps jobs to their handling classes; extensions
6287 * can add to this to provide custom jobs
6288 */
6289 $wgJobClasses = array(
6290 'refreshLinks' => 'RefreshLinksJob',
6291 'refreshLinks2' => 'RefreshLinksJob2', // b/c
6292 'htmlCacheUpdate' => 'HTMLCacheUpdateJob',
6293 'sendMail' => 'EmaillingJob',
6294 'enotifNotify' => 'EnotifNotifyJob',
6295 'fixDoubleRedirect' => 'DoubleRedirectJob',
6296 'uploadFromUrl' => 'UploadFromUrlJob',
6297 'AssembleUploadChunks' => 'AssembleUploadChunksJob',
6298 'PublishStashedFile' => 'PublishStashedFileJob',
6299 'null' => 'NullJob'
6300 );
6301
6302 /**
6303 * Jobs that must be explicitly requested, i.e. aren't run by job runners unless
6304 * special flags are set. The values here are keys of $wgJobClasses.
6305 *
6306 * These can be:
6307 * - Very long-running jobs.
6308 * - Jobs that you would never want to run as part of a page rendering request.
6309 * - Jobs that you want to run on specialized machines ( like transcoding, or a particular
6310 * machine on your cluster has 'outside' web access you could restrict uploadFromUrl )
6311 * These settings should be global to all wikis.
6312 */
6313 $wgJobTypesExcludedFromDefaultQueue = array( 'AssembleUploadChunks', 'PublishStashedFile' );
6314
6315 /**
6316 * Map of job types to how many job "work items" should be run per second
6317 * on each job runner process. The meaning of "work items" varies per job,
6318 * but typically would be something like "pages to update". A single job
6319 * may have a variable number of work items, as is the case with batch jobs.
6320 * This is used by runJobs.php and not jobs run via $wgJobRunRate.
6321 * These settings should be global to all wikis.
6322 * @var float[]
6323 */
6324 $wgJobBackoffThrottling = array();
6325
6326 /**
6327 * Map of job types to configuration arrays.
6328 * This determines which queue class and storage system is used for each job type.
6329 * Job types that do not have explicit configuration will use the 'default' config.
6330 * These settings should be global to all wikis.
6331 */
6332 $wgJobTypeConf = array(
6333 'default' => array( 'class' => 'JobQueueDB', 'order' => 'random' ),
6334 );
6335
6336 /**
6337 * Which aggregator to use for tracking which queues have jobs.
6338 * These settings should be global to all wikis.
6339 */
6340 $wgJobQueueAggregator = array(
6341 'class' => 'JobQueueAggregatorMemc'
6342 );
6343
6344 /**
6345 * Additional functions to be performed with updateSpecialPages.
6346 * Expensive Querypages are already updated.
6347 */
6348 $wgSpecialPageCacheUpdates = array(
6349 'Statistics' => array( 'SiteStatsUpdate', 'cacheUpdate' ),
6350 'Activeusers' => array( 'SpecialActiveUsers', 'cacheUpdate' ),
6351 );
6352
6353 /**
6354 * Hooks that are used for outputting exceptions. Format is:
6355 * $wgExceptionHooks[] = $funcname
6356 * or:
6357 * $wgExceptionHooks[] = array( $class, $funcname )
6358 * Hooks should return strings or false
6359 */
6360 $wgExceptionHooks = array();
6361
6362 /**
6363 * Page property link table invalidation lists. When a page property
6364 * changes, this may require other link tables to be updated (eg
6365 * adding __HIDDENCAT__ means the hiddencat tracking category will
6366 * have been added, so the categorylinks table needs to be rebuilt).
6367 * This array can be added to by extensions.
6368 */
6369 $wgPagePropLinkInvalidations = array(
6370 'hiddencat' => 'categorylinks',
6371 );
6372
6373 /** @} */ # End extensions }
6374
6375 /*************************************************************************//**
6376 * @name Categories
6377 * @{
6378 */
6379
6380 /**
6381 * Use experimental, DMOZ-like category browser
6382 */
6383 $wgUseCategoryBrowser = false;
6384
6385 /**
6386 * On category pages, show thumbnail gallery for images belonging to that
6387 * category instead of listing them as articles.
6388 */
6389 $wgCategoryMagicGallery = true;
6390
6391 /**
6392 * Paging limit for categories
6393 */
6394 $wgCategoryPagingLimit = 200;
6395
6396 /**
6397 * Specify how category names should be sorted, when listed on a category page.
6398 * A sorting scheme is also known as a collation.
6399 *
6400 * Available values are:
6401 *
6402 * - uppercase: Converts the category name to upper case, and sorts by that.
6403 *
6404 * - identity: Does no conversion. Sorts by binary value of the string.
6405 *
6406 * - uca-default: Provides access to the Unicode Collation Algorithm with
6407 * the default element table. This is a compromise collation which sorts
6408 * all languages in a mediocre way. However, it is better than "uppercase".
6409 *
6410 * To use the uca-default collation, you must have PHP's intl extension
6411 * installed. See http://php.net/manual/en/intl.setup.php . The details of the
6412 * resulting collation will depend on the version of ICU installed on the
6413 * server.
6414 *
6415 * After you change this, you must run maintenance/updateCollation.php to fix
6416 * the sort keys in the database.
6417 *
6418 * Extensions can define there own collations by subclassing Collation
6419 * and using the Collation::factory hook.
6420 */
6421 $wgCategoryCollation = 'uppercase';
6422
6423 /** @} */ # End categories }
6424
6425 /*************************************************************************//**
6426 * @name Logging
6427 * @{
6428 */
6429
6430 /**
6431 * The logging system has two levels: an event type, which describes the
6432 * general category and can be viewed as a named subset of all logs; and
6433 * an action, which is a specific kind of event that can exist in that
6434 * log type.
6435 */
6436 $wgLogTypes = array(
6437 '',
6438 'block',
6439 'protect',
6440 'rights',
6441 'delete',
6442 'upload',
6443 'move',
6444 'import',
6445 'patrol',
6446 'merge',
6447 'suppress',
6448 );
6449
6450 /**
6451 * This restricts log access to those who have a certain right
6452 * Users without this will not see it in the option menu and can not view it
6453 * Restricted logs are not added to recent changes
6454 * Logs should remain non-transcludable
6455 * Format: logtype => permissiontype
6456 */
6457 $wgLogRestrictions = array(
6458 'suppress' => 'suppressionlog'
6459 );
6460
6461 /**
6462 * Show/hide links on Special:Log will be shown for these log types.
6463 *
6464 * This is associative array of log type => boolean "hide by default"
6465 *
6466 * See $wgLogTypes for a list of available log types.
6467 *
6468 * @par Example:
6469 * @code
6470 * $wgFilterLogTypes = array(
6471 * 'move' => true,
6472 * 'import' => false,
6473 * );
6474 * @endcode
6475 *
6476 * Will display show/hide links for the move and import logs. Move logs will be
6477 * hidden by default unless the link is clicked. Import logs will be shown by
6478 * default, and hidden when the link is clicked.
6479 *
6480 * A message of the form log-show-hide-[type] should be added, and will be used
6481 * for the link text.
6482 */
6483 $wgFilterLogTypes = array(
6484 'patrol' => true
6485 );
6486
6487 /**
6488 * Lists the message key string for each log type. The localized messages
6489 * will be listed in the user interface.
6490 *
6491 * Extensions with custom log types may add to this array.
6492 *
6493 * @since 1.19, if you follow the naming convention log-name-TYPE,
6494 * where TYPE is your log type, yoy don't need to use this array.
6495 */
6496 $wgLogNames = array(
6497 '' => 'all-logs-page',
6498 'block' => 'blocklogpage',
6499 'protect' => 'protectlogpage',
6500 'rights' => 'rightslog',
6501 'delete' => 'dellogpage',
6502 'upload' => 'uploadlogpage',
6503 'move' => 'movelogpage',
6504 'import' => 'importlogpage',
6505 'patrol' => 'patrol-log-page',
6506 'merge' => 'mergelog',
6507 'suppress' => 'suppressionlog',
6508 );
6509
6510 /**
6511 * Lists the message key string for descriptive text to be shown at the
6512 * top of each log type.
6513 *
6514 * Extensions with custom log types may add to this array.
6515 *
6516 * @since 1.19, if you follow the naming convention log-description-TYPE,
6517 * where TYPE is your log type, yoy don't need to use this array.
6518 */
6519 $wgLogHeaders = array(
6520 '' => 'alllogstext',
6521 'block' => 'blocklogtext',
6522 'protect' => 'protectlogtext',
6523 'rights' => 'rightslogtext',
6524 'delete' => 'dellogpagetext',
6525 'upload' => 'uploadlogpagetext',
6526 'move' => 'movelogpagetext',
6527 'import' => 'importlogpagetext',
6528 'patrol' => 'patrol-log-header',
6529 'merge' => 'mergelogpagetext',
6530 'suppress' => 'suppressionlogtext',
6531 );
6532
6533 /**
6534 * Lists the message key string for formatting individual events of each
6535 * type and action when listed in the logs.
6536 *
6537 * Extensions with custom log types may add to this array.
6538 */
6539 $wgLogActions = array(
6540 'block/block' => 'blocklogentry',
6541 'block/unblock' => 'unblocklogentry',
6542 'block/reblock' => 'reblock-logentry',
6543 'protect/protect' => 'protectedarticle',
6544 'protect/modify' => 'modifiedarticleprotection',
6545 'protect/unprotect' => 'unprotectedarticle',
6546 'protect/move_prot' => 'movedarticleprotection',
6547 'import/upload' => 'import-logentry-upload',
6548 'import/interwiki' => 'import-logentry-interwiki',
6549 'merge/merge' => 'pagemerge-logentry',
6550 'suppress/block' => 'blocklogentry',
6551 'suppress/reblock' => 'reblock-logentry',
6552 );
6553
6554 /**
6555 * The same as above, but here values are names of functions,
6556 * not messages.
6557 * @see LogPage::actionText
6558 * @see LogFormatter
6559 */
6560 $wgLogActionsHandlers = array(
6561 'move/move' => 'MoveLogFormatter',
6562 'move/move_redir' => 'MoveLogFormatter',
6563 'delete/delete' => 'DeleteLogFormatter',
6564 'delete/restore' => 'DeleteLogFormatter',
6565 'delete/revision' => 'DeleteLogFormatter',
6566 'delete/event' => 'DeleteLogFormatter',
6567 'suppress/revision' => 'DeleteLogFormatter',
6568 'suppress/event' => 'DeleteLogFormatter',
6569 'suppress/delete' => 'DeleteLogFormatter',
6570 'patrol/patrol' => 'PatrolLogFormatter',
6571 'rights/rights' => 'RightsLogFormatter',
6572 'rights/autopromote' => 'RightsLogFormatter',
6573 'upload/upload' => 'LogFormatter',
6574 'upload/overwrite' => 'LogFormatter',
6575 'upload/revert' => 'LogFormatter',
6576 );
6577
6578 /**
6579 * Maintain a log of newusers at Log/newusers?
6580 */
6581 $wgNewUserLog = true;
6582
6583 /** @} */ # end logging }
6584
6585 /*************************************************************************//**
6586 * @name Special pages (general and miscellaneous)
6587 * @{
6588 */
6589
6590 /**
6591 * Allow special page inclusions such as {{Special:Allpages}}
6592 */
6593 $wgAllowSpecialInclusion = true;
6594
6595 /**
6596 * Set this to an array of special page names to prevent
6597 * maintenance/updateSpecialPages.php from updating those pages.
6598 */
6599 $wgDisableQueryPageUpdate = false;
6600
6601 /**
6602 * List of special pages, followed by what subtitle they should go under
6603 * at Special:SpecialPages
6604 *
6605 * @deprecated since 1.21 Override SpecialPage::getGroupName instead
6606 */
6607 $wgSpecialPageGroups = array();
6608
6609 /**
6610 * On Special:Unusedimages, consider images "used", if they are put
6611 * into a category. Default (false) is not to count those as used.
6612 */
6613 $wgCountCategorizedImagesAsUsed = false;
6614
6615 /**
6616 * Maximum number of links to a redirect page listed on
6617 * Special:Whatlinkshere/RedirectDestination
6618 */
6619 $wgMaxRedirectLinksRetrieved = 500;
6620
6621 /** @} */ # end special pages }
6622
6623 /*************************************************************************//**
6624 * @name Actions
6625 * @{
6626 */
6627
6628 /**
6629 * Array of allowed values for the "title=foo&action=<action>" parameter. Syntax is:
6630 * 'foo' => 'ClassName' Load the specified class which subclasses Action
6631 * 'foo' => true Load the class FooAction which subclasses Action
6632 * If something is specified in the getActionOverrides()
6633 * of the relevant Page object it will be used
6634 * instead of the default class.
6635 * 'foo' => false The action is disabled; show an error message
6636 * Unsetting core actions will probably cause things to complain loudly.
6637 */
6638 $wgActions = array(
6639 'credits' => true,
6640 'delete' => true,
6641 'edit' => true,
6642 'history' => true,
6643 'info' => true,
6644 'markpatrolled' => true,
6645 'protect' => true,
6646 'purge' => true,
6647 'raw' => true,
6648 'render' => true,
6649 'revert' => true,
6650 'revisiondelete' => true,
6651 'rollback' => true,
6652 'submit' => true,
6653 'unprotect' => true,
6654 'unwatch' => true,
6655 'view' => true,
6656 'watch' => true,
6657 );
6658
6659 /** @} */ # end actions }
6660
6661 /*************************************************************************//**
6662 * @name Robot (search engine crawler) policy
6663 * See also $wgNoFollowLinks.
6664 * @{
6665 */
6666
6667 /**
6668 * Default robot policy. The default policy is to encourage indexing and fol-
6669 * lowing of links. It may be overridden on a per-namespace and/or per-page
6670 * basis.
6671 */
6672 $wgDefaultRobotPolicy = 'index,follow';
6673
6674 /**
6675 * Robot policies per namespaces. The default policy is given above, the array
6676 * is made of namespace constants as defined in includes/Defines.php. You can-
6677 * not specify a different default policy for NS_SPECIAL: it is always noindex,
6678 * nofollow. This is because a number of special pages (e.g., ListPages) have
6679 * many permutations of options that display the same data under redundant
6680 * URLs, so search engine spiders risk getting lost in a maze of twisty special
6681 * pages, all alike, and never reaching your actual content.
6682 *
6683 * @par Example:
6684 * @code
6685 * $wgNamespaceRobotPolicies = array( NS_TALK => 'noindex' );
6686 * @endcode
6687 */
6688 $wgNamespaceRobotPolicies = array();
6689
6690 /**
6691 * Robot policies per article. These override the per-namespace robot policies.
6692 * Must be in the form of an array where the key part is a properly canonicalised
6693 * text form title and the value is a robot policy.
6694 *
6695 * @par Example:
6696 * @code
6697 * $wgArticleRobotPolicies = array(
6698 * 'Main Page' => 'noindex,follow',
6699 * 'User:Bob' => 'index,follow',
6700 * );
6701 * @endcode
6702 *
6703 * @par Example that DOES NOT WORK because the names are not canonical text
6704 * forms:
6705 * @code
6706 * $wgArticleRobotPolicies = array(
6707 * # Underscore, not space!
6708 * 'Main_Page' => 'noindex,follow',
6709 * # "Project", not the actual project name!
6710 * 'Project:X' => 'index,follow',
6711 * # Needs to be "Abc", not "abc" (unless $wgCapitalLinks is false for that namespace)!
6712 * 'abc' => 'noindex,nofollow'
6713 * );
6714 * @endcode
6715 */
6716 $wgArticleRobotPolicies = array();
6717
6718 /**
6719 * An array of namespace keys in which the __INDEX__/__NOINDEX__ magic words
6720 * will not function, so users can't decide whether pages in that namespace are
6721 * indexed by search engines. If set to null, default to $wgContentNamespaces.
6722 *
6723 * @par Example:
6724 * @code
6725 * $wgExemptFromUserRobotsControl = array( NS_MAIN, NS_TALK, NS_PROJECT );
6726 * @endcode
6727 */
6728 $wgExemptFromUserRobotsControl = null;
6729
6730 /** @} */ # End robot policy }
6731
6732 /************************************************************************//**
6733 * @name AJAX and API
6734 * Note: The AJAX entry point which this section refers to is gradually being
6735 * replaced by the API entry point, api.php. They are essentially equivalent.
6736 * Both of them are used for dynamic client-side features, via XHR.
6737 * @{
6738 */
6739
6740 /**
6741 * Enable the MediaWiki API for convenient access to
6742 * machine-readable data via api.php
6743 *
6744 * See https://www.mediawiki.org/wiki/API
6745 */
6746 $wgEnableAPI = true;
6747
6748 /**
6749 * Allow the API to be used to perform write operations
6750 * (page edits, rollback, etc.) when an authorised user
6751 * accesses it
6752 */
6753 $wgEnableWriteAPI = true;
6754
6755 /**
6756 *
6757 * WARNING: SECURITY THREAT - debug use only
6758 *
6759 * Disables many security checks in the API for debugging purposes.
6760 * This flag should never be used on the production servers, as it introduces
6761 * a number of potential security holes. Even when enabled, the validation
6762 * will still be performed, but instead of failing, API will return a warning.
6763 * Also, there will always be a warning notifying that this flag is set.
6764 * At this point, the flag allows GET requests to go through for modules
6765 * requiring POST.
6766 *
6767 * @since 1.21
6768 */
6769 $wgDebugAPI = false;
6770
6771 /**
6772 * API module extensions.
6773 *
6774 * Associative array mapping module name to modules specs;
6775 * Each module spec is an associative array containing at least
6776 * the 'class' key for the module's class, and optionally a
6777 * 'factory' key for the factory function to use for the module.
6778 *
6779 * That factory function will be called with two parameters,
6780 * the parent module (an instance of ApiBase, usually ApiMain)
6781 * and the name the module was registered under. The return
6782 * value must be an instance of the class given in the 'class'
6783 * field.
6784 *
6785 * For backward compatibility, the module spec may also be a
6786 * simple string containing the module's class name. In that
6787 * case, the class' constructor will be called with the parent
6788 * module and module name as parameters, as described above.
6789 *
6790 * Examples for registering API modules:
6791 *
6792 * @code
6793 * $wgAPIModules['foo'] = 'ApiFoo';
6794 * $wgAPIModules['bar'] = array(
6795 * 'class' => 'ApiBar',
6796 * 'factory' => function( $main, $name ) { ... }
6797 * );
6798 * $wgAPIModules['xyzzy'] = array(
6799 * 'class' => 'ApiXyzzy',
6800 * 'factory' => array( 'XyzzyFactory', 'newApiModule' )
6801 * );
6802 * @endcode
6803 *
6804 * Extension modules may override the core modules.
6805 * See ApiMain::$Modules for a list of the core modules.
6806 */
6807 $wgAPIModules = array();
6808
6809 /**
6810 * API format module extensions.
6811 * Associative array mapping format module name to module specs (see $wgAPIModules).
6812 * Extension modules may override the core modules.
6813 *
6814 * See ApiMain::$Formats for a list of the core format modules.
6815 */
6816 $wgAPIFormatModules = array();
6817
6818 /**
6819 * API Query meta module extensions.
6820 * Associative array mapping meta module name to module specs (see $wgAPIModules).
6821 * Extension modules may override the core modules.
6822 *
6823 * See ApiQuery::$QueryMetaModules for a list of the core meta modules.
6824 */
6825 $wgAPIMetaModules = array();
6826
6827 /**
6828 * API Query prop module extensions.
6829 * Associative array mapping prop module name to module specs (see $wgAPIModules).
6830 * Extension modules may override the core modules.
6831 *
6832 * See ApiQuery::$QueryPropModules for a list of the core prop modules.
6833 */
6834 $wgAPIPropModules = array();
6835
6836 /**
6837 * API Query list module extensions.
6838 * Associative array mapping list module name to module specs (see $wgAPIModules).
6839 * Extension modules may override the core modules.
6840 *
6841 * See ApiQuery::$QueryListModules for a list of the core list modules.
6842 */
6843 $wgAPIListModules = array();
6844
6845 /**
6846 * This variable is ignored. To add your module to the API, please add it to $wgAPI*Modules
6847 * @deprecated since 1.21
6848 */
6849 $wgAPIGeneratorModules = array();
6850
6851 /**
6852 * Maximum amount of rows to scan in a DB query in the API
6853 * The default value is generally fine
6854 */
6855 $wgAPIMaxDBRows = 5000;
6856
6857 /**
6858 * The maximum size (in bytes) of an API result.
6859 * @warning Do not set this lower than $wgMaxArticleSize*1024
6860 */
6861 $wgAPIMaxResultSize = 8388608;
6862
6863 /**
6864 * The maximum number of uncached diffs that can be retrieved in one API
6865 * request. Set this to 0 to disable API diffs altogether
6866 */
6867 $wgAPIMaxUncachedDiffs = 1;
6868
6869 /**
6870 * Log file or URL (TCP or UDP) to log API requests to, or false to disable
6871 * API request logging
6872 */
6873 $wgAPIRequestLog = false;
6874
6875 /**
6876 * Set the timeout for the API help text cache. If set to 0, caching disabled
6877 */
6878 $wgAPICacheHelpTimeout = 60 * 60;
6879
6880 /**
6881 * The ApiQueryQueryPages module should skip pages that are redundant to true
6882 * API queries.
6883 */
6884 $wgAPIUselessQueryPages = array(
6885 'MIMEsearch', // aiprop=mime
6886 'LinkSearch', // list=exturlusage
6887 'FileDuplicateSearch', // prop=duplicatefiles
6888 );
6889
6890 /**
6891 * Enable AJAX framework
6892 */
6893 $wgUseAjax = true;
6894
6895 /**
6896 * List of Ajax-callable functions.
6897 * Extensions acting as Ajax callbacks must register here
6898 */
6899 $wgAjaxExportList = array();
6900
6901 /**
6902 * Enable watching/unwatching pages using AJAX.
6903 * Requires $wgUseAjax to be true too.
6904 */
6905 $wgAjaxWatch = true;
6906
6907 /**
6908 * Enable AJAX check for file overwrite, pre-upload
6909 */
6910 $wgAjaxUploadDestCheck = true;
6911
6912 /**
6913 * Enable previewing licences via AJAX. Also requires $wgEnableAPI to be true.
6914 */
6915 $wgAjaxLicensePreview = true;
6916
6917 /**
6918 * Settings for incoming cross-site AJAX requests:
6919 * Newer browsers support cross-site AJAX when the target resource allows requests
6920 * from the origin domain by the Access-Control-Allow-Origin header.
6921 * This is currently only used by the API (requests to api.php)
6922 * $wgCrossSiteAJAXdomains can be set using a wildcard syntax:
6923 *
6924 * - '*' matches any number of characters
6925 * - '?' matches any 1 character
6926 *
6927 * @par Example:
6928 * @code
6929 * $wgCrossSiteAJAXdomains = array(
6930 * 'www.mediawiki.org',
6931 * '*.wikipedia.org',
6932 * '*.wikimedia.org',
6933 * '*.wiktionary.org',
6934 * );
6935 * @endcode
6936 */
6937 $wgCrossSiteAJAXdomains = array();
6938
6939 /**
6940 * Domains that should not be allowed to make AJAX requests,
6941 * even if they match one of the domains allowed by $wgCrossSiteAJAXdomains
6942 * Uses the same syntax as $wgCrossSiteAJAXdomains
6943 */
6944 $wgCrossSiteAJAXdomainExceptions = array();
6945
6946 /** @} */ # End AJAX and API }
6947
6948 /************************************************************************//**
6949 * @name Shell and process control
6950 * @{
6951 */
6952
6953 /**
6954 * Maximum amount of virtual memory available to shell processes under linux, in KB.
6955 */
6956 $wgMaxShellMemory = 307200;
6957
6958 /**
6959 * Maximum file size created by shell processes under linux, in KB
6960 * ImageMagick convert for example can be fairly hungry for scratch space
6961 */
6962 $wgMaxShellFileSize = 102400;
6963
6964 /**
6965 * Maximum CPU time in seconds for shell processes under Linux
6966 */
6967 $wgMaxShellTime = 180;
6968
6969 /**
6970 * Maximum wall clock time (i.e. real time, of the kind the clock on the wall
6971 * would measure) in seconds for shell processes under Linux
6972 */
6973 $wgMaxShellWallClockTime = 180;
6974
6975 /**
6976 * Under Linux: a cgroup directory used to constrain memory usage of shell
6977 * commands. The directory must be writable by the user which runs MediaWiki.
6978 *
6979 * If specified, this is used instead of ulimit, which is inaccurate, and
6980 * causes malloc() to return NULL, which exposes bugs in C applications, making
6981 * them segfault or deadlock.
6982 *
6983 * A wrapper script will create a cgroup for each shell command that runs, as
6984 * a subgroup of the specified cgroup. If the memory limit is exceeded, the
6985 * kernel will send a SIGKILL signal to a process in the subgroup.
6986 *
6987 * @par Example:
6988 * @code
6989 * mkdir -p /sys/fs/cgroup/memory/mediawiki
6990 * mkdir -m 0777 /sys/fs/cgroup/memory/mediawiki/job
6991 * echo '$wgShellCgroup = "/sys/fs/cgroup/memory/mediawiki/job";' >> LocalSettings.php
6992 * @endcode
6993 *
6994 * The reliability of cgroup cleanup can be improved by installing a
6995 * notify_on_release script in the root cgroup, see e.g.
6996 * https://gerrit.wikimedia.org/r/#/c/40784
6997 */
6998 $wgShellCgroup = false;
6999
7000 /**
7001 * Executable path of the PHP cli binary (php/php5). Should be set up on install.
7002 */
7003 $wgPhpCli = '/usr/bin/php';
7004
7005 /**
7006 * Locale for LC_CTYPE, to work around http://bugs.php.net/bug.php?id=45132
7007 * For Unix-like operating systems, set this to to a locale that has a UTF-8
7008 * character set. Only the character set is relevant.
7009 */
7010 $wgShellLocale = 'en_US.utf8';
7011
7012 /** @} */ # End shell }
7013
7014 /************************************************************************//**
7015 * @name HTTP client
7016 * @{
7017 */
7018
7019 /**
7020 * Timeout for HTTP requests done internally, in seconds.
7021 */
7022 $wgHTTPTimeout = 25;
7023
7024 /**
7025 * Timeout for Asynchronous (background) HTTP requests, in seconds.
7026 */
7027 $wgAsyncHTTPTimeout = 25;
7028
7029 /**
7030 * Proxy to use for CURL requests.
7031 */
7032 $wgHTTPProxy = false;
7033
7034 /**
7035 * Timeout for connections done internally (in seconds)
7036 * Only works for curl
7037 */
7038 $wgHTTPConnectTimeout = 5e0;
7039
7040 /** @} */ # End HTTP client }
7041
7042 /************************************************************************//**
7043 * @name Job queue
7044 * See also $wgEnotifUseJobQ.
7045 * @{
7046 */
7047
7048 /**
7049 * Number of jobs to perform per request. May be less than one in which case
7050 * jobs are performed probabalistically. If this is zero, jobs will not be done
7051 * during ordinary apache requests. In this case, maintenance/runJobs.php should
7052 * be run periodically.
7053 */
7054 $wgJobRunRate = 1;
7055
7056 /**
7057 * When $wgJobRunRate > 0, try to run jobs asynchronously, spawning a new process
7058 * to handle the job execution, instead of blocking the request until the job
7059 * execution finishes.
7060 * @since 1.23
7061 */
7062 $wgRunJobsAsync = true;
7063
7064 /**
7065 * Number of rows to update per job
7066 */
7067 $wgUpdateRowsPerJob = 500;
7068
7069 /**
7070 * Number of rows to update per query
7071 */
7072 $wgUpdateRowsPerQuery = 100;
7073
7074 /** @} */ # End job queue }
7075
7076 /************************************************************************//**
7077 * @name Miscellaneous
7078 * @{
7079 */
7080
7081 /**
7082 * Name of the external diff engine to use
7083 */
7084 $wgExternalDiffEngine = false;
7085
7086 /**
7087 * Disable redirects to special pages and interwiki redirects, which use a 302
7088 * and have no "redirected from" link.
7089 *
7090 * @note This is only for articles with #REDIRECT in them. URL's containing a
7091 * local interwiki prefix (or a non-canonical special page name) are still hard
7092 * redirected regardless of this setting.
7093 */
7094 $wgDisableHardRedirects = false;
7095
7096 /**
7097 * LinkHolderArray batch size
7098 * For debugging
7099 */
7100 $wgLinkHolderBatchSize = 1000;
7101
7102 /**
7103 * By default MediaWiki does not register links pointing to same server in
7104 * externallinks dataset, use this value to override:
7105 */
7106 $wgRegisterInternalExternals = false;
7107
7108 /**
7109 * Maximum number of pages to move at once when moving subpages with a page.
7110 */
7111 $wgMaximumMovedPages = 100;
7112
7113 /**
7114 * Fix double redirects after a page move.
7115 * Tends to conflict with page move vandalism, use only on a private wiki.
7116 */
7117 $wgFixDoubleRedirects = false;
7118
7119 /**
7120 * Allow redirection to another page when a user logs in.
7121 * To enable, set to a string like 'Main Page'
7122 */
7123 $wgRedirectOnLogin = null;
7124
7125 /**
7126 * Configuration for processing pool control, for use in high-traffic wikis.
7127 * An implementation is provided in the PoolCounter extension.
7128 *
7129 * This configuration array maps pool types to an associative array. The only
7130 * defined key in the associative array is "class", which gives the class name.
7131 * The remaining elements are passed through to the class as constructor
7132 * parameters.
7133 *
7134 * @par Example:
7135 * @code
7136 * $wgPoolCounterConf = array( 'ArticleView' => array(
7137 * 'class' => 'PoolCounter_Client',
7138 * 'timeout' => 15, // wait timeout in seconds
7139 * 'workers' => 5, // maximum number of active threads in each pool
7140 * 'maxqueue' => 50, // maximum number of total threads in each pool
7141 * ... any extension-specific options...
7142 * );
7143 * @endcode
7144 */
7145 $wgPoolCounterConf = null;
7146
7147 /**
7148 * To disable file delete/restore temporarily
7149 */
7150 $wgUploadMaintenance = false;
7151
7152 /**
7153 * Associative array mapping namespace IDs to the name of the content model pages in that namespace
7154 * should have by default (use the CONTENT_MODEL_XXX constants). If no special content type is
7155 * defined for a given namespace, pages in that namespace will use the CONTENT_MODEL_WIKITEXT
7156 * (except for the special case of JS and CS pages).
7157 *
7158 * @since 1.21
7159 */
7160 $wgNamespaceContentModels = array();
7161
7162 /**
7163 * How to react if a plain text version of a non-text Content object is requested using
7164 * ContentHandler::getContentText():
7165 *
7166 * * 'ignore': return null
7167 * * 'fail': throw an MWException
7168 * * 'serialize': serialize to default format
7169 *
7170 * @since 1.21
7171 */
7172 $wgContentHandlerTextFallback = 'ignore';
7173
7174 /**
7175 * Set to false to disable use of the database fields introduced by the ContentHandler facility.
7176 * This way, the ContentHandler facility can be used without any additional information in the
7177 * database. A page's content model is then derived solely from the page's title. This however
7178 * means that changing a page's default model (e.g. using $wgNamespaceContentModels) will break
7179 * the page and/or make the content inaccessible. This also means that pages can not be moved to
7180 * a title that would default to a different content model.
7181 *
7182 * Overall, with $wgContentHandlerUseDB = false, no database updates are needed, but content
7183 * handling is less robust and less flexible.
7184 *
7185 * @since 1.21
7186 */
7187 $wgContentHandlerUseDB = true;
7188
7189 /**
7190 * Determines which types of text are parsed as wikitext. This does not imply that these kinds
7191 * of texts are also rendered as wikitext, it only means that links, magic words, etc will have
7192 * the effect on the database they would have on a wikitext page.
7193 *
7194 * @todo On the long run, it would be nice to put categories etc into a separate structure,
7195 * or at least parse only the contents of comments in the scripts.
7196 *
7197 * @since 1.21
7198 */
7199 $wgTextModelsToParse = array(
7200 CONTENT_MODEL_WIKITEXT, // Just for completeness, wikitext will always be parsed.
7201 CONTENT_MODEL_JAVASCRIPT, // Make categories etc work, people put them into comments.
7202 CONTENT_MODEL_CSS, // Make categories etc work, people put them into comments.
7203 );
7204
7205 /**
7206 * Whether the user must enter their password to change their e-mail address
7207 *
7208 * @since 1.20
7209 */
7210 $wgRequirePasswordforEmailChange = true;
7211
7212 /**
7213 * Register handlers for specific types of sites.
7214 *
7215 * @since 1.20
7216 */
7217 $wgSiteTypes = array(
7218 'mediawiki' => 'MediaWikiSite',
7219 );
7220
7221 /**
7222 * Whether the page_props table has a pp_sortkey column. Set to false in case
7223 * the respective database schema change was not applied.
7224 * @since 1.23
7225 */
7226 $wgPagePropsHaveSortkey = true;
7227
7228 /**
7229 * Port where you have HTTPS running
7230 * Supports HTTPS on non-standard ports
7231 * @see bug 65184
7232 * @since 1.24
7233 */
7234 $wgHttpsPort = 443;
7235
7236 /**
7237 * Secret and algorithm for hmac-based key derivation function (fast,
7238 * cryptographically secure random numbers).
7239 * This should be set in LocalSettings.php, otherwise wgSecretKey will
7240 * be used.
7241 * @since 1.24
7242 */
7243 $wgHKDFSecret = false;
7244 $wgHKDFAlgorithm = 'sha256';
7245
7246 /**
7247 * Enable page language feature
7248 * Allows setting page language in database
7249 * @var bool
7250 * @since 1.24
7251 */
7252 $wgPageLanguageUseDB = false;
7253
7254 /**
7255 * Enable use of the *_namespace fields of the pagelinks, redirect, and templatelinks tables.
7256 * Set this only if the fields are fully populated. This may be removed in 1.25.
7257 * @var bool
7258 * @since 1.24
7259 */
7260 $wgUseLinkNamespaceDBFields = true;
7261
7262 /**
7263 * For really cool vim folding this needs to be at the end:
7264 * vim: foldmarker=@{,@} foldmethod=marker
7265 * @}
7266 */