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