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