Update mediawiki/mediawiki-codesniffer to 0.7.1
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index ae2aeaa..b7f487e 100644 (file)
@@ -75,7 +75,7 @@ $wgConfigRegistry = [
  * MediaWiki version number
  * @since 1.2
  */
-$wgVersion = '1.27.0-alpha';
+$wgVersion = '1.28.0-alpha';
 
 /**
  * Name of the site. It must be changed in LocalSettings.php
@@ -980,6 +980,27 @@ $wgCustomConvertCommand = false;
  */
 $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';
+
 /**
  * Some tests and extensions use exiv2 to manipulate the Exif metadata in some
  * image formats.
@@ -2169,7 +2190,7 @@ $wgLanguageConverterCacheType = CACHE_ANYTHING;
  * given, giving a callable function which will generate a suitable cache object.
  */
 $wgObjectCaches = [
-       CACHE_NONE => [ 'class' => 'EmptyBagOStuff' ],
+       CACHE_NONE => [ 'class' => 'EmptyBagOStuff', 'reportDupes' => false ],
        CACHE_DB => [ 'class' => 'SqlBagOStuff', 'loggroup' => 'SQLBagOStuff' ],
 
        CACHE_ANYTHING => [ 'factory' => 'ObjectCache::newAnything' ],
@@ -2189,12 +2210,12 @@ $wgObjectCaches = [
                'loggroup'  => 'SQLBagOStuff'
        ],
 
-       'apc' => [ 'class' => 'APCBagOStuff' ],
-       'xcache' => [ 'class' => 'XCacheBagOStuff' ],
-       'wincache' => [ 'class' => 'WinCacheBagOStuff' ],
+       'apc' => [ 'class' => 'APCBagOStuff', 'reportDupes' => false ],
+       'xcache' => [ 'class' => 'XCacheBagOStuff', 'reportDupes' => false ],
+       'wincache' => [ 'class' => 'WinCacheBagOStuff', 'reportDupes' => false ],
        'memcached-php' => [ 'class' => 'MemcachedPhpBagOStuff', 'loggroup' => 'memcached' ],
        'memcached-pecl' => [ 'class' => 'MemcachedPeclBagOStuff', 'loggroup' => 'memcached' ],
-       'hash' => [ 'class' => 'HashBagOStuff' ],
+       'hash' => [ 'class' => 'HashBagOStuff', 'reportDupes' => false ],
 ];
 
 /**
@@ -2223,27 +2244,24 @@ $wgMainWANCache = false;
  *
  * 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 "relayerConfig" parameter is an
- * array used to construct an EventRelayer object. The "pool" parameter is a
- * string that is used as a PubSub channel prefix. The "loggroup" parameter
- * controls where log events are sent.
+ * a cache identifier from $wgObjectCaches. The "channels" parameter is a map of
+ * actions ('purge') to PubSub channels defined in $wgEventRelayerConfig.
+ * The "loggroup" parameter controls where log events are sent.
  *
  * @since 1.26
  */
 $wgWANObjectCaches = [
        CACHE_NONE => [
-               'class'         => 'WANObjectCache',
-               'cacheId'       => CACHE_NONE,
-               'pool'          => 'mediawiki-main-none',
-               'relayerConfig' => [ 'class' => 'EventRelayerNull' ]
+               'class'    => 'WANObjectCache',
+               'cacheId'  => CACHE_NONE,
+               'channels' => []
        ]
        /* Example of a simple single data-center cache:
-       'memcached-php' => array(
-               'class'         => 'WANObjectCache',
-               'cacheId'       => 'memcached-php',
-               'pool'          => 'mediawiki-main-memcached',
-               'relayerConfig' => array( 'class' => 'EventRelayerNull' )
-       )
+       'memcached-php' => [
+               'class'    => 'WANObjectCache',
+               'cacheId'  => 'memcached-php',
+               'channels' => [ 'purge' => 'wancache-main-memcached-purge' ]
+       ]
        */
 ];
 
@@ -2589,6 +2607,13 @@ $wgCdnMaxageLagged = 30;
  */
 $wgCdnReboundPurgeDelay = 0;
 
+/**
+ * Cache timeout for the CDN when a response is known to be wrong or incomplete (due to load)
+ * @see $wgSquidMaxage
+ * @since 1.27
+ */
+$wgCdnMaxageSubstitute = 60;
+
 /**
  * Default maximum age for raw CSS/JS accesses
  *
@@ -4562,6 +4587,7 @@ $wgDefaultUserOptions = [
        'watchcreations' => 1,
        'watchdefault' => 1,
        'watchdeletion' => 0,
+       'watchuploads' => 1,
        'watchlistdays' => 3.0,
        'watchlisthideanons' => 0,
        'watchlisthidebots' => 0,
@@ -5895,7 +5921,7 @@ $wgStatsdServer = false;
 /**
  * Prefix for metric names sent to $wgStatsdServer.
  *
- * @see RequestContext::getStats
+ * @see MediaWikiServices::getStatsdDataFactory
  * @see BufferingStatsdDataFactory
  * @since 1.25
  */
@@ -7265,7 +7291,7 @@ $wgActionFilteredLogs = [
        ],
        'newusers' => [
                'create' => [ 'create', 'newusers' ],
-               'create2' => ['create2' ],
+               'create2' => [ 'create2' ],
                'autocreate' => [ 'autocreate' ],
                'byemail' => [ 'byemail' ],
        ],
@@ -7277,7 +7303,7 @@ $wgActionFilteredLogs = [
                'protect' => [ 'protect' ],
                'modify' => [ 'modify' ],
                'unprotect' => [ 'unprotect' ],
-               'move_prot' => ['move_prot'],
+               'move_prot' => [ 'move_prot' ],
        ],
        'rights' => [
                'rights' => [ 'rights' ],
@@ -7807,9 +7833,9 @@ $wgUpdateRowsPerQuery = 100;
 
 /**
  * Name of the external diff engine to use. Supported values:
- * * false: default PHP implementation, DairikiDiff
+ * * false: default PHP implementation
  * * 'wikidiff2': Wikimedia's fast difference engine implemented as a PHP/HHVM module
- * * 'wikidiff3': newer PHP-based difference engine
+ * * 'wikidiff' and 'wikidiff3' are treated as false for backwards compatibility
  * * any other string is treated as a path to external diff executable
  */
 $wgExternalDiffEngine = false;
@@ -7964,6 +7990,23 @@ $wgPagePropsHaveSortkey = true;
  */
 $wgHttpsPort = 443;
 
+/**
+ * Secret for session storage.
+ * This should be set in LocalSettings.php, otherwise wgSecretKey will
+ * be used.
+ * @since 1.27
+ */
+$wgSessionSecret = false;
+
+/**
+ * If for some reason you can't install the PHP OpenSSL or mcrypt extensions,
+ * you can set this to true to make MediaWiki work again at the cost of storing
+ * sensitive session data insecurely. But it would be much more secure to just
+ * install the OpenSSL extension.
+ * @since 1.27
+ */
+$wgSessionInsecureSecrets = false;
+
 /**
  * Secret for hmac-based key derivation function (fast,
  * cryptographically secure random numbers).
@@ -8052,7 +8095,7 @@ $wgPopularPasswordFile = __DIR__ . '/../serialized/commonpasswords.cdb';
 $wgMaxUserDBWriteDuration = false;
 
 /**
- * Mapping of event channels to EventRelayer configuration.
+ * Mapping of event channels (or channel categories) to EventRelayer configuration.
  *
  * By setting up a PubSub system (like Kafka) and enabling a corresponding EventRelayer class
  * that uses it, MediaWiki can broadcast events to all subscribers. Certain features like WAN
@@ -8060,7 +8103,13 @@ $wgMaxUserDBWriteDuration = false;
  * subscribe to the channel and take actions based on the events. For example, a local daemon
  * can run on each CDN cache node and perfom local purges based on the URL purge channel events.
  *
- * The 'default' channel is for all channels without an explicit entry here.
+ * Some extensions may want to use "channel categories" so that different channels can also share
+ * the same custom relayer instance (e.g. when it's likely to be overriden). They can use
+ * EventRelayerGroup::getRelayer() based on the category but call notify() on various different
+ * actual channels. One reason for this would be that some system have very different performance
+ * vs durability needs, so one system (e.g. Kafka) may not be suitable for all uses.
+ *
+ * The 'default' key is for all channels (or channel categories) without an explicit entry here.
  *
  * @since 1.27
  */