Merge "Update default hash storage settings"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 10 May 2016 22:29:43 +0000 (22:29 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 10 May 2016 22:29:43 +0000 (22:29 +0000)
1  2 
includes/DefaultSettings.php

@@@ -75,7 -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
@@@ -585,9 -585,10 +585,9 @@@ $wgLockManagers = []
   * Requires PHP's Exif extension: http://www.php.net/manual/en/ref.exif.php
   *
   * @note FOR WINDOWS USERS:
 - * To enable Exif functions, add the following lines to the "Windows
 + * To enable Exif functions, add the following line to the "Windows
   * extensions" section of php.ini:
   * @code{.ini}
 - * extension=extensions/php_mbstring.dll
   * extension=extensions/php_exif.dll
   * @endcode
   */
@@@ -980,27 -981,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.
@@@ -2190,7 -2170,7 +2190,7 @@@ $wgLanguageConverterCacheType = CACHE_A
   * 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' ],
                '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 ],
  ];
  
  /**
@@@ -2244,24 -2224,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' ]
 +      ]
        */
  ];
  
@@@ -2305,7 -2288,7 +2305,7 @@@ $wgSessionsInObjectCache = true
  $wgObjectCacheSessionExpiry = 3600;
  
  /**
 - * @deprecated since 1.27, MediaWiki\\Session\\SessionManager doesn't use PHP session storage.
 + * @deprecated since 1.27, MediaWiki\Session\SessionManager doesn't use PHP session storage.
   */
  $wgSessionHandler = null;
  
@@@ -2607,13 -2590,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
   *
@@@ -3105,11 -3081,10 +3105,11 @@@ $wgHtml5 = true
  
  /**
   * Defines the value of the version attribute in the &lt;html&gt; tag, if any.
 - * If $wgAllowRdfaAttributes is true, and this evaluates to boolean false
 - * (like if it's left at the default null value), it will be auto-initialized
 - * to the correct value for RDFa+HTML5.  As such, you should have no reason to
 - * ever actually set this to anything.
 + *
 + * 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 http://www.w3.org/TR/rdfa-in-html/#document-conformance
 + * @since 1.16
   */
  $wgHtml5Version = null;
  
