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