Merge "Truncate gallery caption filenames with CSS"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 18 Jul 2016 23:39:30 +0000 (23:39 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 18 Jul 2016 23:39:30 +0000 (23:39 +0000)
1  2 
includes/DefaultSettings.php
resources/src/mediawiki/page/gallery.css
tests/parser/parserTests.txt

@@@ -284,10 -284,10 +284,10 @@@ $wgLogo = false
   *
   * @par Example:
   * @code
 - * $wgLogoHD = array(
 + * $wgLogoHD = [
   *    "1.5x" => "path/to/1.5x_version.png",
   *    "2x" => "path/to/2x_version.png"
 - * );
 + * ];
   * @endcode
   *
   * @since 1.25
@@@ -532,7 -532,7 +532,7 @@@ $wgUseInstantCommons = false
   * The string 'local' signifies the default local file repository.
   *
   * Example:
 - * $wgForeignUploadTargets = array( 'shared' );
 + * $wgForeignUploadTargets = [ 'shared' ];
   */
  $wgForeignUploadTargets = [ 'local' ];
  
@@@ -755,10 -755,10 +755,10 @@@ $wgCopyUploadTimeout = false
   *
   * @par Example:
   * @code
 - * $wgMaxUploadSize = array(
 + * $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.
@@@ -1163,9 -1163,9 +1163,9 @@@ $wgMaxAnimatedGifArea = 1.25e7
   * @par Example:
   * @code
   *  // PNG is lossless, but inefficient for photos
 - *  $wgTiffThumbnailType = array( 'png', 'image/png' );
 + *  $wgTiffThumbnailType = [ 'png', 'image/png' ];
   *  // JPEG is good for photos, but has no transparency support. Bad for diagrams.
 - *  $wgTiffThumbnailType = array( 'jpg', 'image/jpeg' );
 + *  $wgTiffThumbnailType = [ 'jpg', 'image/jpeg' ];
   * @endcode
   */
  $wgTiffThumbnailType = false;
@@@ -1321,7 -1321,7 +1321,7 @@@ $wgTrivialMimeDetection = false
  
  /**
   * Additional XML types we can allow via MIME-detection.
 - * array = ( 'rootElement' => 'associatedMimeType' )
 + * array = [ 'rootElement' => 'associatedMimeType' ]
   */
  $wgXMLMimeTypes = [
        'http://www.w3.org/2000/svg:svg' => 'image/svg+xml',
@@@ -1378,7 -1378,7 +1378,7 @@@ $wgThumbnailBuckets = null
   * needs in order to be used as the reference for a given thumbnail. For example, with the
   * following buckets:
   *
 - * $wgThumbnailBuckets = array ( 128, 256, 512 );
 + * $wgThumbnailBuckets = [ 128, 256, 512 ];
   *
   * and a distance of 50:
   *
@@@ -1444,7 -1444,10 +1444,10 @@@ $wgGalleryOptions = 
        'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize
        'imageWidth' => 120, // Width of the cells containing images in galleries (in "px")
        'imageHeight' => 120, // Height of the cells containing images in galleries (in "px")
-       'captionLength' => 25, // Length to truncate filename to in caption when using "showfilename"
+       'captionLength' => true, // Deprecated @since 1.28
+                                // 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.
        'showBytes' => true, // Show the filesize in bytes in categories
        'mode' => 'traditional',
  ];
@@@ -1624,14 -1627,14 +1627,14 @@@ $wgPasswordExpireGrace = 3600 * 24 * 7
   * Default to false or fill an array :
   *
   * @code
 - * $wgSMTP = array(
 + * $wgSMTP = [
   *     'host'     => 'SMTP domain',
   *     'IDHost'   => 'domain for MessageID',
   *     'port'     => '25',
   *     'auth'     => [true|false],
   *     'username' => [SMTP username],
   *     'password' => [SMTP password],
 - * );
 + * ];
   * @endcode
   */
  $wgSMTP = false;
@@@ -2068,7 -2071,7 +2071,7 @@@ $wgCompressRevisions = false
   *
   * Short names of ExternalStore classes may be specified in an array here:
   * @code
 - * $wgExternalStores = array("http","file","custom")...
 + * $wgExternalStores = [ "http","file","custom" ]...
   * @endcode
   *
   * CAUTION: Access to database might lead to code execution
@@@ -2081,9 -2084,9 +2084,9 @@@ $wgExternalStores = []
   * @par Example:
   * Create a cluster named 'cluster1' containing three servers:
   * @code
 - * $wgExternalServers = array(
 - *     'cluster1' => array( 'srv28', 'srv29', 'srv30' )
 - * );
 + * $wgExternalServers = [
 + *     'cluster1' => [ 'srv28', 'srv29', 'srv30' ]
 + * ];
   * @endcode
   *
   * Used by LBFactorySimple, may be ignored if $wgLBFactoryConf is set to
@@@ -2100,7 -2103,7 +2103,7 @@@ $wgExternalServers = []
   *
   * @par Example:
   * @code
 - * $wgDefaultExternalStore = array( 'DB://cluster1', 'DB://cluster2' );
 + * $wgDefaultExternalStore = [ 'DB://cluster1', 'DB://cluster2' ];
   * @endcode
   *
   * @var array
@@@ -2551,6 -2554,12 +2554,6 @@@ $wgSidebarCacheExpiry = 86400
   */
  $wgUseGzip = false;
  
 -/**
 - * Whether MediaWiki should send an ETag header. Seems to cause
 - * broken behavior with Squid 2.6, see bug 7098.
 - */
 -$wgUseETag = false;
 -
  /**
   * Clock skew or the one-second resolution of time() can occasionally cause cache
   * problems when the user requests two pages within a short period of time. This
@@@ -2738,16 -2747,16 +2741,16 @@@ $wgSquidPurgeUseHostHeader = true
   * @par Example configuration to send purges for upload.wikimedia.org to one
   * multicast group and all other purges to another:
   * @code
 - * $wgHTCPRouting = array(
 - *         '|^https?://upload\.wikimedia\.org|' => array(
 + * $wgHTCPRouting = [
 + *         '|^https?://upload\.wikimedia\.org|' => [
   *                 'host' => '239.128.0.113',
   *                 'port' => 4827,
 - *         ),
 - *         '' => array(
 + *         ],
 + *         '' => [
   *                 'host' => '239.128.0.112',
   *                 'port' => 4827,
 - *         ),
 - * );
 + *         ],
 + * ];
   * @endcode
   *
   * You can also pass an array of hosts to send purges too. This is useful when
   *
   * @par Example of sending purges to multiple hosts:
   * @code
 - * $wgHTCPRouting = array(
 - *     '' => array(
 + * $wgHTCPRouting = [
 + *     '' => [
   *         // Purges to text caches using multicast
 - *         array( 'host' => '239.128.0.114', 'port' => '4827' ),
 + *         [ 'host' => '239.128.0.114', 'port' => '4827' ],
   *         // Purges to a hardcoded list of caches
 - *         array( 'host' => '10.88.66.1', 'port' => '4827' ),
 - *         array( 'host' => '10.88.66.2', 'port' => '4827' ),
 - *         array( 'host' => '10.88.66.3', 'port' => '4827' ),
 - *     ),
 - * );
 + *         [ '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
@@@ -2882,6 -2891,15 +2885,6 @@@ $wgDummyLanguageCodes = 
        'zh-yue' => 'yue',
  ];
  
 -/**
 - * Character set for use in the article edit box. Language-specific encodings
 - * may be defined.
 - *
 - * This historic feature is one of the first that was added by former MediaWiki
 - * team leader Brion Vibber, and is used to support the Esperanto x-system.
 - */
 -$wgEditEncoding = '';
 -
  /**
   * 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
@@@ -3079,7 -3097,7 +3082,7 @@@ $wgLoginLanguageSelector = false
   * To allow language-specific main page and community
   * portal:
   * @code
 - *     $wgForceUIMsgAsContentMsg = array( 'mainpage', 'portal-url' );
 + *     $wgForceUIMsgAsContentMsg = [ 'mainpage', 'portal-url' ];
   * @endcode
   */
  $wgForceUIMsgAsContentMsg = [];
@@@ -3449,13 -3467,13 +3452,13 @@@ $wgMangleFlashPolicy = true
   *
   * @par Example:
   * @code
 - *   $wgResourceModules['ext.myExtension'] = array(
 + *   $wgResourceModules['ext.myExtension'] = [
   *      'scripts' => 'myExtension.js',
   *      'styles' => 'myExtension.css',
 - *      'dependencies' => array( 'jquery.cookie', 'jquery.tabIndex' ),
 + *      'dependencies' => [ 'jquery.cookie', 'jquery.tabIndex' ],
   *      'localBasePath' => __DIR__,
   *      'remoteExtPath' => 'MyExtension',
 - *   );
 + *   ];
   * @endcode
   */
  $wgResourceModules = [];
   *
   * @par Example:
   * @code
 - *   $wgResourceModules['bar'] = array(
 + *   $wgResourceModules['bar'] = [
   *     'scripts' => 'resources/bar/bar.js',
   *     'styles' => 'resources/bar/main.css',
 - *   );
 + *   ];
   *
 - *   $wgResourceModuleSkinStyles['foo'] = array(
 + *   $wgResourceModuleSkinStyles['foo'] = [
   *     'bar' => 'skins/Foo/bar.css',
 - *   );
 + *   ];
   * @endcode
   *
   * This is mostly equivalent to:
   *
   * @par Equivalent:
   * @code
 - *   $wgResourceModules['bar'] = array(
 + *   $wgResourceModules['bar'] = [
   *     'scripts' => 'resources/bar/bar.js',
   *     'styles' => 'resources/bar/main.css',
 - *     'skinStyles' => array(
 + *     'skinStyles' => [
   *       'foo' => skins/Foo/bar.css',
 - *     ),
 - *   );
 + *     ],
 + *   ];
   * @endcode
   *
   * If the module already defines its own entry in `skinStyles` for a given skin, then
   *
   * @par Example:
   * @code
 - *   $wgResourceModules['bar'] = array(
 + *   $wgResourceModules['bar'] = [
   *     'scripts' => 'resources/bar/bar.js',
   *     'styles' => 'resources/bar/basic.css',
 - *     'skinStyles' => array(
 - *       'default' => 'resources/bar/additional.css',
 - *     ),
 - *   );
 + *     'skinStyles' => [
 + *      'default' => 'resources/bar/additional.css',
 + *     ],
 + *   ];
   *   // Note the '+' character:
 - *   $wgResourceModuleSkinStyles['foo'] = array(
 + *   $wgResourceModuleSkinStyles['foo'] = [
   *     '+bar' => 'skins/Foo/bar.css',
 - *   );
 + *   ];
   * @endcode
   *
   * This is mostly equivalent to:
   *
   * @par Equivalent:
   * @code
 - *   $wgResourceModules['bar'] = array(
 + *   $wgResourceModules['bar'] = [
   *     'scripts' => 'resources/bar/bar.js',
   *     'styles' => 'resources/bar/basic.css',
 - *     'skinStyles' => array(
 + *     'skinStyles' => [
   *       'default' => 'resources/bar/additional.css',
 - *       'foo' => array(
 + *       'foo' => [
   *         'resources/bar/additional.css',
   *         'skins/Foo/bar.css',
 - *       ),
 - *     ),
 - *   );
 + *       ],
 + *     ],
 + *   ];
   * @endcode
   *
   * In other words, as a module author, use the `styles` list for stylesheets that may not be
   *
   * @par Example:
   * @code
 - *   $wgResourceModuleSkinStyles['foo'] = array(
 + *   $wgResourceModuleSkinStyles['foo'] = [
   *     'bar' => 'bar.css',
   *     'quux' => 'quux.css',
   *     'remoteSkinPath' => 'Foo',
   *     'localBasePath' => __DIR__,
 - *   );
 + *   ];
   * @endcode
   */
  $wgResourceModuleSkinStyles = [];
@@@ -3702,11 -3720,11 +3705,11 @@@ $wgResourceLoaderValidateStaticJS = fal
   *
   * @par Example:
   * @code
 - *   $wgResourceLoaderLESSVars = array(
 + *   $wgResourceLoaderLESSVars = [
   *     'baseFontSize'  => '1em',
   *     'smallFontSize' => '0.75em',
   *     'WikimediaBlue' => '#006699',
 - *   );
 + *   ];
   * @endcode
   * @since 1.22
   */
@@@ -3804,12 -3822,12 +3807,12 @@@ $wgMetaNamespaceTalk = false
   *
   * @par Example:
   * @code
 - * $wgExtraNamespaces = array(
 + * $wgExtraNamespaces = [
   *    100 => "Hilfe",
   *    101 => "Hilfe_Diskussion",
   *    102 => "Aide",
   *    103 => "Discussion_Aide"
 - * );
 + * ];
   * @endcode
   *
   * @todo Add a note about maintenance/namespaceDupes.php
@@@ -3836,10 -3854,10 +3839,10 @@@ $wgExtraGenderNamespaces = []
   *
   * @par Example:
   * @code
 - *    $wgNamespaceAliases = array(
 + *    $wgNamespaceAliases = [
   *        'Wikipedian' => NS_USER,
   *        'Help' => 100,
 - *    );
 + *    ];
   * @endcode
   */
  $wgNamespaceAliases = [];
@@@ -4166,7 -4184,7 +4169,7 @@@ $wgAllowExternalImages = false
   * @par Examples:
   * @code
   * $wgAllowExternalImagesFrom = 'http://127.0.0.1/';
 - * $wgAllowExternalImagesFrom = array( 'http://127.0.0.1/', 'http://example.com' );
 + * $wgAllowExternalImagesFrom = [ 'http://127.0.0.1/', 'http://example.com' ];
   * @endcode
   */
  $wgAllowExternalImagesFrom = '';
@@@ -4207,8 -4225,6 +4210,8 @@@ $wgAllowImageTag = false
   *    - RaggettInternalHHVM: Use the limited-functionality HHVM extension
   *    - RaggettInternalPHP: Use the PECL extension
   *    - RaggettExternal: Shell out to an external binary (tidyBin)
 + *    - Html5Depurate: Use external Depurate service
 + *    - Html5Internal: Use the built-in HTML5 balancer
   *
   *  - tidyConfigFile: Path to configuration file for any of the Raggett drivers
   *  - debugComment: True to add a comment to the output with warning messages
@@@ -4290,7 -4306,8 +4293,7 @@@ $wgNoFollowNsExceptions = []
   * (or any subdomains) will not be set to rel="nofollow" regardless of the
   * value of $wgNoFollowLinks.  For instance:
   *
 - * $wgNoFollowDomainExceptions = array( 'en.wikipedia.org', 'wiktionary.org',
 - * 'mediawiki.org' );
 + * $wgNoFollowDomainExceptions = [ 'en.wikipedia.org', 'wiktionary.org', 'mediawiki.org' ];
   *
   * This would add rel="nofollow" to links to de.wikipedia.org, but not
   * en.wikipedia.org, wiktionary.org, en.wiktionary.org, us.en.wikipedia.org,
@@@ -4677,14 -4694,14 +4680,14 @@@ $wgPasswordDefault = 'pbkdf2'
   *
   * An advanced example:
   * @code
 - * $wgPasswordConfig['bcrypt-peppered'] = array(
 + * $wgPasswordConfig['bcrypt-peppered'] = [
   *     'class' => 'EncryptedPassword',
   *     'underlying' => 'bcrypt',
 - *     'secrets' => array(),
 + *     'secrets' => [],
   *     'cipher' => MCRYPT_RIJNDAEL_256,
   *     'mode' => MCRYPT_MODE_CBC,
   *     'cost' => 5,
 - * );
 + * ];
   * @endcode
   *
   * @since 1.24
@@@ -4973,7 -4990,7 +4976,7 @@@ $wgWhitelistRead = false
   * @par Example:
   * To whitelist [[Main Page]]:
   * @code
 - * $wgWhitelistReadRegexp = array( "/Main Page/" );
 + * $wgWhitelistReadRegexp = [ "/Main Page/" ];
   * @endcode
   *
   * @note Unless ^ and/or $ is specified, a regular expression might match
   * @par Example:
   * To allow reading any page starting with 'User' regardless of the case:
   * @code
 - * $wgWhitelistReadRegexp = array( "@^UsEr.*@i" );
 + * $wgWhitelistReadRegexp = [ "@^UsEr.*@i" ];
   * @endcode
   * Will allow both [[User is banned]] and [[User:JohnDoe]]
   *
@@@ -5018,7 -5035,7 +5021,7 @@@ $wgHideIdentifiableRedirects = true
   * combined with the permissions of all groups that a given user is listed
   * in in the user_groups table.
   *
 - * Note: Don't set $wgGroupPermissions = array(); unless you know what you're
 + * Note: Don't set $wgGroupPermissions = []; unless you know what you're
   * doing! This will wipe all permissions, and may mean that your users are
   * unable to perform certain essential tasks or access new functionality
   * when new permissions are introduced and default grants established.
@@@ -5184,13 -5201,13 +5187,13 @@@ $wgImplicitGroups = [ '*', 'user', 'aut
   * @par Example:
   * To allow sysops to add themselves to the "bot" group:
   * @code
 - *    $wgGroupsAddToSelf = array( 'sysop' => array( 'bot' ) );
 + *    $wgGroupsAddToSelf = [ 'sysop' => [ 'bot' ] ];
   * @endcode
   *
   * @par Example:
   * Implicit groups may be used for the source group, for instance:
   * @code
 - *    $wgGroupsRemoveFromSelf = array( '*' => true );
 + *    $wgGroupsRemoveFromSelf = [ '*' => true ];
   * @endcode
   * This allows users in the '*' group (i.e. any user) to remove themselves from
   * any group that they happen to be in.
@@@ -5308,18 -5325,18 +5311,18 @@@ $wgAutoConfirmCount = 0
   * @todo Redocument $wgAutopromote
   *
   * The format is
 - *   array( '&' or '|' or '^' or '!', cond1, cond2, ... )
 + *   [ '&' or '|' or '^' or '!', cond1, cond2, ... ]
   * where cond1, cond2, ... are themselves conditions; *OR*
   *   APCOND_EMAILCONFIRMED, *OR*
 - *   array( APCOND_EMAILCONFIRMED ), *OR*
 - *   array( APCOND_EDITCOUNT, number of edits ), *OR*
 - *   array( APCOND_AGE, seconds since registration ), *OR*
 - *   array( APCOND_INGROUPS, group1, group2, ... ), *OR*
 - *   array( APCOND_ISIP, ip ), *OR*
 - *   array( APCOND_IPINRANGE, range ), *OR*
 - *   array( APCOND_AGE_FROM_EDIT, seconds since first edit ), *OR*
 - *   array( APCOND_BLOCKED ), *OR*
 - *   array( APCOND_ISBOT ), *OR*
 + *   [ APCOND_EMAILCONFIRMED ], *OR*
 + *   [ APCOND_EDITCOUNT, number of edits ], *OR*
 + *   [ APCOND_AGE, seconds since registration ], *OR*
 + *   [ APCOND_INGROUPS, group1, group2, ... ], *OR*
 + *   [ APCOND_ISIP, ip ], *OR*
 + *   [ APCOND_IPINRANGE, range ], *OR*
 + *   [ APCOND_AGE_FROM_EDIT, seconds since first edit ], *OR*
 + *   [ APCOND_BLOCKED ], *OR*
 + *   [ APCOND_ISBOT ], *OR*
   *   similar constructs defined by extensions.
   *
   * If $wgEmailAuthentication is off, APCOND_EMAILCONFIRMED will be true for any
@@@ -5340,7 -5357,7 +5343,7 @@@ $wgAutopromote = 
   *
   * The format is:
   * @code
 - *    array( event => criteria, ... )
 + *    [ event => criteria, ... ]
   * @endcode
   * Where event is either:
   *    - 'onEdit' (when user edits)
@@@ -5371,15 -5388,15 +5374,15 @@@ $wgAutopromoteOnceLogInRC = true
   * @endcode
   * Bureaucrats can only remove bots and sysops:
   * @code
 - * $wgRemoveGroups['bureaucrat'] = array( 'bot', 'sysop' );
 + * $wgRemoveGroups['bureaucrat'] = [ 'bot', 'sysop' ];
   * @endcode
   * Sysops can make bots:
   * @code
 - * $wgAddGroups['sysop'] = array( 'bot' );
 + * $wgAddGroups['sysop'] = [ 'bot' ];
   * @endcode
   * Sysops can disable other sysops in an emergency, and disable bots:
   * @code
 - * $wgRemoveGroups['sysop'] = array( 'sysop', 'bot' );
 + * $wgRemoveGroups['sysop'] = [ 'sysop', 'bot' ];
   * @endcode
   */
  $wgAddGroups = [];
@@@ -5450,15 -5467,15 +5453,15 @@@ $wgEnableDnsBlacklist = false
   *
   * @par Example:
   * @code
 - * $wgDnsBlacklistUrls = array(
 + * $wgDnsBlacklistUrls = [
   *   // String containing URL
   *   'http.dnsbl.sorbs.net.',
   *   // Array with URL and key, for services that require a key
 - *   array( 'dnsbl.httpbl.net.', 'mykey' ),
 + *   [ 'dnsbl.httpbl.net.', 'mykey' ],
   *   // Array with just the URL. While this works, it is recommended that you
   *   // just use a string as shown above
 - *   array( 'opm.tornevall.org.' )
 - * );
 + *   [ 'opm.tornevall.org.' ]
 + * ];
   * @endcode
   *
   * @note You should end the domain name with a . to avoid searching your
@@@ -5490,21 -5507,21 +5493,21 @@@ $wgApplyIpBlocksToXff = false
   * @par Example:
   * To set a generic maximum of 4 hits in 60 seconds:
   * @code
 - *     $wgRateLimits = array( 4, 60 );
 + *     $wgRateLimits = [ 4, 60 ];
   * @endcode
   *
   * @par Example:
   * You could also limit per action and then type of users.
   * @code
 - *     $wgRateLimits = array(
 - *         'edit' => array(
 - *             'anon' => array( x, y ), // any and all anonymous edits (aggregate)
 - *             'user' => array( x, y ), // each logged-in user
 - *             'newbie' => array( x, y ), // each new autoconfirmed accounts; overrides 'user'
 - *             'ip' => array( x, y ), // each anon and recent account
 - *             'subnet' => array( x, y ), // ... within a /24 subnet in IPv4 or /64 in IPv6
 - *         )
 - *     )
 + *     $wgRateLimits = [
 + *         'edit' => [
 + *             'anon' => [ x, y ], // any and all anonymous edits (aggregate)
 + *             'user' => [ x, y ], // each logged-in user
 + *             'newbie' => [ x, y ], // each new autoconfirmed accounts; overrides 'user'
 + *             'ip' => [ x, y ], // each anon and recent account
 + *             'subnet' => [ x, y ], // ... within a /24 subnet in IPv4 or /64 in IPv6
 + *         ]
 + *     ]
   * @endcode
   *
   * @warning Requires that $wgMainCacheType is set to something persistent
@@@ -5803,6 -5820,14 +5806,6 @@@ $wgProxyList = []
   */
  $wgCookieExpiration = 180 * 86400;
  
 -/**
 - * The identifiers of the login cookies that can have their lifetimes
 - * extended independently of all other login cookies.
 - *
 - * @var string[]
 - */
 -$wgExtendedLoginCookies = [ 'UserID', 'Token' ];
 -
  /**
   * Default login cookie lifetime, in seconds. Setting
   * $wgExtendLoginCookieExpiration to null will use $wgCookieExpiration to
@@@ -6001,11 -6026,11 +6004,11 @@@ $wgTrxProfilerLimits = 
   *
   * @par Advanced example:
   * @code
 - * $wgDebugLogGroups['memcached'] = array(
 + * $wgDebugLogGroups['memcached'] = [
   *     'destination' => '/var/log/mediawiki/memcached.log',
   *     'sample' => 1000,  // log 1 message out of every 1,000.
   *     'level' => \Psr\Log\LogLevel::WARNING
 - * );
 + * ];
   * @endcode
   */
  $wgDebugLogGroups = [];
   *
   * @par To completely disable logging:
   * @code
 - * $wgMWLoggerDefaultSpi = array( 'class' => '\\MediaWiki\\Logger\\NullSpi' );
 + * $wgMWLoggerDefaultSpi = [ 'class' => '\\MediaWiki\\Logger\\NullSpi' ];
   * @endcode
   *
   * @since 1.25
@@@ -6334,10 -6359,10 +6337,10 @@@ $wgSitemapNamespaces = false
   * This should be a map of namespace IDs to priority
   * @par Example:
   * @code
 - *  $wgSitemapNamespacesPriorities = array(
 + *  $wgSitemapNamespacesPriorities = [
   *      NS_USER => '0.9',
   *      NS_HELP => '0.0',
 - *  );
 + *  ];
   * @endcode
   */
  $wgSitemapNamespacesPriorities = false;
@@@ -6544,18 -6569,18 +6547,18 @@@ $wgRCLinkDays = [ 1, 3, 7, 14, 30 ]
   *  The JSON-specific options are:
   *   * 'channel' -- if set, the 'channel' parameter is also set in JSON values.
   *
 - * @example $wgRCFeeds['example'] = array(
 + * @example $wgRCFeeds['example'] = [
   *            'formatter' => 'JSONRCFeedFormatter',
   *            'uri' => "udp://localhost:1336",
   *            'add_interwiki_prefix' => false,
   *            'omit_bots' => true,
 - *    );
 - * @example $wgRCFeeds['exampleirc'] = array(
 + *    ];
 + * @example $wgRCFeeds['exampleirc'] = [
   *            'formatter' => 'IRCColourfulRCFeedFormatter',
   *            'uri' => "udp://localhost:1338",
   *            'add_interwiki_prefix' => false,
   *            'omit_bots' => true,
 - *    );
 + *    ];
   * @since 1.22
   */
  $wgRCFeeds = [];
@@@ -6717,7 -6742,7 +6720,7 @@@ $wgUnwatchedPageThreshold = false
   *
   * To register a new one:
   * @code
 - * $wgRecentChangesFlags['flag'] => array(
 + * $wgRecentChangesFlags['flag'] => [
   *   // message for the letter displayed next to rows on changes lists
   *   'letter' => 'letter-msg',
   *   // message for the tooltip of the letter
   *   // 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
   *
   * @since 1.22
@@@ -6836,11 -6861,11 +6839,11 @@@ $wgShowCreditsIfMax = true
   * subprojects on the interwiki map of the target wiki, or a mix of the two,
   * e.g.
   * @code
 - *     $wgImportSources = array(
 - *         'wikipedia' => array( 'cs', 'en', 'fr', 'zh' ),
 + *     $wgImportSources = [
 + *         'wikipedia' => [ 'cs', 'en', 'fr', 'zh' ],
   *         'wikispecies',
 - *         'wikia' => array( 'animanga', 'brickipedia', 'desserts' ),
 - *     );
 + *         'wikia' => [ 'animanga', 'brickipedia', 'desserts' ],
 + *     ];
   * @endcode
   *
   * If you have a very complex import sources setup, you can lazy-load it using
@@@ -6968,11 -6993,11 +6971,11 @@@ $wgExtensionMessagesFiles = []
   *
   * @par Complex example:
   * @code
 - *    $wgMessagesDirs['Example'] = array(
 + *    $wgMessagesDirs['Example'] = [
   *        __DIR__ . '/lib/ve/i18n',
   *        __DIR__ . '/lib/oojs-ui/i18n',
   *        __DIR__ . '/i18n',
 - *    )
 + *    ]
   * @endcode
   * @since 1.23
   */
@@@ -7042,18 -7067,18 +7045,18 @@@ $wgAutoloadAttemptLowercase = true
   * All but 'name', 'path' and 'author' can be omitted.
   *
   * @code
 - * $wgExtensionCredits[$type][] = array(
 + * $wgExtensionCredits[$type][] = [
   *     'path' => __FILE__,
   *     'name' => 'Example extension',
   *     'namemsg' => 'exampleextension-name',
 - *     'author' => array(
 + *     'author' => [
   *         'Foo Barstein',
 - *     ),
 + *     ],
   *     'version' => '1.9.0',
   *     'url' => 'http://example.org/example-extension/',
   *     'descriptionmsg' => 'exampleextension-desc',
   *     'license-name' => 'GPL-2.0+',
 - * );
 + * ];
   * @endcode
   *
   * The extensions are listed on Special:Version. This page also looks for a file
@@@ -7112,11 -7137,11 +7115,11 @@@ $wgAuth = null
   * @endcode
   * - A function with some data:
   * @code
 - *     $wgHooks['event_name'][] = array( $function, $data );
 + *     $wgHooks['event_name'][] = [ $function, $data ];
   * @endcode
   * - A an object method:
   * @code
 - *     $wgHooks['event_name'][] = array( $object, 'method' );
 + *     $wgHooks['event_name'][] = [ $object, 'method' ];
   * @endcode
   * - A closure:
   * @code
@@@ -7241,7 -7266,7 +7244,7 @@@ $wgSpecialPageCacheUpdates = 
   * Hooks that are used for outputting exceptions.  Format is:
   *   $wgExceptionHooks[] = $funcname
   * or:
 - *   $wgExceptionHooks[] = array( $class, $funcname )
 + *   $wgExceptionHooks[] = [ $class, $funcname ]
   * Hooks should return strings or false
   */
  $wgExceptionHooks = [];
@@@ -7357,7 -7382,10 +7360,7 @@@ $wgLogRestrictions = 
   *
   * @par Example:
   * @code
 - *   $wgFilterLogTypes = array(
 - *      'move' => true,
 - *      'import' => false,
 - *   );
 + *   $wgFilterLogTypes = [ 'move' => true, 'import' => false ];
   * @endcode
   *
   * Will display show/hide links for the move and import logs. Move logs will be
@@@ -7641,7 -7669,7 +7644,7 @@@ $wgDefaultRobotPolicy = 'index,follow'
   *
   * @par Example:
   * @code
 - *   $wgNamespaceRobotPolicies = array( NS_TALK => 'noindex' );
 + *   $wgNamespaceRobotPolicies = [ NS_TALK => 'noindex' ];
   * @endcode
   */
  $wgNamespaceRobotPolicies = [];
   *
   * @par Example:
   * @code
 - * $wgArticleRobotPolicies = array(
 + * $wgArticleRobotPolicies = [
   *         'Main Page' => 'noindex,follow',
   *         'User:Bob' => 'index,follow',
 - * );
 + * ];
   * @endcode
   *
   * @par Example that DOES NOT WORK because the names are not canonical text
   * forms:
   * @code
 - *   $wgArticleRobotPolicies = array(
 + *   $wgArticleRobotPolicies = [
   *     # Underscore, not space!
   *     'Main_Page' => 'noindex,follow',
   *     # "Project", not the actual project name!
   *     'Project:X' => 'index,follow',
   *     # Needs to be "Abc", not "abc" (unless $wgCapitalLinks is false for that namespace)!
   *     'abc' => 'noindex,nofollow'
 - *   );
 + *   ];
   * @endcode
   */
  $wgArticleRobotPolicies = [];
   *
   * @par Example:
   * @code
 - *   $wgExemptFromUserRobotsControl = array( NS_MAIN, NS_TALK, NS_PROJECT );
 + *   $wgExemptFromUserRobotsControl = [ NS_MAIN, NS_TALK, NS_PROJECT ];
   * @endcode
   */
  $wgExemptFromUserRobotsControl = null;
@@@ -7750,14 -7778,14 +7753,14 @@@ $wgDebugAPI = false
   *
   * @code
   *  $wgAPIModules['foo'] = 'ApiFoo';
 - *  $wgAPIModules['bar'] = array(
 + *  $wgAPIModules['bar'] = [
   *    'class' => 'ApiBar',
   *    'factory' => function( $main, $name ) { ... }
 - *  );
 - *  $wgAPIModules['xyzzy'] = array(
 + *  ];
 + *  $wgAPIModules['xyzzy'] = [
   *    'class' => 'ApiXyzzy',
 - *    'factory' => array( 'XyzzyFactory', 'newApiModule' )
 - *  );
 + *    'factory' => [ 'XyzzyFactory', 'newApiModule' ]
 + *  ];
   * @endcode
   *
   * Extension modules may override the core modules.
@@@ -7887,12 -7915,12 +7890,12 @@@ $wgAjaxEditStash = true
   *
   * @par Example:
   * @code
 - * $wgCrossSiteAJAXdomains = array(
 + * $wgCrossSiteAJAXdomains = [
   *     'www.mediawiki.org',
   *     '*.wikipedia.org',
   *     '*.wikimedia.org',
   *     '*.wiktionary.org',
 - * );
 + * ];
   * @endcode
   */
  $wgCrossSiteAJAXdomains = [];
@@@ -8052,9 -8080,10 +8055,9 @@@ $wgUpdateRowsPerQuery = 100
  
  /**
   * Name of the external diff engine to use. Supported values:
 - * * false: default PHP implementation
 - * * 'wikidiff2': Wikimedia's fast difference engine implemented as a PHP/HHVM module
 - * * 'wikidiff' and 'wikidiff3' are treated as false for backwards compatibility
 - * * any other string is treated as a path to external diff executable
 + * * string: path to an external diff executable
 + * * false: wikidiff2 PHP/HHVM module if installed, otherwise the default PHP implementation
 + * * 'wikidiff', 'wikidiff2', and 'wikidiff3' are treated as false for backwards compatibility
   */
  $wgExternalDiffEngine = false;
  
@@@ -8108,13 -8137,13 +8111,13 @@@ $wgRedirectOnLogin = null
   *
   * @par Example:
   * @code
 - *   $wgPoolCounterConf = array( 'ArticleView' => array(
 + *   $wgPoolCounterConf = [ 'ArticleView' => [
   *     'class' => 'PoolCounter_Client',
   *     'timeout' => 15, // wait timeout in seconds
   *     'workers' => 5, // maximum number of active threads in each pool
   *     'maxqueue' => 50, // maximum number of total threads in each pool
   *     ... any extension-specific options...
 - *   );
 + *   ];
   * @endcode
   */
  $wgPoolCounterConf = null;
@@@ -8261,11 -8290,11 +8264,11 @@@ $wgPageLanguageUseDB = false
   *
   * Example config for Parsoid:
   *
 - *   $wgVirtualRestConfig['modules']['parsoid'] = array(
 + *   $wgVirtualRestConfig['modules']['parsoid'] = [
   *     'url' => 'http://localhost:8000',
   *     'prefix' => 'enwiki',
   *     'domain' => 'en.wikipedia.org',
 - *   );
 + *   ];
   *
   * @var array
   * @since 1.25
@@@ -45,6 -45,16 +45,16 @@@ div.gallerytext 
        word-wrap: break-word;
  }
  
+ .galleryfilename {
+       display: block;
+ }
+ .galleryfilename-truncate {
+       white-space: nowrap;
+       overflow: hidden;
+       text-overflow: ellipsis;
+ }
  /* new gallery stuff */
  ul.mw-gallery-nolines li.gallerybox div.thumb {
        background-color: transparent;
@@@ -90,83 -100,12 +100,83 @@@ ul.mw-gallery-packed-hover li.gallerybo
        bottom: 0;
        left: 0; /* Needed for IE */
        height: auto;
 +      max-height: 40%;
 +      overflow: hidden;
        font-weight: bold;
        margin: 2px; /* correspond to style on div.thumb */
  }
  
 +ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper p,
 +ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper p,
 +ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper p {
 +      text-overflow: ellipsis;
 +      white-space: nowrap;
 +      overflow: hidden;
 +}
 +
 +ul.mw-gallery-packed-hover li.gallerybox div.gallerytextwrapper:hover,
 +ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper:hover,
 +ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper:hover {
 +      overflow: visible;
 +      max-height: none;
 +}
 +
 +ul.mw-gallery-packed-hover li.gallerybox div.gallerytextwrapper:hover p,
 +ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper:hover p,
 +ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper:hover p {
 +      text-overflow: clip;
 +      white-space: normal;
 +      overflow: visible;
 +}
 +
  ul.mw-gallery-packed-hover,
  ul.mw-gallery-packed-overlay,
  ul.mw-gallery-packed {
        text-align: center;
  }
- }
 +
 +/* Slideshow */
 +ul.gallery.mw-gallery-slideshow {
 +      display: block;
 +      margin: 4em 0;
 +}
 +
 +ul.gallery.mw-gallery-slideshow .gallerycaption {
 +      font-size: 1.3em;
 +      margin: 0;
 +}
 +
 +ul.gallery.mw-gallery-slideshow .gallerycarousel.mw-gallery-slideshow-thumbnails-toggled {
 +      margin-bottom: 1.3em;
 +}
 +
 +ul.gallery.mw-gallery-slideshow .mw-gallery-slideshow-buttons {
 +      opacity: 0.5;
 +      padding: 1.3em 0;
 +}
 +
 +ul.gallery.mw-gallery-slideshow .mw-gallery-slideshow-buttons .oo-ui-buttonElement {
 +      margin: 0 2em;
 +}
 +
 +.mw-gallery-slideshow li.gallerybox.slideshow-current {
 +      background: #efefef;
 +}
 +
 +.mw-gallery-slideshow .gallerybox > div {
 +      max-width: 120px;
 +}
 +
 +ul.mw-gallery-slideshow li.gallerybox div.thumb {
 +      border: none;
 +      background: transparent;
 +}
 +
 +ul.mw-gallery-slideshow li.gallerycarousel {
 +      display: block;
 +      text-align: center;
 +}
 +
 +.mw-gallery-slideshow-img-container a {
 +      display: block;
++}
@@@ -6572,15 -6572,13 +6572,15 @@@ T107652: <ref>s in templates that also 
  
  !! test
  Table with row followed by newlines and table heading
 +!! options
 +parsoid=wt2html,html2html
  !! wikitext
  {|
  |-
  
  ! foo
  |}
 -!! html
 +!! html/*
  <table>
  
  
  
  !! test
  Table with empty line following the start tag
 +!! options
 +parsoid=wt2html,html2html
  !! wikitext
  {|
  
  |-
  | foo
  |}
 -!! html
 +!! html/*
  <table>
  
  
@@@ -7086,9 -7082,8 +7086,9 @@@ parsoid=wt2htm
  </tbody></table>
  !! end
  
 +# T137406: Whitespace in the HTML
  !! test
 -Strip unsupported table tags, but introduce row wikitext as required
 +1. Generate correct wikitext for tables with thead/tbody/tfoot
  !! options
  parsoid=html2wt
  !! html/parsoid
  !! wikitext
  {|
  |+Test
 -
  !Month
  !Savings
 -
  |-
  |January
  |$100
 -
  |-
  |February
  |$80
 -
  |-
  |Sum
  |$180
 -
  |}
  !! html/php+tidy
  <table>
  </table>
  !! end
  
 +# T137406: No whitespace in the HTML
 +!! test
 +2. Generate correct wikitext for tables with thead/tbody/tfoot
 +!! options
 +parsoid=html2wt
 +!! html/parsoid
 +<table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
 +!! wikitext
 +{|
 +!heading
 +|-
 +|foo
 +|}
 +!! end
 +
  !! test
  Testing serialization after deletion in references
  !! options
@@@ -8350,6 -8335,8 +8350,6 @@@ parsoid=wt2html,wt2wt,html2htm
  
  !! test
  Interlanguage link
 -!! options
 -parsoid=wt2html,wt2wt,html2html
  !! wikitext
  Blah blah blah
  [[zh:Chinese]]
@@@ -8378,6 -8365,8 +8378,6 @@@ Blah blah bla
  
  !! test
  Double interlanguage link
 -!! options
 -parsoid=wt2html,wt2wt,html2html
  !! wikitext
  Blah blah blah
  [[es:Spanish]]
@@@ -11024,7 -11013,7 +11024,7 @@@ int keyword - non-existing messag
  !! wikitext
  {{int:var}}
  !! html
 -<p>&lt;var&gt;
 +<p>⧼var⧽
  </p>
  !! end
  
@@@ -18827,7 -18816,7 +18827,7 @@@ File:Foobar.jp
                <li class="gallerybox" style="width: 155px"><div style="width: 155px">
                        <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
                        <div class="gallerytext">
- <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
+ <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
  caption
  </p>
                        </div>
                <li class="gallerybox" style="width: 155px"><div style="width: 155px">
                        <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
                        <div class="gallerytext">
- <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
+ <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
  </p>
                        </div>
                </div></li>
                <li class="gallerybox" style="width: 155px"><div style="width: 155px">
                        <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
                        <div class="gallerytext">
- <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
+ <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
  some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
  </p>
                        </div>
                <li class="gallerybox" style="width: 155px"><div style="width: 155px">
                        <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
                        <div class="gallerytext">
- <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
+ <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
  </p>
                        </div>
                </div></li>
@@@ -23176,12 -23165,14 +23176,12 @@@ Tables: 2c. Nested in td -- no escapin
  parsoid=html2wt
  !! html/*
  <table>
 -
  <tr>
  <td>foo!!bar
  </td></tr></table>
  
  !! wikitext
  {|
 -
  |foo!!bar
  |}
  !! end
@@@ -23192,12 -23183,14 +23192,12 @@@ Tables: 3a. Nested in t
  parsoid=html2wt
  !! html/*
  <table>
 -
  <tr>
  <th>foo!bar
  </th></tr></table>
  
  !! wikitext
  {|
 -
  !foo!bar
  |}
  !! end
@@@ -23264,6 -23257,7 +23264,6 @@@ Tables: 4a. Escape 
  parsoid=html2wt
  !! html/*
  <table>
 -
  <tr>
  <th>-bar
  </th></tr>
  
  !! wikitext
  {|
 -
  !-bar
 -
  |-
  |<nowiki>-bar</nowiki>
  |}
@@@ -23285,6 -23281,7 +23285,6 @@@ Tables: 4b. Escape 
  parsoid=html2wt
  !! html/*
  <table>
 -
  <tr>
  <th>+bar
  </th></tr>
  
  !! wikitext
  {|
 -
  !+bar
 -
  |-
  |<nowiki>+bar</nowiki>
  |}
@@@ -27075,8 -27074,8 +27075,8 @@@ Empty LI (T49673
  !! html/php+tidy
  <ul>
  <li>a</li>
 -<li class="mw-empty-li"></li>
 -<li class="mw-empty-li"></li>
 +<li class="mw-empty-elt"></li>
 +<li class="mw-empty-elt"></li>
  <li>b</li>
  </ul>
  !! end