@@@ -3130,6 -3105,17 +3130,6 @@@ $wgHTMLFormAllowTableFormat = true
   */
  $wgUseMediaWikiUIEverywhere = false;
  
 -/**
 - * Enabled RDFa attributes for use in wikitext.
 - * NOTE: Interaction with HTML5 is somewhat underspecified.
 - */
 -$wgAllowRdfaAttributes = false;
 -
 -/**
 - * Enabled HTML5 microdata attributes for use in wikitext.
 - */
 -$wgAllowMicrodataAttributes = false;
 -
  /**
   * Should we try to make our HTML output well-formed XML?  If set to false,
   * output will be a few bytes shorter, and the HTML will arguably be more
@@@ -3586,7 -3572,25 +3586,7 @@@ $wgResourceLoaderMinifierMaxLineLength 
   *
   * @deprecated since 1.26: Always declare dependencies.
   */
 -$wgIncludeLegacyJavaScript = true;
 -
 -/**
 - * Whether to ensure the mediawiki.util is loaded before other modules.
 - *
 - * Before MediaWiki 1.19, modules used to load less asynchronous which allowed
 - * modules to lack dependencies on 'popular' modules that were likely loaded already.
 - *
 - * This setting is to aid scripts during migration by providing mediawiki.util
 - * unconditionally (which was the most commonly missed dependency). It doesn't
 - * cover all missing dependencies obviously but should fix most of them.
 - *
 - * This should be removed at some point after site/user scripts have been fixed.
 - * Enable this if your wiki has a large amount of user/site scripts that are
 - * lacking dependencies.
 - *
 - * @deprecated since 1.26: Always declare dependencies.
 - */
 -$wgPreloadJavaScriptMwUtil = false;
 +$wgIncludeLegacyJavaScript = false;
  
  /**
   * Whether or not to assign configuration variables to the global window object.
@@@ -4492,9 -4496,9 +4492,9 @@@ $wgPasswordConfig = 
        ],
        'pbkdf2' => [
                'class' => 'Pbkdf2Password',
-               'algo' => 'sha256',
-               'cost' => '10000',
-               'length' => '128',
+               'algo' => 'sha512',
+               'cost' => '30000',
+               'length' => '64',
        ],
  ];
  
@@@ -4587,7 -4591,6 +4587,7 @@@ $wgDefaultUserOptions = 
        'watchcreations' => 1,
        'watchdefault' => 1,
        'watchdeletion' => 0,
 +      'watchuploads' => 1,
        'watchlistdays' => 3.0,
        'watchlisthideanons' => 0,
        'watchlisthidebots' => 0,
@@@ -4656,15 -4659,15 +4656,15 @@@ $wgAuthenticationTokenVersion = null
   * @since 1.27
   */
  $wgSessionProviders = [
 -      'MediaWiki\\Session\\CookieSessionProvider' => [
 -              'class' => 'MediaWiki\\Session\\CookieSessionProvider',
 +      MediaWiki\Session\CookieSessionProvider::class => [
 +              'class' => MediaWiki\Session\CookieSessionProvider::class,
                'args' => [ [
                        'priority' => 30,
                        'callUserSetCookiesHook' => true,
                ] ],
        ],
 -      'MediaWiki\\Session\\BotPasswordSessionProvider' => [
 -              'class' => 'MediaWiki\\Session\\BotPasswordSessionProvider',
 +      MediaWiki\Session\BotPasswordSessionProvider::class => [
 +              'class' => MediaWiki\Session\BotPasswordSessionProvider::class,
                'args' => [ [
                        'priority' => 40,
                ] ],
@@@ -5921,7 -5924,7 +5921,7 @@@ $wgStatsdServer = false
  /**
   * Prefix for metric names sent to $wgStatsdServer.
   *
 - * @see RequestContext::getStats
 + * @see MediaWikiServices::getStatsdDataFactory
   * @see BufferingStatsdDataFactory
   * @since 1.25
   */
@@@ -5970,7 -5973,7 +5970,7 @@@ $wgCachePrefix = false
  /**
   * Display the new debugging toolbar. This also enables profiling on database
   * queries and other useful output.
 - * Will disable file cache.
 + * Will be ignored if $wgUseFileCache or $wgUseSquid is enabled.
   *
   * @since 1.19
   */
@@@ -6235,15 -6238,14 +6235,15 @@@ $wgGitBin = '/usr/bin/git'
   * %h will be replaced by the short SHA-1 (7 first chars) and %H by the
   * full SHA-1 of the HEAD revision.
   * %r will be replaced with a URL-encoded version of $1.
 + * %R will be replaced with $1 and no URL-encoding
   *
   * @since 1.20
   */
  $wgGitRepositoryViewers = [
        'https://(?:[a-z0-9_]+@)?gerrit.wikimedia.org/r/(?:p/)?(.*)' =>
 -              'https://git.wikimedia.org/tree/%r/%H',
 +              'https://phabricator.wikimedia.org/r/revision/%R;%H',
        'ssh://(?:[a-z0-9_]+@)?gerrit.wikimedia.org:29418/(.*)' =>
 -              'https://git.wikimedia.org/tree/%r/%H',
 +              'https://phabricator.wikimedia.org/r/revision/%R;%H',
  ];
  
  /** @} */ # End of maintenance }
@@@ -6505,10 -6507,6 +6505,10 @@@ $wgUnwatchedPageThreshold = false
   *   'legend' => 'legend-msg',
   *   // optional (defaults to 'flag'), CSS class to put on changes lists rows
   *   'class' => 'css-class',
 + *   // optional (defaults to 'any'), how top-level flag is determined.  'any'
 + *   // will set the top-level flag if any line contains the flag, 'all' will
 + *   // only be set if all lines contain the flag.
 + *   'grouping' => 'any',
   * );
   * @endcode
   *
@@@ -6519,27 -6517,23 +6519,27 @@@ $wgRecentChangesFlags = 
                'letter' => 'newpageletter',
                'title' => 'recentchanges-label-newpage',
                'legend' => 'recentchanges-legend-newpage',
 +              'grouping' => 'any',
        ],
        'minor' => [
                'letter' => 'minoreditletter',
                'title' => 'recentchanges-label-minor',
                'legend' => 'recentchanges-legend-minor',
                'class' => 'minoredit',
 +              'grouping' => 'all',
        ],
        'bot' => [
                'letter' => 'boteditletter',
                'title' => 'recentchanges-label-bot',
                'legend' => 'recentchanges-legend-bot',
                'class' => 'botedit',
 +              'grouping' => 'all',
        ],
        'unpatrolled' => [
                'letter' => 'unpatrolledletter',
                'title' => 'recentchanges-label-unpatrolled',
                'legend' => 'recentchanges-legend-unpatrolled',
 +              'grouping' => 'any',
        ],
  ];
  
@@@ -6579,6 -6573,12 +6579,6 @@@ $wgRightsText = null
   */
  $wgRightsIcon = null;
  
 -/**
 - * Set this to some HTML to override the rights icon with an arbitrary logo
 - * @deprecated since 1.18 Use $wgFooterIcons['copyright']['copyright']
 - */
 -$wgCopyrightIcon = null;
 -
  /**
   * Set this to true if you want detailed copyright information forms on Upload.
   */
@@@ -6911,21 -6911,6 +6911,21 @@@ $wgAuth = null
   */
  $wgHooks = [];
  
 +/**
 + * List of service wiring files to be loaded by the default instance of MediaWikiServices.
 + * Each file listed here is expected to return an associative array mapping service names
 + * to instantiator functions. Extensions may add wiring files to define their own services.
 + * However, this cannot be used to replace existing services - use the MediaWikiServices
 + * hook for that.
 + *
 + * @see MediaWikiServices
 + * @see ServiceContainer::loadWiringFiles() for details on loading service instantiator functions.
 + * @see docs/injection.txt for an overview of dependency injection in MediaWiki.
 + */
 +$wgServiceWiringFiles = [
 +      __DIR__ . '/ServiceWiring.php'
 +];
 +
  /**
   * Maps jobs to their handling classes; extensions
   * can add to this to provide custom jobs
@@@ -7233,7 -7218,6 +7233,7 @@@ $wgLogActionsHandlers = 
        'move/move' => 'MoveLogFormatter',
        'move/move_redir' => 'MoveLogFormatter',
        'patrol/patrol' => 'PatrolLogFormatter',
 +      'patrol/autopatrol' => 'PatrolLogFormatter',
        'protect/modify' => 'ProtectLogFormatter',
        'protect/move_prot' => 'ProtectLogFormatter',
        'protect/protect' => 'ProtectLogFormatter',
        'upload/upload' => 'UploadLogFormatter',
  ];
  
 +/**
 + * List of log types that can be filtered by action types
 + *
 + * To each action is associated the list of log_action
 + * subtypes to search for, usually one, but not necessarily so
 + * Extensions may append to this array
 + * @since 1.27
 + */
 +$wgActionFilteredLogs = [
 +      'block' => [
 +              'block' => [ 'block' ],
 +              'reblock' => [ 'reblock' ],
 +              'unblock' => [ 'unblock' ],
 +      ],
 +      'contentmodel' => [
 +              'change' => [ 'change' ],
 +              'new' => [ 'new' ],
 +      ],
 +      'delete' => [
 +              'delete' => [ 'delete' ],
 +              'restore' => [ 'restore' ],
 +              'event' => [ 'event' ],
 +              'revision' => [ 'revision' ],
 +      ],
 +      'import' => [
 +              'interwiki' => [ 'interwiki' ],
 +              'upload' => [ 'upload' ],
 +      ],
 +      'managetags' => [
 +              'create' => [ 'create' ],
 +              'delete' => [ 'delete' ],
 +              'activate' => [ 'activate' ],
 +              'deactivate' => [ 'deactivate' ],
 +      ],
 +      'move' => [
 +              'move' => [ 'move' ],
 +              'move_redir' => [ 'move_redir' ],
 +      ],
 +      'newusers' => [
 +              'create' => [ 'create', 'newusers' ],
 +              'create2' => [ 'create2' ],
 +              'autocreate' => [ 'autocreate' ],
 +              'byemail' => [ 'byemail' ],
 +      ],
 +      'patrol' => [
 +              'patrol' => [ 'patrol' ],
 +              'autopatrol' => [ 'autopatrol' ],
 +      ],
 +      'protect' => [
 +              'protect' => [ 'protect' ],
 +              'modify' => [ 'modify' ],
 +              'unprotect' => [ 'unprotect' ],
 +              'move_prot' => [ 'move_prot' ],
 +      ],
 +      'rights' => [
 +              'rights' => [ 'rights' ],
 +              'autopromote' => [ 'autopromote' ],
 +      ],
 +      'suppress' => [
 +              'event' => [ 'event' ],
 +              'revision' => [ 'revision' ],
 +              'delete' => [ 'delete' ],
 +              'block' => [ 'block' ],
 +              'reblock' => [ 'reblock' ],
 +      ],
 +      'upload' => [
 +              'upload' => [ 'upload' ],
 +              'overwrite' => [ 'overwrite' ],
 +      ],
 +];
 +
  /**
   * Maintain a log of newusers at Log/newusers?
   */
@@@ -7833,9 -7746,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;
@@@ -7990,23 -7903,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).
@@@ -8095,7 -7991,7 +8095,7 @@@ $wgPopularPasswordFile = __DIR__ . '/..
  $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
   * 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
   */