Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
217 contributors

Users who have contributed to this file

@tstarling @AaronSchulz @demon @catrope @reedy @hashar @Krinkle @Nikerabbit @robchurch @brightbyte @jdforrester @raymondde @legoktm @avar @MatmaRex @umherirrender @siebrand @werdnum @bawolff @trevorparscal @atdt @MaxSem @btongminh @midom @tgr @hexmode
9131 lines (8281 sloc) 291 KB
<?php
/**
* Default values for MediaWiki configuration settings.
*
*
* NEVER EDIT THIS FILE
*
*
* To customize your installation, edit "LocalSettings.php". If you make
* changes here, they will be lost on next upgrade of MediaWiki!
*
* In this file, variables whose default values depend on other
* variables are set to false. The actual default value of these variables
* will only be set in Setup.php, taking into account any custom settings
* performed in LocalSettings.php.
*
* Documentation is in the source and on:
* https://www.mediawiki.org/wiki/Manual:Configuration_settings
*
* @warning Note: this (and other things) will break if the autoloader is not
* enabled. Please include includes/AutoLoader.php before including this file.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
*/
use MediaWiki\MediaWikiServices;
/**
* @cond file_level_code
* This is not a valid entry point, perform no further processing unless
* MEDIAWIKI is defined
*/
if ( !defined( 'MEDIAWIKI' ) ) {
echo "This file is part of MediaWiki and is not a valid entry point\n";
die( 1 );
}
/** @endcond */
/**
* wgConf hold the site configuration.
* Not used for much in a default install.
* @since 1.5
*/
$wgConf = new SiteConfiguration;
/**
* Registry of factory functions to create config objects:
* The 'main' key must be set, and the value should be a valid
* callable.
* @since 1.23
*/
$wgConfigRegistry = [
'main' => 'GlobalVarConfig::newInstance'
];
/**
* MediaWiki version number
* @since 1.2
*/
$wgVersion = '1.34.0-alpha';
/**
* Name of the site. It must be changed in LocalSettings.php
*/
$wgSitename = 'MediaWiki';
/**
* When the wiki is running behind a proxy and this is set to true, assumes that the proxy exposes
* the wiki on the standard ports (443 for https and 80 for http).
* @var bool
* @since 1.26
*/
$wgAssumeProxiesUseDefaultProtocolPorts = true;
/**
* URL of the server.
*
* @par Example:
* @code
* $wgServer = 'http://example.com';
* @endcode
*
* This is usually detected correctly by MediaWiki. If MediaWiki detects the
* wrong server, it will redirect incorrectly after you save a page. In that
* case, set this variable to fix it.
*
* If you want to use protocol-relative URLs on your wiki, set this to a
* protocol-relative URL like '//example.com' and set $wgCanonicalServer
* to a fully qualified URL.
*/
$wgServer = WebRequest::detectServer();
/**
* Canonical URL of the server, to use in IRC feeds and notification e-mails.
* Must be fully qualified, even if $wgServer is protocol-relative.
*
* Defaults to $wgServer, expanded to a fully qualified http:// URL if needed.
* @since 1.18
*/
$wgCanonicalServer = false;
/**
* Server name. This is automatically computed by parsing the bare
* hostname out of $wgCanonicalServer. It should not be customized.
* @since 1.24
*/
$wgServerName = false;
/************************************************************************//**
* @name Script path settings
* @{
*/
/**
* The path we should point to.
* It might be a virtual path in case with use apache mod_rewrite for example.
*
* This *needs* to be set correctly.
*
* Other paths will be set to defaults based on it unless they are directly
* set in LocalSettings.php
*/
$wgScriptPath = '/wiki';
/**
* Whether to support URLs like index.php/Page_title These often break when PHP
* is set up in CGI mode. PATH_INFO *may* be correct if cgi.fix_pathinfo is set,
* but then again it may not; lighttpd converts incoming path data to lowercase
* on systems with case-insensitive filesystems, and there have been reports of
* problems on Apache as well.
*
* To be safe we'll continue to keep it off by default.
*
* Override this to false if $_SERVER['PATH_INFO'] contains unexpectedly
* incorrect garbage, or to true if it is really correct.
*
* The default $wgArticlePath will be set based on this value at runtime, but if
* you have customized it, having this incorrectly set to true can cause
* redirect loops when "pretty URLs" are used.
* @since 1.2.1
*/
$wgUsePathInfo = ( strpos( PHP_SAPI, 'cgi' ) === false ) &&
( strpos( PHP_SAPI, 'apache2filter' ) === false ) &&
( strpos( PHP_SAPI, 'isapi' ) === false );
/**@}*/
/************************************************************************//**
* @name URLs and file paths
*
* These various web and file path variables are set to their defaults
* in Setup.php if they are not explicitly set from LocalSettings.php.
*
* These will relatively rarely need to be set manually, unless you are
* splitting style sheets or images outside the main document root.
*
* In this section, a "path" is usually a host-relative URL, i.e. a URL without
* the host part, that starts with a slash. In most cases a full URL is also
* acceptable. A "directory" is a local file path.
*
* In both paths and directories, trailing slashes should not be included.
*
* @{
*/
/**
* The URL path to index.php.
*
* Defaults to "{$wgScriptPath}/index.php".
*/
$wgScript = false;
/**
* The URL path to load.php.
*
* Defaults to "{$wgScriptPath}/load.php".
* @since 1.17
*/
$wgLoadScript = false;
/**
* The URL path to the REST API
* Defaults to "{$wgScriptPath}/rest.php"
* @since 1.34
*/
$wgRestPath = false;
/**
* The URL path of the skins directory.
* Defaults to "{$wgResourceBasePath}/skins".
* @since 1.3
*/
$wgStylePath = false;
$wgStyleSheetPath = &$wgStylePath;
/**
* The URL path of the skins directory. Should not point to an external domain.
* Defaults to "{$wgScriptPath}/skins".
* @since 1.17
*/
$wgLocalStylePath = false;
/**
* The URL path of the extensions directory.
* Defaults to "{$wgResourceBasePath}/extensions".
* @since 1.16
*/
$wgExtensionAssetsPath = false;
/**
* Filesystem extensions directory.
* Defaults to "{$IP}/extensions".
* @since 1.25
*/
$wgExtensionDirectory = "{$IP}/extensions";
/**
* Filesystem stylesheets directory.
* Defaults to "{$IP}/skins".
* @since 1.3
*/
$wgStyleDirectory = "{$IP}/skins";
/**
* The URL path for primary article page views. This path should contain $1,
* which is replaced by the article title.
*
* Defaults to "{$wgScript}/$1" or "{$wgScript}?title=$1",
* depending on $wgUsePathInfo.
*/
$wgArticlePath = false;
/**
* The URL path for the images directory.
* Defaults to "{$wgScriptPath}/images".
*/
$wgUploadPath = false;
/**
* The filesystem path of the images directory. Defaults to "{$IP}/images".
*/
$wgUploadDirectory = false;
/**
* Directory where the cached page will be saved.
* Defaults to "{$wgUploadDirectory}/cache".
*/
$wgFileCacheDirectory = false;
/**
* The URL path of the wiki logo. The logo size should be 135x135 pixels.
* Defaults to "$wgResourceBasePath/resources/assets/wiki.png".
*/
$wgLogo = false;
/**
* Array with URL paths to HD versions of the wiki logo. The scaled logo size
* should be under 135x155 pixels.
* Only 1.5x and 2x versions are supported.
*
* @par Example:
* @code
* $wgLogoHD = [
* "1.5x" => "path/to/1.5x_version.png",
* "2x" => "path/to/2x_version.png"
* ];
* @endcode
*
* SVG is also supported but when enabled, it
* disables 1.5x and 2x as svg will already
* be optimised for screen resolution.
*
* @par Example:
* @code
* $wgLogoHD = [
* "svg" => "path/to/svg_version.svg",
* ];
* @endcode
*
* @since 1.25
*/
$wgLogoHD = false;
/**
* The URL path of the shortcut icon.
* @since 1.6
*/
$wgFavicon = '/favicon.ico';
/**
* The URL path of the icon for iPhone and iPod Touch web app bookmarks.
* Defaults to no icon.
* @since 1.12
*/
$wgAppleTouchIcon = false;
/**
* Value for the referrer policy meta tag.
* One or more of the values defined in the Referrer Policy specification:
* https://w3c.github.io/webappsec-referrer-policy/
* ('no-referrer', 'no-referrer-when-downgrade', 'same-origin',
* 'origin', 'strict-origin', 'origin-when-cross-origin',
* 'strict-origin-when-cross-origin', or 'unsafe-url')
* Setting it to false prevents the meta tag from being output
* (which results in falling back to the Referrer-Policy header,
* or 'no-referrer-when-downgrade' if that's not set either.)
* Setting it to an array (supported since 1.31) will create a meta tag for
* each value, in the reverse of the order (meaning that the first array element
* will be the default and the others used as fallbacks for browsers which do not
* understand it).
*
* @var array|string|bool
* @since 1.25
*/
$wgReferrerPolicy = false;
/**
* The local filesystem path to a temporary directory. This is not required to
* be web accessible.
*
* When this setting is set to false, its value will be set through a call
* to wfTempDir(). See that methods implementation for the actual detection
* logic.
*
* Developers should use the global function wfTempDir() instead of this
* variable.
*
* @see wfTempDir()
* @note Default changed to false in MediaWiki 1.20.
*/
$wgTmpDirectory = false;
/**
* If set, this URL is added to the start of $wgUploadPath to form a complete
* upload URL.
* @since 1.4
*/
$wgUploadBaseUrl = '';
/**
* To enable remote on-demand scaling, set this to the thumbnail base URL.
* Full thumbnail URL will be like $wgUploadStashScalerBaseUrl/e/e6/Foo.jpg/123px-Foo.jpg
* where 'e6' are the first two characters of the MD5 hash of the file name.
* If $wgUploadStashScalerBaseUrl is set to false, thumbs are rendered locally as needed.
* @since 1.17
*/
$wgUploadStashScalerBaseUrl = false;
/**
* To set 'pretty' URL paths for actions other than
* plain page views, add to this array.
*
* @par Example:
* Set pretty URL for the edit action:
* @code
* 'edit' => "$wgScriptPath/edit/$1"
* @endcode
*
* There must be an appropriate script or rewrite rule in place to handle these
* URLs.
* @since 1.5
*/
$wgActionPaths = [];
/**@}*/
/************************************************************************//**
* @name Files and file uploads
* @{
*/
/**
* Allow users to upload files.
*
* Use $wgLocalFileRepo to control how and where uploads are stored.
* Disabled by default as for security reasons.
* See <https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads>.
*
* @since 1.5
*/
$wgEnableUploads = false;
/**
* The maximum age of temporary (incomplete) uploaded files
*/
$wgUploadStashMaxAge = 6 * 3600; // 6 hours
/**
* Allows to move images and other media files
*/
$wgAllowImageMoving = true;
/**
* Enable deferred upload tasks that use the job queue.
* Only enable this if job runners are set up for both the
* 'AssembleUploadChunks' and 'PublishStashedFile' job types.
*
* @note If you use suhosin, this setting is incompatible with
* suhosin.session.encrypt.
*/
$wgEnableAsyncUploads = false;
/**
* Additional characters that are not allowed in filenames. They are replaced with '-' when
* uploading. Like $wgLegalTitleChars, this is a regexp character class.
*
* Slashes and backslashes are disallowed regardless of this setting, but included here for
* completeness.
*/
$wgIllegalFileChars = ":\\/\\\\";
/**
* What directory to place deleted uploads in.
* Defaults to "{$wgUploadDirectory}/deleted".
*/
$wgDeletedDirectory = false;
/**
* Set this to true if you use img_auth and want the user to see details on why access failed.
*/
$wgImgAuthDetails = false;
/**
* Map of relative URL directories to match to internal mwstore:// base storage paths.
* For img_auth.php requests, everything after "img_auth.php/" is checked to see
* if starts with any of the prefixes defined here. The prefixes should not overlap.
* The prefix that matches has a corresponding storage path, which the rest of the URL
* is assumed to be relative to. The file at that path (or a 404) is send to the client.
*
* Example:
* $wgImgAuthUrlPathMap['/timeline/'] = 'mwstore://local-fs/timeline-render/';
* The above maps ".../img_auth.php/timeline/X" to "mwstore://local-fs/timeline-render/".
* The name "local-fs" should correspond by name to an entry in $wgFileBackends.
*
* @see $wgFileBackends
*/
$wgImgAuthUrlPathMap = [];
/**
* File repository structures
*
* $wgLocalFileRepo is a single repository structure, and $wgForeignFileRepos is
* an array of such structures. Each repository structure is an associative
* array of properties configuring the repository.
*
* Properties required for all repos:
* - class The class name for the repository. May come from the core or an extension.
* The core repository classes are FileRepo, LocalRepo, ForeignDBRepo.
*
* - name A unique name for the repository (but $wgLocalFileRepo should be 'local').
* The name should consist of alpha-numeric characters.
* - backend A file backend name (see $wgFileBackends).
*
* For most core repos:
* - zones Associative array of zone names that each map to an array with:
* container : backend container name the zone is in
* directory : root path within container for the zone
* url : base URL to the root of the zone
* urlsByExt : map of file extension types to base URLs
* (useful for using a different cache for videos)
* Zones default to using "<repo name>-<zone name>" as the container name
* and default to using the container root as the zone's root directory.
* Nesting of zone locations within other zones should be avoided.
* - url Public zone URL. The 'zones' settings take precedence.
* - hashLevels The number of directory levels for hash-based division of files
* - thumbScriptUrl The URL for thumb.php (optional, not recommended)
* - transformVia404 Whether to skip media file transformation on parse and rely on a 404
* handler instead.
* - initialCapital Equivalent to $wgCapitalLinks (or $wgCapitalLinkOverrides[NS_FILE],
* determines whether filenames implicitly start with a capital letter.
* The current implementation may give incorrect description page links
* when the local $wgCapitalLinks and initialCapital are mismatched.
* - pathDisclosureProtection
* May be 'paranoid' to remove all parameters from error messages, 'none' to
* leave the paths in unchanged, or 'simple' to replace paths with
* placeholders. Default for LocalRepo is 'simple'.
* - fileMode This allows wikis to set the file mode when uploading/moving files. Default
* is 0644.
* - directory The local filesystem directory where public files are stored. Not used for
* some remote repos.
* - thumbDir The base thumbnail directory. Defaults to "<directory>/thumb".
* - thumbUrl The base thumbnail URL. Defaults to "<url>/thumb".
* - isPrivate Set this if measures should always be taken to keep the files private.
* One should not trust this to assure that the files are not web readable;
* the server configuration should be done manually depending on the backend.
*
* These settings describe a foreign MediaWiki installation. They are optional, and will be ignored
* for local repositories:
* - descBaseUrl URL of image description pages, e.g. https://en.wikipedia.org/wiki/File:
* - scriptDirUrl URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g.
* https://en.wikipedia.org/w
* - articleUrl Equivalent to $wgArticlePath, e.g. https://en.wikipedia.org/wiki/$1
* - fetchDescription Fetch the text of the remote file description page and display them
* on the local wiki.
* - abbrvThreshold File names over this size will use the short form of thumbnail names.
* Short thumbnail names only have the width, parameters, and the extension.
*
* ForeignDBRepo:
* - dbType, dbServer, dbUser, dbPassword, dbName, dbFlags
* equivalent to the corresponding member of $wgDBservers
* - tablePrefix Table prefix, the foreign wiki's $wgDBprefix
* - hasSharedCache Set to true if the foreign wiki's $wgMainCacheType is identical to,
* and accessible from, this wiki.
*
* ForeignAPIRepo:
* - apibase Use for the foreign API's URL
* - apiThumbCacheExpiry How long to locally cache thumbs for
*
* If you leave $wgLocalFileRepo set to false, Setup will fill in appropriate values.
* Otherwise, set $wgLocalFileRepo to a repository structure as described above.
* If you set $wgUseInstantCommons to true, it will add an entry for Commons.
* If you set $wgForeignFileRepos to an array of repository structures, those will
* be searched after the local file repo.
* Otherwise, you will only have access to local media files.
*
* @see Setup.php for an example usage and default initialization.
*/
$wgLocalFileRepo = false;
/**
* Enable the use of files from one or more other wikis.
*
* If you operate multiple wikis, you can declare a shared upload path here.
* Uploads to the local wiki will NOT be stored here - See $wgLocalFileRepo
* and $wgUploadDirectory for that.
*
* The wiki will only consider the foreign repository if no file of the given name
* is found in the local repository (e.g. via `[[File:..]]` syntax).
*
* @since 1.11
* @see $wgLocalFileRepo
*/
$wgForeignFileRepos = [];
/**
* Use Wikimedia Commons as a foreign file repository.
*
* This is a shortcut for adding an entry to to $wgForeignFileRepos
* for https://commons.wikimedia.org, using ForeignAPIRepo with the
* default settings.
*
* @since 1.16
*/
$wgUseInstantCommons = false;
/**
* Shortcut for adding an entry to $wgForeignFileRepos.
*
* Uses the following variables:
*
* - directory: $wgSharedUploadDirectory.
* - url: $wgSharedUploadPath.
* - hashLevels: Based on $wgHashedSharedUploadDirectory.
* - thumbScriptUrl: $wgSharedThumbnailScriptPath.
* - transformVia404: Based on $wgGenerateThumbnailOnParse.
* - descBaseUrl: $wgRepositoryBaseUrl.
* - fetchDescription: $wgFetchCommonsDescriptions.
*
* If $wgSharedUploadDBname is set, it uses the ForeignDBRepo
* class, with also the following variables:
*
* - dbName: $wgSharedUploadDBname.
* - dbType: $wgDBtype.
* - dbServer: $wgDBserver.
* - dbUser: $wgDBuser.
* - dbPassword: $wgDBpassword.
* - dbFlags: Based on $wgDebugDumpSql.
* - tablePrefix: $wgSharedUploadDBprefix,
* - hasSharedCache: $wgCacheSharedUploads.
*
* @var bool
* @since 1.3
*/
$wgUseSharedUploads = false;
/**
* Shortcut for the 'directory' setting of $wgForeignFileRepos.
* Only used if $wgUseSharedUploads is enabled.
*
* @var string
* @since 1.3
*/
$wgSharedUploadDirectory = null;
/**
* Shortcut for the 'url' setting of $wgForeignFileRepos.
* Only used if $wgUseSharedUploads is enabled.
*
* @var string
* @since 1.3
*/
$wgSharedUploadPath = null;
/**
* Shortcut for the 'hashLevels' setting of $wgForeignFileRepos.
* Only used if $wgUseSharedUploads is enabled.
*
* @var bool
* @since 1.3
*/
$wgHashedSharedUploadDirectory = true;
/**
* Shortcut for the 'descBaseUrl' setting of $wgForeignFileRepos.
* Only used if $wgUseSharedUploads is enabled.
*
* @since 1.5
*/
$wgRepositoryBaseUrl = 'https://commons.wikimedia.org/wiki/File:';
/**
* Shortcut for the 'fetchDescription' setting of $wgForeignFileRepos.
* Only used if $wgUseSharedUploads is enabled.
*
* @var bool
* @since 1.5
*/
$wgFetchCommonsDescriptions = false;
/**
* Shortcut for the ForeignDBRepo 'dbName' setting in $wgForeignFileRepos.
* Set this to false if the uploads do not come from a wiki.
* Only used if $wgUseSharedUploads is enabled.
*
* @var bool|string
* @since 1.4
*/
$wgSharedUploadDBname = false;
/**
* Shortcut for the ForeignDBRepo 'tablePrefix' setting in $wgForeignFileRepos.
* Only used if $wgUseSharedUploads is enabled.
*
* @var string
* @since 1.5
*/
$wgSharedUploadDBprefix = '';
/**
* Shortcut for the ForeignDBRepo 'hasSharedCache' setting in $wgForeignFileRepos.
* Only used if $wgUseSharedUploads is enabled.
*
* @var bool
* @since 1.5
*/
$wgCacheSharedUploads = true;
/**
* Array of foreign file repo names (set in $wgForeignFileRepos above) that
* are allowable upload targets. These wikis must have some method of
* authentication (i.e. CentralAuth), and be CORS-enabled for this wiki.
* The string 'local' signifies the default local file repository.
*
* Example:
* $wgForeignUploadTargets = [ 'shared' ];
*/
$wgForeignUploadTargets = [ 'local' ];
/**
* Configuration for file uploads using the embeddable upload dialog
* (https://www.mediawiki.org/wiki/Upload_dialog).
*
* This applies also to foreign uploads to this wiki (the configuration is loaded by remote wikis
* using the action=query&meta=siteinfo API).
*
* See below for documentation of each property. None of the properties may be omitted.
*/
$wgUploadDialog = [
// Fields to make available in the dialog. `true` means that this field is visible, `false` means
// that it is hidden. The "Name" field can't be hidden. Note that you also have to add the
// matching replacement to the 'filepage' format key below to make use of these.
'fields' => [
'description' => true,
'date' => false,
'categories' => false,
],
// Suffix of localisation messages used to describe the license under which the uploaded file will
// be released. The same value may be set for both 'local' and 'foreign' uploads.
'licensemessages' => [
// The 'local' messages are used for local uploads on this wiki:
// * upload-form-label-own-work-message-generic-local
// * upload-form-label-not-own-work-message-generic-local
// * upload-form-label-not-own-work-local-generic-local
'local' => 'generic-local',
// The 'foreign' messages are used for cross-wiki uploads from other wikis to this wiki:
// * upload-form-label-own-work-message-generic-foreign
// * upload-form-label-not-own-work-message-generic-foreign
// * upload-form-label-not-own-work-local-generic-foreign
'foreign' => 'generic-foreign',
],
// Upload comments to use for 'local' and 'foreign' uploads. This can also be set to a single
// string value, in which case it is used for both kinds of uploads. Available replacements:
// * $HOST - domain name from which a cross-wiki upload originates
// * $PAGENAME - wiki page name from which an upload originates
'comment' => [
'local' => '',
'foreign' => '',
],
// Format of the file page wikitext to be generated from the fields input by the user.
'format' => [
// Wrapper for the whole page. Available replacements:
// * $DESCRIPTION - file description, as input by the user (only if the 'description' field is
// enabled), wrapped as defined below in the 'description' key
// * $DATE - file creation date, as input by the user (only if the 'date' field is enabled)
// * $SOURCE - as defined below in the 'ownwork' key, may be extended in the future
// * $AUTHOR - linked user name, may be extended in the future
// * $LICENSE - as defined below in the 'license' key, may be extended in the future
// * $CATEGORIES - file categories wikitext, as input by the user (only if the 'categories'
// field is enabled), or if no input, as defined below in the 'uncategorized' key
'filepage' => '$DESCRIPTION',
// Wrapped for file description. Available replacements:
// * $LANGUAGE - source wiki's content language
// * $TEXT - input by the user
'description' => '$TEXT',
'ownwork' => '',
'license' => '',
'uncategorized' => '',
],
];
/**
* File backend structure configuration.
*
* This is an array of file backend configuration arrays.
* Each backend configuration has the following parameters:
* - 'name' : A unique name for the backend
* - 'class' : The file backend class to use
* - 'wikiId' : A unique string that identifies the wiki (container prefix)
* - 'lockManager' : The name of a lock manager (see $wgLockManagers)
*
* See FileBackend::__construct() for more details.
* Additional parameters are specific to the file backend class used.
* These settings should be global to all wikis when possible.
*
* FileBackendMultiWrite::__construct() is augmented with a 'template' option that
* can be used in any of the values of the 'backends' array. Its value is the name of
* another backend in $wgFileBackends. When set, it pre-fills the array with all of the
* configuration of the named backend. Explicitly set values in the array take precedence.
*
* There are two particularly important aspects about each backend:
* - a) Whether it is fully qualified or wiki-relative.
* By default, the paths of files are relative to the current wiki,
* which works via prefixing them with the current wiki ID when accessed.
* Setting 'domainId' forces the backend to be fully qualified by prefixing
* all paths with the specified value instead. This can be useful if
* multiple wikis need to share the same data. Note that 'name' is *not*
* part of any prefix and thus should not be relied upon for namespacing.
* - b) Whether it is only defined for some wikis or is defined on all
* wikis in the wiki farm. Defining a backend globally is useful
* if multiple wikis need to share the same data.
* One should be aware of these aspects when configuring a backend for use with
* any basic feature or plugin. For example, suppose an extension stores data for
* different wikis in different directories and sometimes needs to access data from
* a foreign wiki's directory in order to render a page on given wiki. The extension
* would need a fully qualified backend that is defined on all wikis in the wiki farm.
*/
$wgFileBackends = [];
/**
* Array of configuration arrays for each lock manager.
* Each backend configuration has the following parameters:
* - 'name' : A unique name for the lock manager
* - 'class' : The lock manger class to use
*
* See LockManager::__construct() for more details.
* Additional parameters are specific to the lock manager class used.
* These settings should be global to all wikis.
*
* When using DBLockManager, the 'dbsByBucket' map can reference 'localDBMaster' as
* a peer database in each bucket. This will result in an extra connection to the domain
* that the LockManager services, which must also be a valid wiki ID.
*/
$wgLockManagers = [];
/**
* Show Exif data, on by default if available.
* Requires PHP's Exif extension: https://www.php.net/manual/en/ref.exif.php
*
* @note FOR WINDOWS USERS:
* To enable Exif functions, add the following line to the "Windows
* extensions" section of php.ini:
* @code{.ini}
* extension=extensions/php_exif.dll
* @endcode
*/
$wgShowEXIF = function_exists( 'exif_read_data' );
/**
* If to automatically update the img_metadata field
* if the metadata field is outdated but compatible with the current version.
* Defaults to false.
*/
$wgUpdateCompatibleMetadata = false;
/**
* Allow for upload to be copied from an URL.
* The timeout for copy uploads is set by $wgCopyUploadTimeout.
* You have to assign the user right 'upload_by_url' to a user group, to use this.
*/
$wgAllowCopyUploads = false;
/**
* A list of domains copy uploads can come from
*
* @since 1.20
*/
$wgCopyUploadsDomains = [];
/**
* Enable copy uploads from Special:Upload. $wgAllowCopyUploads must also be
* true. If $wgAllowCopyUploads is true, but this is false, you will only be
* able to perform copy uploads from the API or extensions (e.g. UploadWizard).
*/
$wgCopyUploadsFromSpecialUpload = false;
/**
* Proxy to use for copy upload requests.
* @since 1.20
*/
$wgCopyUploadProxy = false;
/**
* Different timeout for upload by url
* This could be useful since when fetching large files, you may want a
* timeout longer than the default $wgHTTPTimeout. False means fallback
* to default.
*
* @var int|bool
*
* @since 1.22
*/
$wgCopyUploadTimeout = false;
/**
* Max size for uploads, in bytes. If not set to an array, applies to all
* uploads. If set to an array, per upload type maximums can be set, using the
* file and url keys. If the * key is set this value will be used as maximum
* for non-specified types.
*
* @par Example:
* @code
* $wgMaxUploadSize = [
* '*' => 250 * 1024,
* 'url' => 500 * 1024,
* ];
* @endcode
* Sets the maximum for all uploads to 250 kB except for upload-by-url, which
* will have a maximum of 500 kB.
*/
$wgMaxUploadSize = 1024 * 1024 * 100; # 100MB
/**
* Minimum upload chunk size, in bytes. When using chunked upload, non-final
* chunks smaller than this will be rejected. May be reduced based on the
* 'upload_max_filesize' or 'post_max_size' PHP settings.
* @since 1.26
*/
$wgMinUploadChunkSize = 1024; # 1KB
/**
* Point the upload navigation link to an external URL
* Useful if you want to use a shared repository by default
* without disabling local uploads (use $wgEnableUploads = false for that).
*
* @par Example:
* @code
* $wgUploadNavigationUrl = 'https://commons.wikimedia.org/wiki/Special:Upload';
* @endcode
*/
$wgUploadNavigationUrl = false;
/**
* Point the upload link for missing files to an external URL, as with
* $wgUploadNavigationUrl. The URL will get "(?|&)wpDestFile=<filename>"
* appended to it as appropriate.
*/
$wgUploadMissingFileUrl = false;
/**
* Give a path here to use thumb.php for thumbnail generation on client
* request, instead of generating them on render and outputting a static URL.
* This is necessary if some of your apache servers don't have read/write
* access to the thumbnail path.
*
* @par Example:
* @code
* $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
* @endcode
*/
$wgThumbnailScriptPath = false;
/**
* Shortcut for the 'thumbScriptUrl' setting of $wgForeignFileRepos.
* Only used if $wgUseSharedUploads is enabled.
*
* @var string
* @since 1.3
*/
$wgSharedThumbnailScriptPath = false;
/**
* Set this to false if you do not want MediaWiki to divide your images
* directory into many subdirectories, for improved performance.
*
* It's almost always good to leave this enabled. In previous versions of
* MediaWiki, some users set this to false to allow images to be added to the
* wiki by simply copying them into $wgUploadDirectory and then running
* maintenance/rebuildImages.php to register them in the database. This is no
* longer recommended, use maintenance/importImages.php instead.
*
* @note That this variable may be ignored if $wgLocalFileRepo is set.
* @todo Deprecate the setting and ultimately remove it from Core.
*/
$wgHashedUploadDirectory = true;
/**
* This is the list of preferred extensions for uploading files. Uploading files
* with extensions not in this list will trigger a warning.
*
* @warning If you add any OpenOffice or Microsoft Office file formats here,
* such as odt or doc, and untrusted users are allowed to upload files, then
* your wiki will be vulnerable to cross-site request forgery (CSRF).
*/
$wgFileExtensions = [ 'png', 'gif', 'jpg', 'jpeg', 'webp' ];
/**
* Files with these extensions will never be allowed as uploads.
* An array of file extensions to blacklist. You should append to this array
* if you want to blacklist additional files.
*/
$wgFileBlacklist = [
# HTML may contain cookie-stealing JavaScript and web bugs
'html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht',
# PHP scripts may execute arbitrary code on the server
'php', 'phtml', 'php3', 'php4', 'php5', 'phps', 'phar',
# Other types that may be interpreted by some servers
'shtml', 'jhtml', 'pl', 'py', 'cgi',
# May contain harmful executables for Windows victims
'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' ];
/**
* Files with these MIME types will never be allowed as uploads
* if $wgVerifyMimeType is enabled.
*/
$wgMimeTypeBlacklist = [
# HTML may contain cookie-stealing JavaScript and web bugs
'text/html', 'text/javascript', 'text/x-javascript', 'application/x-shellscript',
# PHP scripts may execute arbitrary code on the server
'application/x-php', 'text/x-php',
# Other types that may be interpreted by some servers
'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh',
# Client-side hazards on Internet Explorer
'text/scriptlet', 'application/x-msdownload',
# Windows metafile, client-side vulnerability on some systems
'application/x-msmetafile',
];
/**
* Allow Java archive uploads.
* This is not recommended for public wikis since a maliciously-constructed
* applet running on the same domain as the wiki can steal the user's cookies.
*/
$wgAllowJavaUploads = false;
/**
* This is a flag to determine whether or not to check file extensions on upload.
*
* @warning Setting this to false is insecure for public wikis.
*/
$wgCheckFileExtensions = true;
/**
* If this is turned off, users may override the warning for files not covered
* by $wgFileExtensions.
*
* @warning Setting this to false is insecure for public wikis.
*/
$wgStrictFileExtensions = true;
/**
* Setting this to true will disable the upload system's checks for HTML/JavaScript.
*
* @warning THIS IS VERY DANGEROUS on a publicly editable site, so USE
* $wgGroupPermissions TO RESTRICT UPLOADING to only those that you trust
*/
$wgDisableUploadScriptChecks = false;
/**
* Warn if uploaded files are larger than this (in bytes), or false to disable
*/
$wgUploadSizeWarning = false;
/**
* list of trusted media-types and MIME types.
* Use the MEDIATYPE_xxx constants to represent media types.
* This list is used by File::isSafeFile
*
* Types not listed here will have a warning about unsafe content
* displayed on the images description page. It would also be possible
* to use this for further restrictions, like disabling direct
* [[media:...]] links for non-trusted formats.
*/
$wgTrustedMediaFormats = [
MEDIATYPE_BITMAP, // all bitmap formats
MEDIATYPE_AUDIO, // all audio formats
MEDIATYPE_VIDEO, // all plain video formats
"image/svg+xml", // svg (only needed if inline rendering of svg is not supported)
"application/pdf", // PDF files
# "application/x-shockwave-flash", //flash/shockwave movie
];
/**
* Plugins for media file type handling.
* Each entry in the array maps a MIME type to a class name
*
* Core media handlers are listed in MediaHandlerFactory,
* and extensions should use extension.json.
*/
$wgMediaHandlers = [];
/**
* Media handler overrides for parser tests (they don't need to generate actual
* thumbnails, so a mock will do)
*/
$wgParserTestMediaHandlers = [
'image/jpeg' => 'MockBitmapHandler',
'image/png' => 'MockBitmapHandler',
'image/gif' => 'MockBitmapHandler',
'image/tiff' => 'MockBitmapHandler',
'image/webp' => 'MockBitmapHandler',
'image/x-ms-bmp' => 'MockBitmapHandler',
'image/x-bmp' => 'MockBitmapHandler',
'image/x-xcf' => 'MockBitmapHandler',
'image/svg+xml' => 'MockSvgHandler',
'image/vnd.djvu' => 'MockDjVuHandler',
];
/**
* Plugins for page content model handling.
* Each entry in the array maps a model id to a class name or callback
* that creates an instance of the appropriate ContentHandler subclass.
*
* @since 1.21
*/
$wgContentHandlers = [
// the usual case
CONTENT_MODEL_WIKITEXT => WikitextContentHandler::class,
// dumb version, no syntax highlighting
CONTENT_MODEL_JAVASCRIPT => JavaScriptContentHandler::class,
// simple implementation, for use by extensions, etc.
CONTENT_MODEL_JSON => JsonContentHandler::class,
// dumb version, no syntax highlighting
CONTENT_MODEL_CSS => CssContentHandler::class,
// plain text, for use by extensions, etc.
CONTENT_MODEL_TEXT => TextContentHandler::class,
];
/**
* Whether to enable server-side image thumbnailing. If false, images will
* always be sent to the client in full resolution, with appropriate width= and
* height= attributes on the <img> tag for the client to do its own scaling.
*/
$wgUseImageResize = true;
/**
* Resizing can be done using PHP's internal image libraries or using
* ImageMagick or another third-party converter, e.g. GraphicMagick.
* These support more file formats than PHP, which only supports PNG,
* GIF, JPG, XBM and WBMP.
*
* Use Image Magick instead of PHP builtin functions.
*/
$wgUseImageMagick = false;
/**
* The convert command shipped with ImageMagick
*/
$wgImageMagickConvertCommand = '/usr/bin/convert';
/**
* Array of max pixel areas for interlacing per MIME type
* @since 1.27
*/
$wgMaxInterlacingAreas = [];
/**
* Sharpening parameter to ImageMagick
*/
$wgSharpenParameter = '0x0.4';
/**
* Reduction in linear dimensions below which sharpening will be enabled
*/
$wgSharpenReductionThreshold = 0.85;
/**
* Temporary directory used for ImageMagick. The directory must exist. Leave
* this set to false to let ImageMagick decide for itself.
*/
$wgImageMagickTempDir = false;
/**
* Use another resizing converter, e.g. GraphicMagick
* %s will be replaced with the source path, %d with the destination
* %w and %h will be replaced with the width and height.
*
* @par Example for GraphicMagick:
* @code
* $wgCustomConvertCommand = "gm convert %s -resize %wx%h %d"
* @endcode
*
* Leave as false to skip this.
*/
$wgCustomConvertCommand = false;
/**
* used for lossless jpeg rotation
*
* @since 1.21
*/
$wgJpegTran = '/usr/bin/jpegtran';
/**
* At default setting of 'yuv420', JPEG thumbnails will use 4:2:0 chroma
* subsampling to reduce file size, at the cost of possible color fringing
* at sharp edges.
*
* See https://en.wikipedia.org/wiki/Chroma_subsampling
*
* Supported values:
* false - use scaling system's default (same as pre-1.27 behavior)
* 'yuv444' - luma and chroma at same resolution
* 'yuv422' - chroma at 1/2 resolution horizontally, full vertically
* 'yuv420' - chroma at 1/2 resolution in both dimensions
*
* This setting is currently supported only for the ImageMagick backend;
* others may default to 4:2:0 or 4:4:4 or maintaining the source file's
* sampling in the thumbnail.
*
* @since 1.27
*/
$wgJpegPixelFormat = 'yuv420';
/**
* When scaling a JPEG thumbnail, this is the quality we request
* from the backend. It should be an int between 1 and 100,
* with 100 indicating 100% quality.
*
* @since 1.32
*/
$wgJpegQuality = 80;
/**
* Some tests and extensions use exiv2 to manipulate the Exif metadata in some
* image formats.
*/
$wgExiv2Command = '/usr/bin/exiv2';
/**
* Path to exiftool binary. Used for lossless ICC profile swapping.
*
* @since 1.26
*/
$wgExiftool = '/usr/bin/exiftool';
/**
* Scalable Vector Graphics (SVG) may be uploaded as images.
* Since SVG support is not yet standard in browsers, it is
* necessary to rasterize SVGs to PNG as a fallback format.
*
* An external program is required to perform this conversion.
* If set to an array, the first item is a PHP callable and any further items
* are passed as parameters after $srcPath, $dstPath, $width, $height
*/
$wgSVGConverters = [
'ImageMagick' =>
'$path/convert -background "#ffffff00" -thumbnail $widthx$height\! $input PNG:$output',
'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d '
. '$output $input',
'rsvg' => '$path/rsvg-convert -w $width -h $height -o $output $input',
'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
'ImagickExt' => [ 'SvgHandler::rasterizeImagickExt' ],
];
/**
* Pick a converter defined in $wgSVGConverters
*/
$wgSVGConverter = 'ImageMagick';
/**
* If not in the executable PATH, specify the SVG converter path.
*/
$wgSVGConverterPath = '';
/**
* Don't scale a SVG larger than this
*/
$wgSVGMaxSize = 5120;
/**
* Don't read SVG metadata beyond this point.
* Default is 1024*256 bytes
*/
$wgSVGMetadataCutoff = 262144;
/**
* Obsolete, no longer used.
* SVG file uploads now always allow <title> elements.
*
* @deprecated 1.34
*/
$wgAllowTitlesInSVG = true;
/**
* Whether thumbnails should be generated in target language (usually, same as
* page language), if available.
* Currently, applies only to SVG images that use the systemLanguage attribute
* to specify text language.
*
* @since 1.33
*/
$wgMediaInTargetLanguage = true;
/**
* The maximum number of pixels a source image can have if it is to be scaled
* down by a scaler that requires the full source image to be decompressed
* and stored in decompressed form, before the thumbnail is generated.
*
* This provides a limit on memory usage for the decompression side of the
* image scaler. The limit is used when scaling PNGs with any of the
* built-in image scalers, such as ImageMagick or GD. It is ignored for
* JPEGs with ImageMagick, and when using the VipsScaler extension.
*
* The default is 50 MB if decompressed to RGBA form, which corresponds to
* 12.5 million pixels or 3500x3500.
*/
$wgMaxImageArea = 1.25e7;
/**
* Force thumbnailing of animated GIFs above this size to a single
* frame instead of an animated thumbnail. As of MW 1.17 this limit
* is checked against the total size of all frames in the animation.
* It probably makes sense to keep this equal to $wgMaxImageArea.
*/
$wgMaxAnimatedGifArea = 1.25e7;
/**
* Browsers don't support TIFF inline generally...
* For inline display, we need to convert to PNG or JPEG.
* Note scaling should work with ImageMagick, but may not with GD scaling.
*
* @par Example:
* @code
* // PNG is lossless, but inefficient for photos
* $wgTiffThumbnailType = [ 'png', 'image/png' ];
* // JPEG is good for photos, but has no transparency support. Bad for diagrams.
* $wgTiffThumbnailType = [ 'jpg', 'image/jpeg' ];
* @endcode
*/
$wgTiffThumbnailType = false;
/**
* If rendered thumbnail files are older than this timestamp, they
* will be rerendered on demand as if the file didn't already exist.
* Update if there is some need to force thumbs and SVG rasterizations
* to rerender, such as fixes to rendering bugs.
*/
$wgThumbnailEpoch = '20030516000000';
/**
* Certain operations are avoided if there were too many recent failures,
* for example, thumbnail generation. Bump this value to invalidate all
* memory of failed operations and thus allow further attempts to resume.
* This is useful when a cause for the failures has been found and fixed.
*/
$wgAttemptFailureEpoch = 1;
/**
* If set, inline scaled images will still produce "<img>" tags ready for
* output instead of showing an error message.
*
* This may be useful if errors are transitory, especially if the site
* is configured to automatically render thumbnails on request.
*
* On the other hand, it may obscure error conditions from debugging.
* Enable the debug log or the 'thumbnail' log group to make sure errors
* are logged to a file for review.
*/
$wgIgnoreImageErrors = false;
/**
* Allow thumbnail rendering on page view. If this is false, a valid
* thumbnail URL is still output, but no file will be created at
* the target location. This may save some time if you have a
* thumb.php or 404 handler set up which is faster than the regular
* webserver(s).
*/
$wgGenerateThumbnailOnParse = true;
/**
* Show thumbnails for old images on the image description page
*/
$wgShowArchiveThumbnails = true;
/**
* If set to true, images that contain certain the exif orientation tag will
* be rotated accordingly. If set to null, try to auto-detect whether a scaler
* is available that can rotate.
*/
$wgEnableAutoRotation = null;
/**
* Internal name of virus scanner. This serves as a key to the
* $wgAntivirusSetup array. Set this to NULL to disable virus scanning. If not
* null, every file uploaded will be scanned for viruses.
*/
$wgAntivirus = null;
/**
* Configuration for different virus scanners. This an associative array of
* associative arrays. It contains one setup array per known scanner type.
* The entry is selected by $wgAntivirus, i.e.
* valid values for $wgAntivirus are the keys defined in this array.
*
* The configuration array for each scanner contains the following keys:
* "command", "codemap", "messagepattern":
*
* "command" is the full command to call the virus scanner - %f will be
* replaced with the name of the file to scan. If not present, the filename
* will be appended to the command. Note that this must be overwritten if the
* scanner is not in the system path; in that case, please set
* $wgAntivirusSetup[$wgAntivirus]['command'] to the desired command with full
* path.
*
* "codemap" is a mapping of exit code to return codes of the detectVirus
* function in SpecialUpload.
* - An exit code mapped to AV_SCAN_FAILED causes the function to consider
* the scan to be failed. This will pass the file if $wgAntivirusRequired
* is not set.
* - An exit code mapped to AV_SCAN_ABORTED causes the function to consider
* the file to have an unsupported format, which is probably immune to
* viruses. This causes the file to pass.
* - An exit code mapped to AV_NO_VIRUS will cause the file to pass, meaning
* no virus was found.
* - All other codes (like AV_VIRUS_FOUND) will cause the function to report
* a virus.
* - You may use "*" as a key in the array to catch all exit codes not mapped otherwise.
*
* "messagepattern" is a perl regular expression to extract the meaningful part of the scanners
* output. The relevant part should be matched as group one (\1).
* If not defined or the pattern does not match, the full message is shown to the user.
*/
$wgAntivirusSetup = [
# setup for clamav
'clamav' => [
'command' => 'clamscan --no-summary ',
'codemap' => [
"0" => AV_NO_VIRUS, # no virus
"1" => AV_VIRUS_FOUND, # virus found
"52" => AV_SCAN_ABORTED, # unsupported file format (probably immune)
"*" => AV_SCAN_FAILED, # else scan failed
],
'messagepattern' => '/.*?:(.*)/sim',
],
];
/**
* Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected.
*/
$wgAntivirusRequired = true;
/**
* Determines if the MIME type of uploaded files should be checked
*/
$wgVerifyMimeType = true;
/**
* Determines whether extra checks for IE type detection should be applied.
* This is a conservative check for exactly what IE 6 or so checked for,
* and shouldn't trigger on for instance JPEG files containing links in EXIF
* metadata.
*
* @since 1.34
*/
$wgVerifyMimeTypeIE = true;
/**
* Sets the MIME type definition file to use by includes/libs/mime/MimeAnalyzer.php.
* Set to null, to use built-in defaults only.
* example: $wgMimeTypeFile = '/etc/mime.types';
*/
$wgMimeTypeFile = 'includes/mime.types';
/**
* Sets the MIME type info file to use by includes/libs/mime/MimeAnalyzer.php.
* Set to null, to use built-in defaults only.
*/
$wgMimeInfoFile = 'includes/mime.info';
/**
* Sets an external MIME detector program. The command must print only
* the MIME type to standard output.
* The name of the file to process will be appended to the command given here.
* If not set or NULL, PHP's mime_content_type function will be used.
*
* @par Example:
* @code
* #$wgMimeDetectorCommand = "file -bi"; # use external MIME detector (Linux)
* @endcode
*/
$wgMimeDetectorCommand = null;
/**
* Switch for trivial MIME detection. Used by thumb.php to disable all fancy
* things, because only a few types of images are needed and file extensions
* can be trusted.
*/
$wgTrivialMimeDetection = false;
/**
* Additional XML types we can allow via MIME-detection.
* array = [ 'rootElement' => 'associatedMimeType' ]
*/
$wgXMLMimeTypes = [
'http://www.w3.org/2000/svg:svg' => 'image/svg+xml',
'svg' => 'image/svg+xml',
'http://www.lysator.liu.se/~alla/dia/:diagram' => 'application/x-dia-diagram',
'http://www.w3.org/1999/xhtml:html' => 'text/html', // application/xhtml+xml?
'html' => 'text/html', // application/xhtml+xml?
];
/**
* Limit images on image description pages to a user-selectable limit. In order
* to reduce disk usage, limits can only be selected from a list.
* The user preference is saved as an array offset in the database, by default
* the offset is set with $wgDefaultUserOptions['imagesize']. Make sure you
* change it if you alter the array (see T10858).
* This is the list of settings the user can choose from:
*/
$wgImageLimits = [
[ 320, 240 ],
[ 640, 480 ],
[ 800, 600 ],
[ 1024, 768 ],
[ 1280, 1024 ]
];
/**
* Adjust thumbnails on image pages according to a user setting. In order to
* reduce disk usage, the values can only be selected from a list. This is the
* list of settings the user can choose from:
*/
$wgThumbLimits = [
120,
150,
180,
200,
250,
300
];
/**
* When defined, is an array of image widths used as buckets for thumbnail generation.
* The goal is to save resources by generating thumbnails based on reference buckets instead of
* always using the original. This will incur a speed gain but cause a quality loss.
*
* The buckets generation is chained, with each bucket generated based on the above bucket
* when possible. File handlers have to opt into using that feature. For now only BitmapHandler
* supports it.
*/
$wgThumbnailBuckets = null;
/**
* When using thumbnail buckets as defined above, this sets the minimum distance to the bucket
* above the requested size. The distance represents how many extra pixels of width the bucket
* needs in order to be used as the reference for a given thumbnail. For example, with the
* following buckets:
*
* $wgThumbnailBuckets = [ 128, 256, 512 ];
*
* and a distance of 50:
*
* $wgThumbnailMinimumBucketDistance = 50;
*
* If we want to render a thumbnail of width 220px, the 512px bucket will be used,
* because 220 + 50 = 270 and the closest bucket bigger than 270px is 512.
*/
$wgThumbnailMinimumBucketDistance = 50;
/**
* When defined, is an array of thumbnail widths to be rendered at upload time. The idea is to
* prerender common thumbnail sizes, in order to avoid the necessity to render them on demand, which
* has a performance impact for the first client to view a certain size.
*
* This obviously means that more disk space is needed per upload upfront.
*
* @since 1.25
*/
$wgUploadThumbnailRenderMap = [];
/**
* The method through which the thumbnails will be prerendered for the entries in
* $wgUploadThumbnailRenderMap
*
* The method can be either "http" or "jobqueue". The former uses an http request to hit the
* thumbnail's URL.
* This method only works if thumbnails are configured to be rendered by a 404 handler. The latter
* option uses the job queue to render the thumbnail.
*
* @since 1.25
*/
$wgUploadThumbnailRenderMethod = 'jobqueue';
/**
* When using the "http" wgUploadThumbnailRenderMethod, lets one specify a custom Host HTTP header.
*
* @since 1.25
*/
$wgUploadThumbnailRenderHttpCustomHost = false;
/**
* When using the "http" wgUploadThumbnailRenderMethod, lets one specify a custom domain to send the
* HTTP request to.
*
* @since 1.25
*/
$wgUploadThumbnailRenderHttpCustomDomain = false;
/**
* When this variable is true and JPGs use the sRGB ICC profile, swaps it for the more lightweight
* (and free) TinyRGB profile when generating thumbnails.
*
* @since 1.26
*/
$wgUseTinyRGBForJPGThumbnails = false;
/**
* Parameters for the "<gallery>" tag.
* Fields are:
* - imagesPerRow: Default number of images per-row in the gallery. 0 -> Adapt to screensize
* - imageWidth: Width of the cells containing images in galleries (in "px")
* - imageHeight: Height of the cells containing images in galleries (in "px")
* - captionLength: Length to truncate filename to in caption when using "showfilename".
* A value of 'true' will truncate the filename to one line using CSS
* and will be the behaviour after deprecation.
* @deprecated since 1.28
* - showBytes: Show the filesize in bytes in categories
* - showDimensions: Show the dimensions (width x height) in categories
* - mode: Gallery mode
*/
$wgGalleryOptions = [];
/**
* Adjust width of upright images when parameter 'upright' is used
* This allows a nicer look for upright images without the need to fix the width
* by hardcoded px in wiki sourcecode.
*/
$wgThumbUpright = 0.75;
/**
* Default value for chmoding of new directories.
*/
$wgDirectoryMode = 0777;
/**
* Generate and use thumbnails suitable for screens with 1.5 and 2.0 pixel densities.
*
* This means a 320x240 use of an image on the wiki will also generate 480x360 and 640x480
* thumbnails, output via the srcset attribute.
*/
$wgResponsiveImages = true;
/**
* @name DJVU settings
* @{
*/
/**
* Path of the djvudump executable
* Enable this and $wgDjvuRenderer to enable djvu rendering
* example: $wgDjvuDump = 'djvudump';
*/
$wgDjvuDump = null;
/**
* Path of the ddjvu DJVU renderer
* Enable this and $wgDjvuDump to enable djvu rendering
* example: $wgDjvuRenderer = 'ddjvu';
*/
$wgDjvuRenderer = null;
/**
* Path of the djvutxt DJVU text extraction utility
* Enable this and $wgDjvuDump to enable text layer extraction from djvu files
* example: $wgDjvuTxt = 'djvutxt';
*/
$wgDjvuTxt = null;
/**
* Path of the djvutoxml executable
* This works like djvudump except much, much slower as of version 3.5.
*
* For now we recommend you use djvudump instead. The djvuxml output is
* probably more stable, so we'll switch back to it as soon as they fix
* the efficiency problem.
* https://sourceforge.net/tracker/index.php?func=detail&aid=1704049&group_id=32953&atid=406583
*
* @par Example:
* @code
* $wgDjvuToXML = 'djvutoxml';
* @endcode
*/
$wgDjvuToXML = null;
/**
* Shell command for the DJVU post processor
* Default: pnmtojpeg, since ddjvu generates ppm output
* Set this to false to output the ppm file directly.
*/
$wgDjvuPostProcessor = 'pnmtojpeg';
/**
* File extension for the DJVU post processor output
*/
$wgDjvuOutputExtension = 'jpg';
/** @} */ # end of DJvu }
/** @} */ # end of file uploads }
/************************************************************************//**
* @name Email settings
* @{
*/
/**
* Site admin email address.
*
* Defaults to "wikiadmin@$wgServerName" (in Setup.php).
*/
$wgEmergencyContact = false;
/**
* Sender email address for e-mail notifications.
*
* The address we use as sender when a user requests a password reminder,
* as well as other e-mail notifications.
*
* Defaults to "apache@$wgServerName" (in Setup.php).
*/
$wgPasswordSender = false;
/**
* Reply-To address for e-mail notifications.
*
* Defaults to $wgPasswordSender (in Setup.php).
*/
$wgNoReplyAddress = false;
/**
* Set to true to enable the e-mail basic features:
* Password reminders, etc. If sending e-mail on your
* server doesn't work, you might want to disable this.
*/
$wgEnableEmail = true;
/**
* Set to true to enable user-to-user e-mail.
* This can potentially be abused, as it's hard to track.
*/
$wgEnableUserEmail = true;
/**
* Set to true to enable user-to-user e-mail blacklist.
*
* @since 1.30
*/
$wgEnableUserEmailBlacklist = false;
/**
* If true put the sending user's email in a Reply-To header
* instead of From (false). ($wgPasswordSender will be used as From.)
*
* Some mailers (eg SMTP) set the SMTP envelope sender to the From value,
* which can cause problems with SPF validation and leak recipient addresses
* when bounces are sent to the sender. In addition, DMARC restrictions
* can cause emails to fail to be received when false.
*/
$wgUserEmailUseReplyTo = true;
/**
* Minimum time, in hours, which must elapse between password reminder
* emails for a given account. This is to prevent abuse by mail flooding.
*/
$wgPasswordReminderResendTime = 24;
/**
* The time, in seconds, when an emailed temporary password expires.
*/
$wgNewPasswordExpiry = 3600 * 24 * 7;
/**
* The time, in seconds, when an email confirmation email expires
*/
$wgUserEmailConfirmationTokenExpiry = 7 * 24 * 60 * 60;
/**
* The number of days that a user's password is good for. After this number of days, the
* user will be asked to reset their password. Set to false to disable password expiration.
*/
$wgPasswordExpirationDays = false;
/**
* If a user's password is expired, the number of seconds when they can still login,
* and cancel their password change, but are sent to the password change form on each login.
*/
$wgPasswordExpireGrace = 3600 * 24 * 7; // 7 days
/**
* SMTP Mode.
*
* For using a direct (authenticated) SMTP server connection.
* Default to false or fill an array :
*
* @code
* $wgSMTP = [
* 'host' => 'SMTP domain',
* 'IDHost' => 'domain for MessageID',
* 'port' => '25',
* 'auth' => [true|false],
* 'username' => [SMTP username],
* 'password' => [SMTP password],
* ];
* @endcode
*/
$wgSMTP = false;
/**
* Additional email parameters, will be passed as the last argument to mail() call.
*/
$wgAdditionalMailParams = null;
/**
* For parts of the system that have been updated to provide HTML email content, send
* both text and HTML parts as the body of the email
*/
$wgAllowHTMLEmail = false;
/**
* Allow sending of e-mail notifications with the editor's address as sender.
*
* This setting depends on $wgEnotifRevealEditorAddress also being enabled.
* If both are enabled, notifications for actions from users that have opted-in,
* will be sent to other users with their address as "From" instead of "Reply-To".
*
* If disabled, or not opted-in, notifications come from $wgPasswordSender.
*
* @var bool
*/
$wgEnotifFromEditor = false;
// TODO move UPO to preferences probably ?
# If set to true, users get a corresponding option in their preferences and can choose to
# enable or disable at their discretion
# If set to false, the corresponding input form on the user preference page is suppressed
# It call this to be a "user-preferences-option (UPO)"
/**
* Require email authentication before sending mail to an email address.
* This is highly recommended. It prevents MediaWiki from being used as an open
* spam relay.
*/
$wgEmailAuthentication = true;
/**
* Allow users to enable email notification ("enotif") on watchlist changes.
*/
$wgEnotifWatchlist = false;
/**
* Allow users to enable email notification ("enotif") when someone edits their
* user talk page.
*
* The owner of the user talk page must also have the 'enotifusertalkpages' user
* preference set to true.
*/
$wgEnotifUserTalk = false;
/**
* Allow sending of e-mail notifications with the editor's address in "Reply-To".
*
* Note, enabling this only actually uses it in notification e-mails if the user
* opted-in to this feature. This feature flag also controls visibility of the
* 'enotifrevealaddr' preference, which, if users opt into, will make e-mail
* notifications about their actions use their address as "Reply-To".
*
* To set the address as "From" instead of "Reply-To", also enable $wgEnotifFromEditor.
*
* If disabled, or not opted-in, notifications come from $wgPasswordSender.
*
* @var bool
*/
$wgEnotifRevealEditorAddress = false;
/**
* Potentially send notification mails on minor edits to pages. This is enabled
* by default. If this is false, users will never be notified on minor edits.
*
* If it is true, editors with the 'nominornewtalk' right (typically bots) will still not
* trigger notifications for minor edits they make (to any page, not just user talk).
*
* Finally, if the watcher/recipient has the 'enotifminoredits' user preference set to
* false, they will not receive notifications for minor edits.
*
* User talk notifications are also affected by $wgEnotifMinorEdits, the above settings,
* $wgEnotifUserTalk, and the preference described there.
*/
$wgEnotifMinorEdits = true;
/**
* Send a generic mail instead of a personalised mail for each user. This
* always uses UTC as the time zone, and doesn't include the username.
*
* For pages with many users watching, this can significantly reduce mail load.
* Has no effect when using sendmail rather than SMTP.
*/
$wgEnotifImpersonal = false;
/**
* Maximum number of users to mail at once when using impersonal mail. Should
* match the limit on your mail server.
*/
$wgEnotifMaxRecips = 500;
/**
* Use real name instead of username in e-mail "from" field.
*/
$wgEnotifUseRealName = false;
/**
* Array of usernames who will be sent a notification email for every change
* which occurs on a wiki. Users will not be notified of their own changes.
*/
$wgUsersNotifiedOnAllChanges = [];
/** @} */ # end of email settings
/************************************************************************//**
* @name Database settings
* @{
*/
/**
* Database host name or IP address
*/
$wgDBserver = 'localhost';
/**
* Database port number (for PostgreSQL and Microsoft SQL Server).
*/
$wgDBport = 5432;
/**
* Name of the database; this should be alphanumeric and not contain spaces nor hyphens
*/
$wgDBname = 'my_wiki';
/**
* Database username
*/
$wgDBuser = 'wikiuser';
/**
* Database user's password
*/
$wgDBpassword = '';
/**
* Database type
*/
$wgDBtype = 'mysql';
/**
* Whether to use SSL in DB connection.
*
* This setting is only used if $wgLBFactoryConf['class'] is set to
* '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
* the DBO_SSL flag must be set in the 'flags' option of the database
* connection to achieve the same functionality.
*/
$wgDBssl = false;
/**
* Whether to use compression in DB connection.
*
* This setting is only used $wgLBFactoryConf['class'] is set to
* '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
* the DBO_COMPRESS flag must be set in the 'flags' option of the database
* connection to achieve the same functionality.
*/
$wgDBcompress = false;
/**
* Separate username for maintenance tasks. Leave as null to use the default.
*/
$wgDBadminuser = null;
/**
* Separate password for maintenance tasks. Leave as null to use the default.
*/
$wgDBadminpassword = null;
/**
* Search type.
* Leave as null to select the default search engine for the
* selected database type (eg SearchMySQL), or set to a class
* name to override to a custom search engine.
*/
$wgSearchType = null;
/**
* Alternative search types
* Sometimes you want to support multiple search engines for testing. This
* allows users to select their search engine of choice via url parameters
* to Special:Search and the action=search API. If using this, there's no
* need to add $wgSearchType to it, that is handled automatically.
*/
$wgSearchTypeAlternatives = null;
/**
* Table name prefix.
* This should be alphanumeric, contain neither spaces nor hyphens, and end in "_"
*/
$wgDBprefix = '';
/**
* MySQL table options to use during installation or update
*/
$wgDBTableOptions = 'ENGINE=InnoDB, DEFAULT CHARSET=binary';
/**
* SQL Mode - default is turning off all modes, including strict, if set.
* null can be used to skip the setting for performance reasons and assume
* DBA has done his best job.
* String override can be used for some additional fun :-)
*/
$wgSQLMode = '';
/**
* Mediawiki schema; this should be alphanumeric and not contain spaces nor hyphens
*/
$wgDBmwschema = null;
/**
* Default group to use when getting database connections.
* Will be used as default query group in ILoadBalancer::getConnection.
* @since 1.32
*/
$wgDBDefaultGroup = null;
/**
* To override default SQLite data directory ($docroot/../data)
*/
$wgSQLiteDataDir = '';
/**
* Shared database for multiple wikis. Commonly used for storing a user table
* for single sign-on. The server for this database must be the same as for the
* main database.
*
* For backwards compatibility the shared prefix is set to the same as the local
* prefix, and the user table is listed in the default list of shared tables.
* The user_properties table is also added so that users will continue to have their
* preferences shared (preferences were stored in the user table prior to 1.16)
*
* $wgSharedTables may be customized with a list of tables to share in the shared
* database. However it is advised to limit what tables you do share as many of
* MediaWiki's tables may have side effects if you try to share them.
*
* $wgSharedPrefix is the table prefix for the shared database. It defaults to
* $wgDBprefix.
*
* $wgSharedSchema is the table schema for the shared database. It defaults to
* $wgDBmwschema.
*
* @deprecated since 1.21 In new code, use the $wiki parameter to LBFactory::getMainLB() to
* access remote databases. Using LBFactory::getMainLB() allows the shared database to
* reside on separate servers to the wiki's own database, with suitable
* configuration of $wgLBFactoryConf.
*/
$wgSharedDB = null;
/**
* @see $wgSharedDB
*/
$wgSharedPrefix = false;
/**
* @see $wgSharedDB
*/
$wgSharedTables = [ 'user', 'user_properties' ];
/**
* @see $wgSharedDB
* @since 1.23
*/
$wgSharedSchema = false;
/**
* Database load balancer
* This is a two-dimensional array, an array of server info structures
* Fields are:
* - host: Host name
* - dbname: Default database name
* - user: DB user
* - password: DB password
* - type: DB type
* - driver: DB driver (when there are multiple drivers)
*
* - load: Ratio of DB_REPLICA load, must be >=0, the sum of all loads must be >0.
* If this is zero for any given server, no normal query traffic will be
* sent to it. It will be excluded from lag checks in maintenance scripts.
* The only way it can receive traffic is if groupLoads is used.
*
* - groupLoads: array of load ratios, the key is the query group name. A query may belong
* to several groups, the most specific group defined here is used.
*
* - flags: bit field
* - DBO_DEFAULT -- turns on DBO_TRX only if "cliMode" is off (recommended)
* - DBO_DEBUG -- equivalent of $wgDebugDumpSql
* - DBO_TRX -- wrap entire request in a transaction
* - DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php)
* - DBO_PERSISTENT -- enables persistent database connections
* - DBO_SSL -- uses SSL/TLS encryption in database connections, if available
* - DBO_COMPRESS -- uses internal compression in database connections,
* if available
*
* - max lag: (optional) Maximum replication lag before a replica DB goes out of rotation
* - is static: (optional) Set to true if the dataset is static and no replication is used.
* - cliMode: (optional) Connection handles will not assume that requests are short-lived
* nor that INSERT..SELECT can be rewritten into a buffered SELECT and INSERT.
* [Default: uses value of $wgCommandLineMode]
*
* These and any other user-defined properties will be assigned to the mLBInfo member
* variable of the Database object.
*
* Leave at false to use the single-server variables above. If you set this
* variable, the single-server variables will generally be ignored (except
* perhaps in some command-line scripts).
*
* The first server listed in this array (with key 0) will be the master. The
* rest of the servers will be replica DBs. To prevent writes to your replica DBs due to
* accidental misconfiguration or MediaWiki bugs, set read_only=1 on all your
* replica DBs in my.cnf. You can set read_only mode at runtime using:
*
* @code
* SET @@read_only=1;
* @endcode
*
* Since the effect of writing to a replica DB is so damaging and difficult to clean
* up, we at Wikimedia set read_only=1 in my.cnf on all our DB servers, even
* our masters, and then set read_only=0 on masters at runtime.
*/
$wgDBservers = false;
/**
* Load balancer factory configuration
* To set up a multi-master wiki farm, set the class here to something that
* can return a LoadBalancer with an appropriate master on a call to getMainLB().
* The class identified here is responsible for reading $wgDBservers,
* $wgDBserver, etc., so overriding it may cause those globals to be ignored.
*
* The LBFactoryMulti class is provided for this purpose, please see
* includes/db/LBFactoryMulti.php for configuration information.
*/
$wgLBFactoryConf = [ 'class' => \Wikimedia\Rdbms\LBFactorySimple::class ];
/**
* After a state-changing request is done by a client, this determines
* how many seconds that client should keep using the master datacenter.
* This avoids unexpected stale or 404 responses due to replication lag.
* @since 1.27
*/
$wgDataCenterUpdateStickTTL = 10;
/**
* File to log database errors to
*/
$wgDBerrorLog = false;
/**
* Timezone to use in the error log.
* Defaults to the wiki timezone ($wgLocaltimezone).
*
* A list of usable timezones can found at:
* https://www.php.net/manual/en/timezones.php
*
* @par Examples:
* @code
* $wgDBerrorLogTZ = 'UTC';
* $wgDBerrorLogTZ = 'GMT';
* $wgDBerrorLogTZ = 'PST8PDT';
* $wgDBerrorLogTZ = 'Europe/Sweden';
* $wgDBerrorLogTZ = 'CET';
* @endcode
*
* @since 1.20
*/
$wgDBerrorLogTZ = false;
/**
* Set true to enable Oracle DCRP (supported from 11gR1 onward)
*
* To use this feature set to true and use a datasource defined as
* POOLED (i.e. in tnsnames definition set server=pooled in connect_data
* block).
*
* Starting from 11gR1 you can use DCRP (Database Resident Connection
* Pool) that maintains established sessions and reuses them on new
* connections.
*
* Not completely tested, but it should fall back on normal connection
* in case the pool is full or the datasource is not configured as
* pooled.
* And the other way around; using oci_pconnect on a non pooled
* datasource should produce a normal connection.
*
* When it comes to frequent shortlived DB connections like with MW
* Oracle tends to s***. The problem is the driver connects to the
* database reasonably fast, but establishing a session takes time and
* resources. MW does not rely on session state (as it does not use
* features such as package variables) so establishing a valid session
* is in this case an unwanted overhead that just slows things down.
*
* @warning EXPERIMENTAL!
*/
$wgDBOracleDRCP = false;
/**
* Other wikis on this site, can be administered from a single developer account.
*
* @var string[] List of wiki DB domain IDs; the format of each ID consist of 1-3 hyphen
* delimited alphanumeric components (each with no hyphens nor spaces) of any of the forms:
* - "<DB NAME>-<DB SCHEMA>-<TABLE PREFIX>"
* - "<DB NAME>-<TABLE PREFIX>"
* - "<DB NAME>"
* If hyphens appear in any of the components, then the domain ID parsing may not work
* in all cases and site functionality might be affected. If the schema ($wgDBmwschema)
* is left to the default "mediawiki" for all wikis, then the schema should be omitted
* from these IDs.
*/
$wgLocalDatabases = [];
/**
* If lag is higher than $wgSlaveLagWarning, show a warning in some special
* pages (like watchlist). If the lag is higher than $wgSlaveLagCritical,
* show a more obvious warning.
*/
$wgSlaveLagWarning = 10;
/**
* @see $wgSlaveLagWarning
*/
$wgSlaveLagCritical = 30;
/**
* Use Windows Authentication instead of $wgDBuser / $wgDBpassword for MS SQL Server
*/
$wgDBWindowsAuthentication = false;
/**@}*/ # End of DB settings }
/************************************************************************//**
* @name Text storage
* @{
*/
/**
* We can also compress text stored in the 'text' table. If this is set on, new
* revisions will be compressed on page save if zlib support is available. Any
* compressed revisions will be decompressed on load regardless of this setting,
* but will not be readable at all* if zlib support is not available.
*/
$wgCompressRevisions = false;
/**
* External stores allow including content
* from non database sources following URL links.
*
* Short names of ExternalStore classes may be specified in an array here:
* @code
* $wgExternalStores = [ "http","file","custom" ]...
* @endcode
*
* CAUTION: Access to database might lead to code execution
*/
$wgExternalStores = [];
/**
* An array of external MySQL servers.
*
* @par Example:
* Create a cluster named 'cluster1' containing three servers:
* @code
* $wgExternalServers = [
* 'cluster1' => <array in the same format as $wgDBservers>
* ];
* @endcode
*
* Used by \Wikimedia\Rdbms\LBFactorySimple, may be ignored if $wgLBFactoryConf is set to
* another class.
*/
$wgExternalServers = [];
/**
* The place to put new revisions, false to put them in the local text table.
* Part of a URL, e.g. DB://cluster1
*
* Can be an array instead of a single string, to enable data distribution. Keys
* must be consecutive integers, starting at zero.
*
* @par Example:
* @code
* $wgDefaultExternalStore = [ 'DB://cluster1', 'DB://cluster2' ];
* @endcode
*
* @var array
*/
$wgDefaultExternalStore = false;
/**
* Revision text may be cached in $wgMemc to reduce load on external storage
* servers and object extraction overhead for frequently-loaded revisions.
*
* Set to 0 to disable, or number of seconds before cache expiry.
*/
$wgRevisionCacheExpiry = 86400 * 7;
/** @} */ # end text storage }
/************************************************************************//**
* @name Performance hacks and limits
* @{
*/
/**
* Disable database-intensive features
*/
$wgMiserMode = false;
/**
* Disable all query pages if miser mode is on, not just some
*/
$wgDisableQueryPages = false;
/**
* Number of rows to cache in 'querycache' table when miser mode is on
*/
$wgQueryCacheLimit = 1000;
/**
* Number of links to a page required before it is deemed "wanted"
*/
$wgWantedPagesThreshold = 1;
/**
* Enable slow parser functions
*/
$wgAllowSlowParserFunctions = false;
/**
* Allow schema updates
*/
$wgAllowSchemaUpdates = true;
/**
* Maximum article size in kilobytes
*/
$wgMaxArticleSize = 2048;
/**
* The minimum amount of memory that MediaWiki "needs"; MediaWiki will try to
* raise PHP's memory limit if it's below this amount.
*/
$wgMemoryLimit = "50M";
/**
* The minimum amount of time that MediaWiki needs for "slow" write request,
* particularly ones with multiple non-atomic writes that *should* be as
* transactional as possible; MediaWiki will call set_time_limit() if needed.
* @since 1.26
*/
$wgTransactionalTimeLimit = 120;
/** @} */ # end performance hacks }
/************************************************************************//**
* @name Cache settings
* @{
*/
/**
* Directory for caching data in the local filesystem. Should not be accessible
* from the web.
*
* Note: if multiple wikis share the same localisation cache directory, they
* must all have the same set of extensions. You can set a directory just for
* the localisation cache using $wgLocalisationCacheConf['storeDirectory'].
*/
$wgCacheDirectory = false;
/**
* Main cache type. This should be a cache with fast access, but it may have
* limited space. By default, it is disabled, since the stock database cache
* is not fast enough to make it worthwhile.
*
* The options are:
*
* - CACHE_ANYTHING: Use anything, as long as it works
* - CACHE_NONE: Do not cache
* - CACHE_DB: Store cache objects in the DB
* - CACHE_MEMCACHED: MemCached, must specify servers in $wgMemCachedServers
* - CACHE_ACCEL: APC, APCU or WinCache
* - (other): A string may be used which identifies a cache
* configuration in $wgObjectCaches.
*
* @see $wgMessageCacheType, $wgParserCacheType
*/
$wgMainCacheType = CACHE_NONE;
/**
* The cache type for storing the contents of the MediaWiki namespace. This
* cache is used for a small amount of data which is expensive to regenerate.
*
* For available types see $wgMainCacheType.
*/
$wgMessageCacheType = CACHE_ANYTHING;
/**
* The cache type for storing article HTML. This is used to store data which
* is expensive to regenerate, and benefits from having plenty of storage space.
*
* For available types see $wgMainCacheType.
*/
$wgParserCacheType = CACHE_ANYTHING;
/**
* The cache type for storing session data.
*
* For available types see $wgMainCacheType.
*/
$wgSessionCacheType = CACHE_ANYTHING;
/**
* The cache type for storing language conversion tables,
* which are used when parsing certain text and interface messages.
*
* For available types see $wgMainCacheType.
*
* @since 1.20
*/
$wgLanguageConverterCacheType = CACHE_ANYTHING;
/**
* Advanced object cache configuration.
*
* Use this to define the class names and constructor parameters which are used
* for the various cache types. Custom cache types may be defined here and
* referenced from $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType,
* or $wgLanguageConverterCacheType.
*
* The format is an associative array where the key is a cache identifier, and
* the value is an associative array of parameters. The "class" parameter is the
* class name which will be used. Alternatively, a "factory" parameter may be
* given, giving a callable function which will generate a suitable cache object.
*/
$wgObjectCaches = [
CACHE_NONE => [ 'class' => EmptyBagOStuff::class, 'reportDupes' => false ],
CACHE_DB => [ 'class' => SqlBagOStuff::class, 'loggroup' => 'SQLBagOStuff' ],
CACHE_ANYTHING => [ 'factory' => 'ObjectCache::newAnything' ],
CACHE_ACCEL => [ 'factory' => 'ObjectCache::getLocalServerInstance' ],
CACHE_MEMCACHED => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
'db-replicated' => [
'class' => ReplicatedBagOStuff::class,
'readFactory' => [
'class' => SqlBagOStuff::class,
'args' => [ [ 'slaveOnly' => true ] ]
],
'writeFactory' => [
'class' => SqlBagOStuff::class,
'args' => [ [ 'slaveOnly' => false ] ]
],
'loggroup' => 'SQLBagOStuff',
'reportDupes' => false
],
'apc' => [ 'class' => APCBagOStuff::class, 'reportDupes' => false ],
'apcu' => [ 'class' => APCUBagOStuff::class, 'reportDupes' => false ],
'wincache' => [ 'class' => WinCacheBagOStuff::class, 'reportDupes' => false ],
'memcached-php' => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
'memcached-pecl' => [ 'class' => MemcachedPeclBagOStuff::class, 'loggroup' => 'memcached' ],
'hash' => [ 'class' => HashBagOStuff::class, 'reportDupes' => false ],
];
/**
* Main Wide-Area-Network cache type. This should be a cache with fast access,
* but it may have limited space. By default, it is disabled, since the basic stock
* cache is not fast enough to make it worthwhile. For single data-center setups, this can
* simply be pointed to a cache in $wgWANObjectCaches that uses a local $wgObjectCaches
* cache with a relayer of type EventRelayerNull.
*
* The options are:
* - false: Configure the cache using $wgMainCacheType, without using
* a relayer (only matters if there are multiple data-centers)
* - CACHE_NONE: Do not cache
* - (other): A string may be used which identifies a cache
* configuration in $wgWANObjectCaches
* @since 1.26
*/
$wgMainWANCache = false;
/**
* Advanced WAN object cache configuration.
*
* Each WAN cache wraps a registered object cache (for the local cluster)
* and it must also be configured to point to a PubSub instance. Subscribers
* must be configured to relay purges to the actual cache servers.
*
* The format is an associative array where the key is a cache identifier, and
* the value is an associative array of parameters. The "cacheId" parameter is
* a cache identifier from $wgObjectCaches. The "loggroup" parameter controls
* where log events are sent.
*
* @since 1.26
*/
$wgWANObjectCaches = [
CACHE_NONE => [
'class' => WANObjectCache::class,
'cacheId' => CACHE_NONE
]
/* Example of a simple single data-center cache:
'memcached-php' => [
'class' => WANObjectCache::class,
'cacheId' => 'memcached-php'
]
*/
];
/**
* Verify and enforce WAN cache purges using reliable DB sources as streams.
*
* These secondary cache purges are de-duplicated via simple cache mutexes.
* This improves consistency when cache purges are lost, which becomes more likely
* as more cache servers are added or if there are multiple datacenters. Only keys
* related to important mutable content will be checked.
*
* @var bool
* @since 1.29
*/
$wgEnableWANCacheReaper = false;
/**
* Main object stash type. This should be a fast storage system for storing
* lightweight data like hit counters and user activity. Sites with multiple
* data-centers should have this use a store that replicates all writes. The
* store should have enough consistency for CAS operations to be usable.
* Reads outside of those needed for merge() may be eventually consistent.
*
* The options are:
* - db: Store cache objects in the DB
* - (other): A string may be used which identifies a cache
* configuration in $wgObjectCaches
*
* @since 1.26
*/
$wgMainStash = 'db-replicated';
/**
* The expiry time for the parser cache, in seconds.
* The default is 86400 (one day).
*/
$wgParserCacheExpireTime = 86400;
/**
* The expiry time to use for session storage, in seconds.
*/
$wgObjectCacheSessionExpiry = 3600;
/**
* Whether to use PHP session handling ($_SESSION and session_*() functions)
*
* If the constant MW_NO_SESSION is defined, this is forced to 'disable'.
*
* If the constant MW_NO_SESSION_HANDLER is defined, this is ignored and PHP
* session handling will function independently of SessionHandler.
* SessionHandler and PHP's session handling may attempt to override each
* others' cookies.
*
* @since 1.27
* @var string
* - 'enable': Integrate with PHP's session handling as much as possible.
* - 'warn': Integrate but log warnings if anything changes $_SESSION.
* - 'disable': Throw exceptions if PHP session handling is used.
*/
$wgPHPSessionHandling = 'enable';
/**
* Number of internal PBKDF2 iterations to use when deriving session secrets.
*
* @since 1.28
*/
$wgSessionPbkdf2Iterations = 10001;
/**
* If enabled, will send MemCached debugging information to $wgDebugLogFile
*/
$wgMemCachedDebug = false;
/**
* The list of MemCached servers and port numbers
*/
$wgMemCachedServers = [ '127.0.0.1:11211' ];
/**
* Use persistent connections to MemCached, which are shared across multiple
* requests.
*/
$wgMemCachedPersistent = false;
/**
* Read/write timeout for MemCached server communication, in microseconds.
*/
$wgMemCachedTimeout = 500000;
/**
* Set this to true to maintain a copy of the message cache on the local server.
*
* This layer of message cache is in addition to the one configured by $wgMessageCacheType.
*
* The local copy is put in APC. If APC is not installed, this setting does nothing.
*
* Note that this is about the message cache, which stores interface messages
* maintained as wiki pages. This is separate from the localisation cache for interface
* messages provided by the software, which is configured by $wgLocalisationCacheConf.
*/
$wgUseLocalMessageCache = false;
/**
* Instead of caching everything, only cache those messages which have
* been customised in the site content language. This means that
* MediaWiki:Foo/ja is ignored if MediaWiki:Foo doesn't exist.
* This option is probably only useful for translatewiki.net.
*/
$wgAdaptiveMessageCache = false;
/**
* Localisation cache configuration.
*
* Used by Language::getLocalisationCache() to decide how to construct the
* LocalisationCache instance. Associative array with keys:
*
* class: The class to use for constructing the LocalisationCache object.
* This may be overridden by extensions to a subclass of LocalisationCache.
* Sub classes are expected to still honor the 'storeClass', 'storeDirectory'
* and 'manualRecache' options where applicable.
*
* storeClass: Which LCStore class implementation to use. This is optional.
* The default LocalisationCache class offers the 'store' option
* as abstraction for this.
*
* store: How and where to store localisation cache data.
* This option is ignored if 'storeClass' is explicitly set to a class name.
* Must be one of:
* - 'detect' (default): Automatically select 'files' if 'storeDirectory'
* or $wgCacheDirectory is set, and fall back to 'db' otherwise.
* - 'files': Store in $wgCacheDirectory as CDB files.
* - 'array': Store in $wgCacheDirectory as PHP static array files.
* - 'db': Store in the l10n_cache database table.
*
* storeDirectory: If the selected LCStore class puts its data in files, then it
* will use this directory. If set to false (default), then
* $wgCacheDirectory is used instead.
*
* manualRecache: Set this to true to disable cache updates on web requests.
* Use maintenance/rebuildLocalisationCache.php instead.
*/
$wgLocalisationCacheConf = [
'class' => LocalisationCache::class,
'store' => 'detect',
'storeClass' => false,
'storeDirectory' => false,
'manualRecache' => false,
];
/**
* Allow client-side caching of pages
*/
$wgCachePages = true;
/**
* Set this to current time to invalidate all prior cached pages. Affects both
* client-side and server-side caching.
* You can get the current date on your server by using the command:
* @verbatim
* date +%Y%m%d%H%M%S
* @endverbatim
*/
$wgCacheEpoch = '20030516000000';
/**
* Directory where GitInfo will look for pre-computed cache files. If false,
* $wgCacheDirectory/gitinfo will be used.
*/
$wgGitInfoCacheDirectory = false;
/**
* This will cache static pages for non-logged-in users to reduce
* database traffic on public sites. ResourceLoader requests to default
* language and skins are cached as well as single module requests.
*/
$wgUseFileCache = false;
/**
* Depth of the subdirectory hierarchy to be created under
* $wgFileCacheDirectory. The subdirectories will be named based on
* the MD5 hash of the title. A value of 0 means all cache files will
* be put directly into the main file cache directory.
*/
$wgFileCacheDepth = 2;
/**
* Append a configured value to the parser cache and the sitenotice key so
* that they can be kept separate for some class of activity.
*/
$wgRenderHashAppend = '';
/**
* If on, the sidebar navigation links are cached for users with the
* current language set. This can save a touch of load on a busy site
* by shaving off extra message lookups.
*
* However it is also fragile: changing the site configuration, or
* having a variable $wgArticlePath, can produce broken links that
* don't update as expected.
*/
$wgEnableSidebarCache = false;
/**
* Expiry time for the sidebar cache, in seconds
*/
$wgSidebarCacheExpiry = 86400;
/**
* When using the file cache, we can store the cached HTML gzipped to save disk
* space. Pages will then also be served compressed to clients that support it.
*
* Requires zlib support enabled in PHP.
*/
$wgUseGzip = false;
/**
* Invalidate various caches when LocalSettings.php changes. This is equivalent
* to setting $wgCacheEpoch to the modification time of LocalSettings.php, as
* was previously done in the default LocalSettings.php file.
*
* On high-traffic wikis, this should be set to false, to avoid the need to
* check the file modification time, and to avoid the performance impact of
* unnecessary cache invalidations.
*/
$wgInvalidateCacheOnLocalSettingsChange = true;
/**
* When loading extensions through the extension registration system, this
* can be used to invalidate the cache. A good idea would be to set this to
* one file, you can just `touch` that one to invalidate the cache
*
* @par Example:
* @code
* $wgExtensionInfoMtime = filemtime( "$IP/LocalSettings.php" );
* @endcode
*
* If set to false, the mtime for each individual JSON file will be checked,
* which can be slow if a large number of extensions are being loaded.
*
* @var int|bool
*/
$wgExtensionInfoMTime = false;
/** @} */ # end of cache settings
/************************************************************************//**
* @name HTTP proxy (CDN) settings
*
* Many of these settings apply to any HTTP proxy used in front of MediaWiki,
* although they are sometimes still referred to as Squid settings for
* historical reasons.
*
* Achieving a high hit ratio with an HTTP proxy requires special
* configuration. See https://www.mediawiki.org/wiki/Manual:Squid_caching for
* more details.
*
* @{
*/
/**
* Enable/disable CDN.
* See https://www.mediawiki.org/wiki/Manual:Squid_caching
*
* @since 1.34 Renamed from $wgUseSquid.
*/
$wgUseCdn = false;
/**
* If you run Squid3 with ESI support, enable this (default:false):
* @deprecated in 1.33. This was a now-defunct experimental feature.
*/
$wgUseESI = false;
/**
* Send the Key HTTP header for better caching.
* See https://datatracker.ietf.org/doc/draft-ietf-httpbis-key/ for details.
* @since 1.27
* @deprecated in 1.32, the IETF spec expired without becoming a standard.
*/
$wgUseKeyHeader = false;
/**
* Add X-Forwarded-Proto to the Vary and Key headers for API requests and
* RSS/Atom feeds. Use this if you have an SSL termination setup
* and need to split the cache between HTTP and HTTPS for API requests,
* feed requests and HTTP redirect responses in order to prevent cache
* pollution. This does not affect 'normal' requests to index.php other than
* HTTP redirects.
*/
$wgVaryOnXFP = false;
/**
* Internal server name as known to CDN, if different.
*
* @par Example:
* @code
* $wgInternalServer = 'http://yourinternal.tld:8000';
* @endcode
*/
$wgInternalServer = false;
/**
* Cache TTL for the CDN sent as s-maxage (without ESI) or
* Surrogate-Control (with ESI). Without ESI, you should strip
* out s-maxage in the CDN config.
*
* 18000 seconds = 5 hours, more cache hits with 2678400 = 31 days.
*
* @since 1.34 Renamed from $wgSquidMaxage
*/
$wgCdnMaxAge = 18000;
/**
* Cache timeout for the CDN when DB replica DB lag is high
* @see $wgCdnMaxAge
*
* @since 1.27
*/
$wgCdnMaxageLagged = 30;
/**
* If set, any SquidPurge call on a URL or URLs will send a second purge no less than
* this many seconds later via the job queue. This requires delayed job support.
* This should be safely higher than the 'max lag' value in $wgLBFactoryConf, so that
* replica DB lag does not cause page to be stuck in stales states in CDN.
*
* This also fixes race conditions in two-tiered CDN setups (e.g. cdn2 => cdn1 => MediaWiki).
* If a purge for a URL reaches cdn2 before cdn1 and a request reaches cdn2 for that URL,
* it will populate the response from the stale cdn1 value. When cdn1 gets the purge, cdn2
* will still be stale. If the rebound purge delay is safely higher than the time to relay
* a purge to all nodes, then the rebound purge will clear cdn2 after cdn1 was cleared.
*
* @since 1.27
*/
$wgCdnReboundPurgeDelay = 0;
/**
* Cache timeout for the CDN when a response is known to be wrong or incomplete (due to load)
* @see $wgCdnMaxAge
* @since 1.27
*/
$wgCdnMaxageSubstitute = 60;
/**
* Default maximum age for raw CSS/JS accesses
*
* 300 seconds = 5 minutes.
*/
$wgForcedRawSMaxage = 300;
/**
* List of proxy servers to purge on changes; default port is 80. Use IP addresses.
*
* When MediaWiki is running behind a proxy, it will trust X-Forwarded-For
* headers sent/modified from these proxies when obtaining the remote IP address
*
* For a list of trusted servers which *aren't* purged, see $wgSquidServersNoPurge.
*
* @since 1.34 Renamed from $wgSquidServers.
*/
$wgCdnServers = [];
/**
* As with $wgCdnServers, except these servers aren't purged on page changes;
* use to set a list of trusted proxies, etc. Supports both individual IP
* addresses and CIDR blocks.
*
* @since 1.23 Supports CIDR ranges
* @since 1.34 Renamed from $wgSquidServersNoPurge
*/
$wgCdnServersNoPurge = [];
/**
* Whether to use a Host header in purge requests sent to the proxy servers
* configured in $wgCdnServers. Set this to false to support a CDN
* configured in forward-proxy mode.
*
* If this is set to true, a Host header will be sent, and only the path
* component of the URL will appear on the request line, as if the request
* were a non-proxy HTTP 1.1 request. Varnish only supports this style of
* request. Squid supports this style of request only if reverse-proxy mode
* (http_port ... accel) is enabled.
*
* If this is set to false, no Host header will be sent, and the absolute URL
* will be sent in the request line, as is the standard for an HTTP proxy
* request in both HTTP 1.0 and 1.1. This style of request is not supported
* by Varnish, but is supported by Squid in either configuration (forward or
* reverse).
*
* @since 1.21
* @deprecated since 1.33, will always be true in a future release.
*/
$wgSquidPurgeUseHostHeader = true;
/**
* Routing configuration for HTCP multicast purging. Add elements here to
* enable HTCP and determine which purges are sent where. If set to an empty
* array, HTCP is disabled.
*
* Each key in this array is a regular expression to match against the purged
* URL, or an empty string to match all URLs. The purged URL is matched against
* the regexes in the order specified, and the first rule whose regex matches
* is used, all remaining rules will thus be ignored.
*
* @par Example configuration to send purges for upload.wikimedia.org to one
* multicast group and all other purges to another:
* @code
* $wgHTCPRouting = [
* '|^https?://upload\.wikimedia\.org|' => [
* 'host' => '239.128.0.113',
* 'port' => 4827,
* ],
* '' => [
* 'host' => '239.128.0.112',
* 'port' => 4827,
* ],
* ];
* @endcode
*
* You can also pass an array of hosts to send purges too. This is useful when
* you have several multicast groups or unicast address that should receive a
* given purge. Multiple hosts support was introduced in MediaWiki 1.22.
*
* @par Example of sending purges to multiple hosts:
* @code
* $wgHTCPRouting = [
* '' => [
* // Purges to text caches using multicast
* [ 'host' => '239.128.0.114', 'port' => '4827' ],
* // Purges to a hardcoded list of caches
* [ 'host' => '10.88.66.1', 'port' => '4827' ],
* [ 'host' => '10.88.66.2', 'port' => '4827' ],
* [ 'host' => '10.88.66.3', 'port' => '4827' ],
* ],
* ];
* @endcode
*
* @since 1.22
* @see $wgHTCPMulticastTTL
*/
$wgHTCPRouting = [];
/**
* HTCP multicast TTL.
* @see $wgHTCPRouting
*/
$wgHTCPMulticastTTL = 1;
/**
* Should forwarded Private IPs be accepted?
*/
$wgUsePrivateIPs = false;
/** @} */ # end of HTTP proxy settings
/************************************************************************//**
* @name Language, regional and character encoding settings
* @{
*/
/**
* Site language code. See languages/data/Names.php for languages supported by
* MediaWiki out of the box. Not all languages listed there have translations,
* see languages/messages/ for the list of languages with some localisation.
*
* Warning: Don't use any of MediaWiki's deprecated language codes listed in
* LanguageCode::getDeprecatedCodeMapping or $wgDummyLanguageCodes, like "no"
* for Norwegian (use "nb" instead). If you do, things will break unexpectedly.
*
* This defines the default interface language for all users, but users can
* change it in their preferences.
*
* This also defines the language of pages in the wiki. The content is wrapped
* in a html element with lang=XX attribute. This behavior can be overridden
* via hooks, see Title::getPageLanguage.
*/
$wgLanguageCode = 'en';
/**
* Language cache size, or really how many languages can we handle
* simultaneously without degrading to crawl speed.
*/
$wgLangObjCacheSize = 10;
/**
* Some languages need different word forms, usually for different cases.
* Used in Language::convertGrammar().
*
* @par Example:
* @code
* $wgGrammarForms['en']['genitive']['car'] = 'car\'s';
* @endcode
*/
$wgGrammarForms = [];
/**
* Treat language links as magic connectors, not inline links
*/
$wgInterwikiMagic = true;
/**
* Hide interlanguage links from the sidebar
*/
$wgHideInterlanguageLinks = false;
/**
* List of additional interwiki prefixes that should be treated as
* interlanguage links (i.e. placed in the sidebar).
* Notes:
* - This will not do anything unless the prefixes are defined in the interwiki
* map.
* - The display text for these custom interlanguage links will be fetched from
* the system message "interlanguage-link-xyz" where xyz is the prefix in
* this array.
* - A friendly name for each site, used for tooltip text, may optionally be
* placed in the system message "interlanguage-link-sitename-xyz" where xyz is
* the prefix in this array.
*/
$wgExtraInterlanguageLinkPrefixes = [];
/**
* List of language names or overrides for default names in Names.php
*/
$wgExtraLanguageNames = [];
/**
* List of mappings from one language code to another.
* This array makes the codes not appear as a selectable language on the
* installer, and excludes them when running the transstat.php script.
*
* In Setup.php, the variable $wgDummyLanguageCodes is created by combining
* these codes with a list of "deprecated" codes, which are mostly leftovers
* from renames or other legacy things, and the internal codes 'qqq' and 'qqx'.
* If a mapping in $wgExtraLanguageCodes collide with a built-in mapping, the
* value in $wgExtraLanguageCodes will be used.
*
* @since 1.29
*/
$wgExtraLanguageCodes = [
// Language codes of macro languages, which get mapped to the main language
'bh' => 'bho', // Bihari language family
'no' => 'nb', // Norwegian language family
// Language variants which get mapped to the main language
'simple' => 'en', // Simple English
];
/**
* Functionally the same as $wgExtraLanguageCodes, but deprecated. Instead of
* appending values to this array, append them to $wgExtraLanguageCodes.
*
* @deprecated since 1.29
*/
$wgDummyLanguageCodes = [];
/**
* Set this to true to replace Arabic presentation forms with their standard
* forms in the U+0600-U+06FF block. This only works if $wgLanguageCode is
* set to "ar".
*
* Note that pages with titles containing presentation forms will become
* inaccessible, run maintenance/cleanupTitles.php to fix this.
*
* @deprecated since 1.33: in the future will always be true.
*/
$wgFixArabicUnicode = true;
/**
* Set this to true to replace ZWJ-based chillu sequences in Malayalam text
* with their Unicode 5.1 equivalents. This only works if $wgLanguageCode is
* set to "ml". Note that some clients (even new clients as of 2010) do not
* support these characters.
*
* If you enable this on an existing wiki, run maintenance/cleanupTitles.php to
* fix any ZWJ sequences in existing page titles.
*
* @deprecated since 1.33: in the future will always be true.
*/
$wgFixMalayalamUnicode = true;
/**
* Set this to always convert certain Unicode sequences to modern ones
* regardless of the content language. This has a small performance
* impact.
*
* See $wgFixArabicUnicode and $wgFixMalayalamUnicode for conversion
* details.
*
* @since 1.17
*/
$wgAllUnicodeFixes = false;
/**
* Set this to eg 'ISO-8859-1' to perform character set conversion when
* loading old revisions not marked with "utf-8" flag. Use this when
* converting a wiki from MediaWiki 1.4 or earlier to UTF-8 without the
* burdensome mass conversion of old text data.
*
* @note This DOES NOT touch any fields other than old_text. Titles, comments,
* user names, etc still must be converted en masse in the database before
* continuing as a UTF-8 wiki.
*/
$wgLegacyEncoding = false;
/**
* If set to true, the MediaWiki 1.4 to 1.5 schema conversion will
* create stub reference rows in the text table instead of copying
* the full text of all current entries from 'cur' to 'text'.
*
* This will speed up the conversion step for large sites, but
* requires that the cur table be kept around for those revisions
* to remain viewable.
*
* This option affects the updaters *only*. Any present cur stub
* revisions will be readable at runtime regardless of this setting.
*/
$wgLegacySchemaConversion = false;
/**
* Enable dates like 'May 12' instead of '12 May', if the default date format
* is 'dmy or mdy'.
*/
$wgAmericanDates = false;
/**
* For Hindi and Arabic use local numerals instead of Western style (0-9)
* numerals in interface.
*/
$wgTranslateNumerals = true;
/**
* Translation using MediaWiki: namespace.
* Interface messages will be loaded from the database.
*/
$wgUseDatabaseMessages = true;
/**
* Expiry time for the message cache key
*/
$wgMsgCacheExpiry = 86400;
/**
* Maximum entry size in the message cache, in bytes
*/
$wgMaxMsgCacheEntrySize = 10000;
/**
* Whether to enable language variant conversion.
*/
$wgDisableLangConversion = false;
/**
* Whether to enable language variant conversion for links.
*/
$wgDisableTitleConversion = false;
/**
* Default variant code, if false, the default will be the language code
*/
$wgDefaultLanguageVariant = false;
/**
* Whether to enable the pig Latin variant of English (en-x-piglatin),
* used to ease variant development work.
*/
$wgUsePigLatinVariant = false;
/**
* Disabled variants array of language variant conversion.
*
* @par Example:
* @code
* $wgDisabledVariants[] = 'zh-mo';
* $wgDisabledVariants[] = 'zh-my';
* @endcode
*/
$wgDisabledVariants = [];
/**
* Like $wgArticlePath, but on multi-variant wikis, this provides a
* path format that describes which parts of the URL contain the
* language variant.
*
* @par Example:
* @code
* $wgLanguageCode = 'sr';
* $wgVariantArticlePath = '/$2/$1';
* $wgArticlePath = '/wiki/$1';
* @endcode
*
* A link to /wiki/ would be redirected to /sr/Главна_страна
*
* It is important that $wgArticlePath not overlap with possible values
* of $wgVariantArticlePath.
*/
$wgVariantArticlePath = false;
/**
* Show a bar of language selection links in the user login and user
* registration forms; edit the "loginlanguagelinks" message to
* customise these.
*/
$wgLoginLanguageSelector = false;
/**
* When translating messages with wfMessage(), it is not always clear what
* should be considered UI messages and what should be content messages.
*
* For example, for the English Wikipedia, there should be only one 'mainpage',
* so when getting the link for 'mainpage', we should treat it as site content
* and call ->inContentLanguage()->text(), but for rendering the text of the
* link, we call ->text(). The code behaves this way by default. However,
* sites like the Wikimedia Commons do offer different versions of 'mainpage'
* and the like for different languages. This array provides a way to override
* the default behavior.
*
* @par Example:
* To allow language-specific main page and community
* portal:
* @code
* $wgForceUIMsgAsContentMsg = [ 'mainpage', 'portal-url' ];
* @endcode
*/
$wgForceUIMsgAsContentMsg = [];
/**
* Fake out the timezone that the server thinks it's in. This will be used for
* date display and not for what's stored in the DB. Leave to null to retain
* your server's OS-based timezone value.
*
* This variable is currently used only for signature formatting and for local
* time/date parser variables ({{LOCALTIME}} etc.)
*
* Timezones can be translated by editing MediaWiki messages of type
* timezone-nameinlowercase like timezone-utc.
*
* A list of usable timezones can found at:
* https://www.php.net/manual/en/timezones.php
*
* @par Examples:
* @code
* $wgLocaltimezone = 'UTC';
* $wgLocaltimezone = 'GMT';
* $wgLocaltimezone = 'PST8PDT';
* $wgLocaltimezone = 'Europe/Sweden';
* $wgLocaltimezone = 'CET';
* @endcode
*/
$wgLocaltimezone = null;
/**
* Set an offset from UTC in minutes to use for the default timezone setting
* for anonymous users and new user accounts.
*
* This setting is used for most date/time displays in the software, and is
* overridable in user preferences. It is *not* used for signature timestamps.
*
* By default, this will be set to match $wgLocaltimezone.
*/
$wgLocalTZoffset = null;
/**
* List of Unicode characters for which capitalization is overridden in
* Language::ucfirst. The characters should be
* represented as char_to_convert => conversion_override. See T219279 for details
* on why this is useful during php version transitions.
*
* @warning: EXPERIMENTAL!
*
* @since 1.34
* @var array
*/
$wgOverrideUcfirstCharacters = [];
/** @} */ # End of language/charset settings
/*************************************************************************//**
* @name Output format and skin settings
* @{
*/
/**
* The default Content-Type header.
*/
$wgMimeType = 'text/html';
/**
* Previously used as content type in HTML script tags. This is now ignored since
* HTML5 doesn't require a MIME type for script tags (javascript is the default).
* It was also previously used by RawAction to determine the ctype query parameter
* value that will result in a javascript response.
* @deprecated since 1.22
*/
$wgJsMimeType = null;
/**
* The default xmlns attribute. The option to define this has been removed.
* The value of this variable is no longer used by core and is set to a fixed
* value in Setup.php for compatibility with extensions that depend on the value
* of this variable being set. Such a dependency however is deprecated.
* @deprecated since 1.22
*/
$wgXhtmlDefaultNamespace = null;
/**
* Previously used to determine if we should output an HTML5 doctype.
* This is no longer used as we always output HTML5 now. For compatibility with
* extensions that still check the value of this config it's value is now forced
* to true by Setup.php.
* @deprecated since 1.22
*/
$wgHtml5 = true;
/**
* Defines the value of the version attribute in the &lt;html&gt; tag, if any.
*
* If your wiki uses RDFa, set it to the correct value for RDFa+HTML5.
* Correct current values are 'HTML+RDFa 1.0' or 'XHTML+RDFa 1.0'.
* See also https://www.w3.org/TR/rdfa-in-html/#document-conformance
* @since 1.16
*/
$wgHtml5Version = null;
/**
* Temporary variable that allows HTMLForms to be rendered as tables.
* Table based layouts cause various issues when designing for mobile.
* This global allows skins or extensions a means to force non-table based rendering.
* Setting to false forces form components to always render as div elements.
* @since 1.24
*/
$wgHTMLFormAllowTableFormat = true;
/**
* Temporary variable that applies MediaWiki UI wherever it can be supported.
* Temporary variable that should be removed when mediawiki ui is more
* stable and change has been communicated.
* @since 1.24
*/
$wgUseMediaWikiUIEverywhere = false;
/**
* Whether to label the store-to-database-and-show-to-others button in the editor
* as "Save page"/"Save changes" if false (the default) or, if true, instead as
* "Publish page"/"Publish changes".
*
* @since 1.28
*/
$wgEditSubmitButtonLabelPublish = false;
/**
* Permit other namespaces in addition to the w3.org default.
*
* Use the prefix for the key and the namespace for the value.
*
* @par Example:
* @code
* $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg';
* @endcode
* Normally we wouldn't have to define this in the root "<html>"
* element, but IE needs it there in some circumstances.
*
* This is ignored if $wgMimeType is set to a non-XML MIME type.
*/
$wgXhtmlNamespaces = [];
/**
* Site notice shown at the top of each page
*
* MediaWiki:Sitenotice page, which will override this. You can also
* provide a separate message for logged-out users using the
* MediaWiki:Anonnotice page.
*/
$wgSiteNotice = '';
/**
* Default skin, for new users and anonymous visitors. Registered users may
* change this to any one of the other available skins in their preferences.
*/
$wgDefaultSkin = 'vector';
/**
* Fallback skin used when the skin defined by $wgDefaultSkin can't be found.
*
* @since 1.24
*/
$wgFallbackSkin = 'fallback';
/**
* Specify the names of skins that should not be presented in the list of
* available skins in user preferences. If you want to remove a skin entirely,
* remove it from the skins/ directory and its entry from LocalSettings.php.
*/
$wgSkipSkins = [];
/**
* @deprecated since 1.23; use $wgSkipSkins instead
*/
$wgSkipSkin = '';
/**
* Allow user Javascript page?
* This enables a lot of neat customizations, but may
* increase security risk to users and server load.
*/
$wgAllowUserJs = false;
/**
* Allow user Cascading Style Sheets (CSS)?
* This enables a lot of neat customizations, but may
* increase security risk to users and server load.
*/
$wgAllowUserCss = false;
/**
* Allow style-related user-preferences?
*
* This controls whether the `editfont` and `underline` preferences
* are available to users.
*/
$wgAllowUserCssPrefs = true;
/**
* Use the site's Javascript page?
*/
$wgUseSiteJs = true;
/**
* Use the site's Cascading Style Sheets (CSS)?
*/
$wgUseSiteCss = true;
/**
* Break out of framesets. This can be used to prevent clickjacking attacks,
* or to prevent external sites from framing your site with ads.
*/
$wgBreakFrames = false;
/**
* The X-Frame-Options header to send on pages sensitive to clickjacking
* attacks, such as edit pages. This prevents those pages from being displayed
* in a frame or iframe. The options are:
*
* - 'DENY': Do not allow framing. This is recommended for most wikis.
*
* - 'SAMEORIGIN': Allow framing by pages on the same domain. This can be used
* to allow framing within a trusted domain. This is insecure if there
* is a page on the same domain which allows framing of arbitrary URLs.
*
* - false: Allow all framing. This opens up the wiki to XSS attacks and thus
* full compromise of local user accounts. Private wikis behind a
* corporate firewall are especially vulnerable. This is not
* recommended.
*
* For extra safety, set $wgBreakFrames = true, to prevent framing on all pages,
* not just edit pages.
*/
$wgEditPageFrameOptions = 'DENY';
/**
* Disallow framing of API pages directly, by setting the X-Frame-Options
* header. Since the API returns CSRF tokens, allowing the results to be
* framed can compromise your user's account security.
* Options are:
* - 'DENY': Do not allow framing. This is recommended for most wikis.