lhc/web/wiklou.git
5 years agoPopulate 1.31 rc.0 -> rc.2 release notes
Reedy [Tue, 5 Jun 2018 21:40:41 +0000 (21:40 +0000)]
Populate 1.31 rc.0 -> rc.2 release notes

Change-Id: I15fa23e881c0e177d12a6f6374bc08af3b197435

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 5 Jun 2018 19:55:47 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I6dec7f28bdbcee3b2de48f7ce2c584db45aea730

5 years agoMerge "Introduce ApiMaxLagInfo hook"
jenkins-bot [Tue, 5 Jun 2018 18:01:49 +0000 (18:01 +0000)]
Merge "Introduce ApiMaxLagInfo hook"

5 years agoIntroduce ApiMaxLagInfo hook
Amir Sarabadani [Thu, 31 May 2018 14:03:47 +0000 (16:03 +0200)]
Introduce ApiMaxLagInfo hook

This will be useful when an extension does something expensive and wants to
make sure users don't put too much pressure on the system.

Bug: T194950
Change-Id: I8a396d07c2d5764a680d0e5536cd1f99edbe141e

5 years agoMerge "Avoid recreating ar_revid index after it's replaced by ar_revid_uniq"
jenkins-bot [Tue, 5 Jun 2018 16:39:00 +0000 (16:39 +0000)]
Merge "Avoid recreating ar_revid index after it's replaced by ar_revid_uniq"

5 years agoMerge "objectcache: update MemcachedPeclBagOStuff for pecl memcached 3.0.0"
jenkins-bot [Tue, 5 Jun 2018 15:50:29 +0000 (15:50 +0000)]
Merge "objectcache: update MemcachedPeclBagOStuff for pecl memcached 3.0.0"

5 years agoAvoid recreating ar_revid index after it's replaced by ar_revid_uniq
Brad Jorsch [Mon, 4 Jun 2018 15:35:35 +0000 (11:35 -0400)]
Avoid recreating ar_revid index after it's replaced by ar_revid_uniq

Bug: T193180
Change-Id: I274e33de0a348c0ee42b08b349272db7e2151647

5 years agoMerge "ExternalUserNames: Update partly incomplete documentation"
jenkins-bot [Tue, 5 Jun 2018 13:56:00 +0000 (13:56 +0000)]
Merge "ExternalUserNames: Update partly incomplete documentation"

5 years agoExternalUserNames: Update partly incomplete documentation
Thiemo Kreuz [Tue, 5 Jun 2018 11:50:26 +0000 (13:50 +0200)]
ExternalUserNames: Update partly incomplete documentation

Bug: T192376
Change-Id: Iae9c537a82046e26cbe5d1703bfe428a38a91f10

5 years agoMerge "resourceloader: Remove support for Module::getModifiedTime() and getModifiedHa...
jenkins-bot [Tue, 5 Jun 2018 02:31:14 +0000 (02:31 +0000)]
Merge "resourceloader: Remove support for Module::getModifiedTime() and getModifiedHash()"

5 years agoMerge "clientpool: refactor Redis authentication error handling"
jenkins-bot [Tue, 5 Jun 2018 02:05:03 +0000 (02:05 +0000)]
Merge "clientpool: refactor Redis authentication error handling"

5 years agoMerge "RCFilters: Add an opt-out preference for filters on watchlist"
jenkins-bot [Tue, 5 Jun 2018 01:39:49 +0000 (01:39 +0000)]
Merge "RCFilters: Add an opt-out preference for filters on watchlist"

5 years agoSync RELEASE-NOTES-1.31 with REL1_31'
Kunal Mehta [Mon, 4 Jun 2018 22:09:05 +0000 (15:09 -0700)]
Sync RELEASE-NOTES-1.31 with REL1_31'

Follows-up 0e7353831e9, which accidentally removed the
pre-upgrade section.

Follows-up Ia4b29611ccee4acac which was landed
in master before the branch cut.

Change-Id: I2a38e79b8dbe173ff99797a87b7aa5193a03212e

5 years agoresourceloader: Remove support for Module::getModifiedTime() and getModifiedHash()
Timo Tijhof [Tue, 5 Jun 2018 00:56:54 +0000 (01:56 +0100)]
resourceloader: Remove support for Module::getModifiedTime() and getModifiedHash()

Deprecated since 1.26. No subclasses in Wikimedia Git define these methods,
no calls to methods by this name in Wikimedia Git.

If a module subclass were to still define such a method, it is simply
not called anymore. The version hash system introduced in 1.26 will
still invalidate modules based on wgCacheEpoch.

Bug: T94074
Change-Id: I65b2a625a30f22c8a9d14a3505605546fa5bab83

5 years agoMerge "Begin introducing PHP 5.6 variadic parameters where appropriate"
jenkins-bot [Mon, 4 Jun 2018 23:45:53 +0000 (23:45 +0000)]
Merge "Begin introducing PHP 5.6 variadic parameters where appropriate"

5 years agoMerge "rdbms: include client ID hash in ChronologyProtector cookies"
jenkins-bot [Mon, 4 Jun 2018 22:08:21 +0000 (22:08 +0000)]
Merge "rdbms: include client ID hash in ChronologyProtector cookies"

5 years agoMerge "makeCollapsible: Reduce duplicate code for adding eventhandlers"
jenkins-bot [Mon, 4 Jun 2018 21:40:38 +0000 (21:40 +0000)]
Merge "makeCollapsible: Reduce duplicate code for adding eventhandlers"

5 years agoDeprecate $wgDBmysql5
Kunal Mehta [Mon, 4 Jun 2018 20:35:06 +0000 (13:35 -0700)]
Deprecate $wgDBmysql5

Bug: T196185
Change-Id: Iea74b5dd1fc49c911dcc0070604f05100e56ce0d

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 4 Jun 2018 20:28:16 +0000 (22:28 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie0a45d76ed84797881c62ffcea29ba698df924c9

5 years agomakeCollapsible: Reduce duplicate code for adding eventhandlers
Derk-Jan Hartman [Sat, 2 Jun 2018 21:46:48 +0000 (23:46 +0200)]
makeCollapsible: Reduce duplicate code for adding eventhandlers

Change-Id: I3d15ef24f8a3fafb05f2d9ed614e29baa6555bde

5 years agoBegin introducing PHP 5.6 variadic parameters where appropriate
Max Semenik [Thu, 19 Apr 2018 21:11:28 +0000 (14:11 -0700)]
Begin introducing PHP 5.6 variadic parameters where appropriate

Change-Id: I5670b8482e8d3bcb0b3a2b4d2ce9834cfc37e171

5 years agoMerge "Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals (part 2)"
jenkins-bot [Mon, 4 Jun 2018 18:42:43 +0000 (18:42 +0000)]
Merge "Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals (part 2)"

5 years agoMerge "Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals"
jenkins-bot [Mon, 4 Jun 2018 18:37:31 +0000 (18:37 +0000)]
Merge "Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals"

5 years agoMerge "build: Updating mediawiki/mediawiki-codesniffer to 20.0.0"
jenkins-bot [Mon, 4 Jun 2018 18:31:28 +0000 (18:31 +0000)]
Merge "build: Updating mediawiki/mediawiki-codesniffer to 20.0.0"

5 years agoRestore section IDs on Special:EditWatchlist
Ed Sanders [Mon, 4 Jun 2018 16:50:02 +0000 (17:50 +0100)]
Restore section IDs on Special:EditWatchlist

Bug: T194503
Change-Id: Iaa14a882ab1ca0b56ff964d125962ab8a5d91cb5

5 years agoUse PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals (part 2)
Bartosz Dziewoński [Mon, 8 Jan 2018 22:18:00 +0000 (23:18 +0100)]
Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals (part 2)

This is a follow-up to Idc3dee3a7fb5ebfaef395754d8859b18f1f8769a
containing some less trivial changes.

Change-Id: Ia7af2c1d000307d43278cde4a246df413d4ef263

5 years agoUse PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals
Bartosz Dziewoński [Sat, 7 Oct 2017 00:26:23 +0000 (02:26 +0200)]
Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals

In cases where we're operating on text data (and not binary data),
use e.g. "\u{00A0}" to refer directly to the Unicode character
'NO-BREAK SPACE' instead of "\xc2\xa0" to specify the bytes C2h A0h
(which correspond to the UTF-8 encoding of that character). This
makes it easier to look up those mysterious sequences, as not all
are as recognizable as the no-break space.

This is not enforced by PHP, but I think we should write those in
uppercase and zero-padded to at least four characters, like the
Unicode standard does.

Note that not all "\xNN" escapes can be automatically replaced:
* We can't use Unicode escapes for binary data that is not UTF-8
  (e.g. in code converting from legacy encodings or testing the
  handling of invalid UTF-8 byte sequences).
* '\xNN' escapes in regular expressions in single-quoted strings
  are actually handled by PCRE and have to be dealt with carefully
  (those regexps should probably be changed to use the /u modifier).
* "\xNN" referring to ASCII characters ("\x7F" and lower) should
  probably be left as-is.

The replacements in this commit were done semi-manually by piping
the existing "\xNN" escapes through the following terrible Ruby
script I devised:

  chars = eval('"' + ARGV[0] + '"').force_encoding('utf-8')
  puts chars.split('').map{|char|
    '\\u{' + char.ord.to_s(16).upcase.rjust(4, '0') + '}'
  }.join('')

Change-Id: Idc3dee3a7fb5ebfaef395754d8859b18f1f8769a

5 years agobuild: Updating mediawiki/mediawiki-codesniffer to 20.0.0
James D. Forrester [Sat, 2 Jun 2018 22:38:38 +0000 (15:38 -0700)]
build: Updating mediawiki/mediawiki-codesniffer to 20.0.0

Disable MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam and
MediaWiki.Commenting.PhpunitAnnotations.NotClassTrait for now, and
whitelist all failing files MediaWiki.Usage.ForbiddenFunctions.*.

Change-Id: Ib55ba3a70a1f922662c94895ab59eb02830faf3e

5 years agoMerge "Make archive.ar_rev_id unique"
jenkins-bot [Mon, 4 Jun 2018 14:41:34 +0000 (14:41 +0000)]
Merge "Make archive.ar_rev_id unique"

5 years agoMerge "Make cleanupSpam.php query for http and https"
jenkins-bot [Mon, 4 Jun 2018 08:58:36 +0000 (08:58 +0000)]
Merge "Make cleanupSpam.php query for http and https"

5 years agoMake archive.ar_rev_id unique
Brad Jorsch [Fri, 27 Apr 2018 17:11:01 +0000 (13:11 -0400)]
Make archive.ar_rev_id unique

To follow up I39b0825c, this change replaces the existing non-unique
index on the column with a unique index, to help avoid some of these
sort of bugs in the future.

Bug: T193180
Change-Id: I932478c9c6a13210bc9dff75286d0f08da56682c

5 years agoMerge "Remove outdated comment"
Fomafix [Mon, 4 Jun 2018 05:52:26 +0000 (05:52 +0000)]
Merge "Remove outdated comment"

5 years agoMake cleanupSpam.php query for http and https
Reedy [Mon, 12 Feb 2018 11:30:32 +0000 (11:30 +0000)]
Make cleanupSpam.php query for http and https

Bug: T186795
Change-Id: I9e350306f85d3d3ca4daba626e49a0792605acc7

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 3 Jun 2018 19:53:40 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I8b7bbd573c2cc2a9e6499fd372443b2b67f0cb8c

5 years agoRemove outdated comment
Fomafix [Sun, 3 Jun 2018 08:25:59 +0000 (10:25 +0200)]
Remove outdated comment

The comment was added in 39273d2c (r38161) 10 years ago and is outdated
since 90f4db81.

Change-Id: I09069679a1aa60d3e54aec35a3961275ea253f34

5 years agoMerge "Record a log entry on page creation"
jenkins-bot [Sun, 3 Jun 2018 07:43:34 +0000 (07:43 +0000)]
Merge "Record a log entry on page creation"

5 years agoobjectcache: update MemcachedPeclBagOStuff for pecl memcached 3.0.0
Aaron Schulz [Thu, 31 May 2018 21:41:02 +0000 (14:41 -0700)]
objectcache: update MemcachedPeclBagOStuff for pecl memcached 3.0.0

The get() $cas_token parameter was changed into $flags, which can act
as a switch to make the return value an associative array of details.

pecl and PHP-based memcached BagOStuff class both pass all tests now.

Bug: T196125
Change-Id: I4678250331a48db4d50d1fc6c489c991a4dee920

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 2 Jun 2018 20:26:03 +0000 (22:26 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Iccda6c6d7b123642f366c37440486b9132357286

5 years agoMerge "Add language support for Batak Mandailing (btm)"
jenkins-bot [Sat, 2 Jun 2018 12:23:26 +0000 (12:23 +0000)]
Merge "Add language support for Batak Mandailing (btm)"

5 years agordbms: include client ID hash in ChronologyProtector cookies
Aaron Schulz [Fri, 25 May 2018 07:04:23 +0000 (00:04 -0700)]
rdbms: include client ID hash in ChronologyProtector cookies

Previously, if an internal service forwarded the cookies for a
user (e.g. for permissions) but not the User-Agent header or not
the IP address (e.g. XFF), ChronologyProtector could timeout
waiting for a matching writeIndex to appear for the wrong key.

The cookie now tethers the client to the key that holds the
DB positions from their last state-changing request.

Bug: T194403
Bug: T190082
Change-Id: I84f2cbea82532d911cdfed14644008894498813a

5 years agoMerge "objectcache: make RedisBagOStuff pass all tests"
jenkins-bot [Sat, 2 Jun 2018 01:35:26 +0000 (01:35 +0000)]
Merge "objectcache: make RedisBagOStuff pass all tests"

5 years agoMerge "installer: Don't allow setting $wgDBmysql5"
jenkins-bot [Fri, 1 Jun 2018 21:35:49 +0000 (21:35 +0000)]
Merge "installer: Don't allow setting $wgDBmysql5"

5 years agoMerge "installer: Hide binary/utf-8 charset option from users"
jenkins-bot [Fri, 1 Jun 2018 21:25:58 +0000 (21:25 +0000)]
Merge "installer: Hide binary/utf-8 charset option from users"

5 years agoMerge "rcfilters: Stop the "Live updates" button animation from affecting text rendering"
jenkins-bot [Fri, 1 Jun 2018 20:20:29 +0000 (20:20 +0000)]
Merge "rcfilters: Stop the "Live updates" button animation from affecting text rendering"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 1 Jun 2018 19:54:03 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I31d331db53d5f1425541930dbff6f7b28ba470f7

5 years agoinstaller: Don't allow setting $wgDBmysql5
Kunal Mehta [Fri, 1 Jun 2018 18:57:36 +0000 (11:57 -0700)]
installer: Don't allow setting $wgDBmysql5

It was possible to pass --dbmysql5 to the command line installer to
enable this experimental option. This removes that ability, and removes
setting of $wgDBmysql5 in the generated LocalSettings.php, so new
installs will fallback to the default of false.

Bug: T196185
Change-Id: Id5ff69f493d14cf7b16157f729fbe4f4b4e2e8c8

5 years agoMerge "objectcache: add setMockTime() method to BagOStuff/WANObjectCache"
jenkins-bot [Fri, 1 Jun 2018 13:19:24 +0000 (13:19 +0000)]
Merge "objectcache: add setMockTime() method to BagOStuff/WANObjectCache"

5 years agoAdd language support for Batak Mandailing (btm)
MarcoAurelio [Fri, 1 Jun 2018 10:08:11 +0000 (12:08 +0200)]
Add language support for Batak Mandailing (btm)

Bug: T195940
Change-Id: I488b5aea8d33c17ee801a59963ceced13c944ee4

5 years agoMerge "Kill non namespaced ScopedCallback"
jenkins-bot [Fri, 1 Jun 2018 04:35:22 +0000 (04:35 +0000)]
Merge "Kill non namespaced ScopedCallback"

5 years agoobjectcache: add setMockTime() method to BagOStuff/WANObjectCache
Aaron Schulz [Thu, 31 May 2018 06:14:09 +0000 (23:14 -0700)]
objectcache: add setMockTime() method to BagOStuff/WANObjectCache

Change-Id: I3e5760814fb7dbe628eb0d979d690c3275fc3c15

5 years agoobjectcache: make RedisBagOStuff pass all tests
Aaron Schulz [Thu, 31 May 2018 20:41:48 +0000 (13:41 -0700)]
objectcache: make RedisBagOStuff pass all tests

* Provide a default lock-based BagOStuff::cas implementation
* Make RedisBagOStuff::merge() use mergeViaCas()
* Use the raw unserialized string as the redis CAS token to
  avoid any bad interaction with __wakeup() methods changing
  field values every time
* Make RedisBagOStuff::incr() return false when there is no
  such key, not null
* Rewrite merge() test to make the order of write/cas phase
  of the parent and child merge() calls well defined instead
  of arbitrary usleep() calls
* Avoid cache key reuse in test runs

Change-Id: I388ec173cf3858bb2fc7a8c8a00cda68703074ce

5 years agoUse wikimedia/xmp-reader library
Kunal Mehta [Fri, 1 Jun 2018 02:14:06 +0000 (19:14 -0700)]
Use wikimedia/xmp-reader library

Bug: T100922
Depends-On: I9bec4e03c49baafda30fb44cc793fa31b36e400d
Change-Id: Ic9044bf3260d1a474a6c74844949602441ffc865

5 years agoKill non namespaced ScopedCallback
Reedy [Thu, 31 May 2018 23:30:07 +0000 (00:30 +0100)]
Kill non namespaced ScopedCallback

Change-Id: I94d14e4bf60c6f3b2c359ac8da61b783f8375bd0

5 years agoUpgrade wikimedia/scoped-callback to 2.0.0
Kunal Mehta [Thu, 31 May 2018 23:14:24 +0000 (16:14 -0700)]
Upgrade wikimedia/scoped-callback to 2.0.0

Depends-On: Ieae6ba7239fd8beedfd9d3061c7dfaf97df301ed
Change-Id: Ibda68b7183cd1e4b222a7823b11a4e7e62e54953

5 years agoclientpool: refactor Redis authentication error handling
Alexia E. Smith [Fri, 21 Oct 2016 16:17:50 +0000 (11:17 -0500)]
clientpool: refactor Redis authentication error handling

Wrap method calls with a try-catch handler.

Also:
* Fixed blpop/brpop/brpoplpush timeout parameter.
* Fixed blpop/brpop/brpoplpush clobbering infinite timeouts.
* Redis scan functions require iterator passed by reference.

Bug: T191927
Change-Id: I1f827ab23c8d289d000090dbdd62a10467c4afed

5 years agoMerge "Use makeLink instead of makeKnownLink on Special:WhatLinksHere"
jenkins-bot [Thu, 31 May 2018 21:39:10 +0000 (21:39 +0000)]
Merge "Use makeLink instead of makeKnownLink on Special:WhatLinksHere"

5 years agoMerge "Make linkshere-related messages backward compatible"
jenkins-bot [Thu, 31 May 2018 21:39:07 +0000 (21:39 +0000)]
Merge "Make linkshere-related messages backward compatible"

5 years agoMerge "Remove renamed .inc files from phan config"
jenkins-bot [Thu, 31 May 2018 21:39:04 +0000 (21:39 +0000)]
Merge "Remove renamed .inc files from phan config"

5 years agoUse makeLink instead of makeKnownLink on Special:WhatLinksHere
Daimona Eaytoy [Wed, 30 May 2018 15:35:02 +0000 (17:35 +0200)]
Use makeLink instead of makeKnownLink on Special:WhatLinksHere

Per I11e663cbce32b4199f16df6ed1e9b980630ece7a, makeKnownLink is used for
"linkshere" related messages. However, it always shows a blue link, even
if the page doesn't exist. Instead, use makeLink to get the old
behaviour back.

Bug: T195933
Change-Id: I92ad23dc7bd064a1a95a14f19cd3f134b4c98570

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 31 May 2018 19:53:46 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Idb5f51f8339fd3774d0090a5be5660356d5bdc84

5 years agoMerge "Follow-up If8dfdaf1, I1c5eee3f: Don't assume INTL_ICU_VERSION exists on Specia...
jenkins-bot [Thu, 31 May 2018 19:48:17 +0000 (19:48 +0000)]
Merge "Follow-up If8dfdaf1, I1c5eee3f: Don't assume INTL_ICU_VERSION exists on Special:Version"

5 years agoFollow-up If8dfdaf1, I1c5eee3f: Don't assume INTL_ICU_VERSION exists on Special:Version
James D. Forrester [Thu, 31 May 2018 19:25:08 +0000 (12:25 -0700)]
Follow-up If8dfdaf1, I1c5eee3f: Don't assume INTL_ICU_VERSION exists on Special:Version

Change-Id: Ib0d3d33d74c70949769a0bda9e3901be3d197d1d

5 years agoMerge "Use PHP7 constant expression instead of a magic number"
jenkins-bot [Thu, 31 May 2018 19:21:32 +0000 (19:21 +0000)]
Merge "Use PHP7 constant expression instead of a magic number"

5 years agoMerge "Exit maintenance script with non-zero status if execute() returns false"
jenkins-bot [Thu, 31 May 2018 19:01:39 +0000 (19:01 +0000)]
Merge "Exit maintenance script with non-zero status if execute() returns false"

5 years agoMerge "Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient"
jenkins-bot [Thu, 31 May 2018 19:01:07 +0000 (19:01 +0000)]
Merge "Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient"

5 years agoMerge "Use PHP 7 '<=>' operator in 'sort()' callbacks"
jenkins-bot [Thu, 31 May 2018 18:48:34 +0000 (18:48 +0000)]
Merge "Use PHP 7 '<=>' operator in 'sort()' callbacks"

5 years agoinstaller: Hide binary/utf-8 charset option from users
Kunal Mehta [Thu, 31 May 2018 18:29:19 +0000 (11:29 -0700)]
installer: Hide binary/utf-8 charset option from users

This is still used internally for the preUpgrade() checks that see if
the user has an existing table using the utf8 charset, but hide it from
users so they don't accidentally pick utf8.

Bug: T196092
Change-Id: Iaace2e5bf9df7563e1d233496366c95b3f1faf16

5 years agoRevert "Strip soft hyphens (U+00AD) from title"
Jforrester [Thu, 31 May 2018 17:33:31 +0000 (17:33 +0000)]
Revert "Strip soft hyphens (U+00AD) from title"

This reverts commit 6b8a5a137d3f449b4056e3de82fa6747b45f1f9a.

Change-Id: Ica5abe69c316792aa2f7eafad9b1d63183b282a8

5 years agoRevert "Strip Unicode 6.3.0 directional formatting characters from title"
Jforrester [Thu, 31 May 2018 17:33:46 +0000 (17:33 +0000)]
Revert "Strip Unicode 6.3.0 directional formatting characters from title"

This reverts commit 7564624d1ca80a4d2f1cc2b4d3d32d5d2e0bca38.

Change-Id: I5d596f8f3c784920829de6ae50b270b0396369e0

5 years agoRCFilters: Add an opt-out preference for filters on watchlist
Roan Kattouw [Thu, 31 May 2018 02:25:17 +0000 (19:25 -0700)]
RCFilters: Add an opt-out preference for filters on watchlist

And a temporary feature flag so we can roll it out in stages.

Bug: T195431
Change-Id: I170840146a197ac381df94434350ae2f0561d147

5 years agoRemove renamed .inc files from phan config
Umherirrender [Thu, 31 May 2018 16:44:51 +0000 (18:44 +0200)]
Remove renamed .inc files from phan config

Follow-Up: Ic441087702376b1ca0e70554c71cdf7ecad908af (for userOptions.inc)
Follow-Up: I999f5842625c752f01c1eb4b012431c4a24ce7ce (for importImages.inc)
Change-Id: I3e1c694f61960e9e4b50a7855927d039e93928fb

5 years agoMerge "Maintenance script to wrap the mysql binary"
jenkins-bot [Thu, 31 May 2018 16:16:19 +0000 (16:16 +0000)]
Merge "Maintenance script to wrap the mysql binary"

5 years agoRemove deprecated global $parserMemc and wfGetParserCacheStorage
Timo Tijhof [Thu, 31 May 2018 13:28:42 +0000 (14:28 +0100)]
Remove deprecated global $parserMemc and wfGetParserCacheStorage

Deprecated since 1.30, no longer used in core, bundled components,
and WMF-deployed extensions.

Change-Id: I09715f94750f083712719ef599a2ea4260297681

5 years agodocs: Update for deprecated $parserMemc
Timo Tijhof [Thu, 31 May 2018 13:25:13 +0000 (14:25 +0100)]
docs: Update for deprecated $parserMemc

Remove mention of this deprecated global in favour of documenting
the backend configuration instead.

Also update the outdated docs for where the sidebar is cached,
which was changed a while ago to use WANObjectCache instead.
See Skin::buildSidebar().

Change-Id: I3d34a760cc05cab6fe7ddd8684257d6ec6b49309

5 years agoMake linkshere-related messages backward compatible
Daimona Eaytoy [Wed, 30 May 2018 15:16:36 +0000 (17:16 +0200)]
Make linkshere-related messages backward compatible

With I11e663cbce32b4199f16df6ed1e9b980630ece7a we changed message
parsing and message name, which broke some customized messages where $1
was used for various purposed as the page title. This patch shifts
message parameters so to still pass plain title as $1 while keeping HTML
link as $2. This won't change parsing method (still HTML since we use an
HTML link), nor message key (still with "-2") due to different parsing
method.

Bug: T189860
Change-Id: I68a8639a61237c67deb61aefd5360dea3cced6cd

5 years agoMerge "Update OOUI to v0.27.1"
jenkins-bot [Thu, 31 May 2018 08:48:56 +0000 (08:48 +0000)]
Merge "Update OOUI to v0.27.1"

5 years agoMerge "registration: Initialize PSR-4 namespaces at same stage as normal autoloader"
jenkins-bot [Thu, 31 May 2018 07:39:04 +0000 (07:39 +0000)]
Merge "registration: Initialize PSR-4 namespaces at same stage as normal autoloader"

5 years agoExit maintenance script with non-zero status if execute() returns false
Tim Starling [Sun, 20 May 2018 14:26:46 +0000 (16:26 +0200)]
Exit maintenance script with non-zero status if execute() returns false

There's a whole lot of shutdown code in doMaintenance.php that is
skipped when you use exit() directly. In HHVM by default, destructors
are not even called.

There are a few cases where maintenance scripts want to do something after
doMaintenance.php returns, so returning null should continue to mean no exit.

Change-Id: I0891e2ee3af7ef2c64c03b70edcf9e281ce1e7ba

5 years agoMaintenance script to wrap the mysql binary
Tim Starling [Sun, 20 May 2018 14:50:41 +0000 (16:50 +0200)]
Maintenance script to wrap the mysql binary

This is more or less equivalent to the WMF shell script "sql", but it is
reasonably portable and written in a less hackish way.

Change-Id: I240d8d4e65ce46680cac257ee376a9b026c13f92

5 years agoUse PHP7 constant expression instead of a magic number
Max Semenik [Thu, 31 May 2018 02:30:29 +0000 (19:30 -0700)]
Use PHP7 constant expression instead of a magic number

Change-Id: I84e13dc6019c429359df3395f0731d17859be06c

5 years agoMerge "Remove workaround for PHP bug 66021 (PHP < 5.5.12)"
jenkins-bot [Thu, 31 May 2018 02:28:30 +0000 (02:28 +0000)]
Merge "Remove workaround for PHP bug 66021 (PHP < 5.5.12)"

5 years agoMerge "PhpHttpRequest: Drop back-compat code for PHP 5.5 and before"
jenkins-bot [Thu, 31 May 2018 02:07:40 +0000 (02:07 +0000)]
Merge "PhpHttpRequest: Drop back-compat code for PHP 5.5 and before"

5 years agoMerge "PHPSessionHandler: Drop now-pointless return methods for PHP5 compat."
jenkins-bot [Thu, 31 May 2018 02:04:59 +0000 (02:04 +0000)]
Merge "PHPSessionHandler: Drop now-pointless return methods for PHP5 compat."

5 years agoMerge "Use PHP 5.6 '**' operator instead of 'pow()' function"
jenkins-bot [Thu, 31 May 2018 01:42:32 +0000 (01:42 +0000)]
Merge "Use PHP 5.6 '**' operator instead of 'pow()' function"

5 years agoMerge "Use PHP 5.6 constant expressions for some bitfield constants"
jenkins-bot [Thu, 31 May 2018 01:33:59 +0000 (01:33 +0000)]
Merge "Use PHP 5.6 constant expressions for some bitfield constants"

5 years agoMerge "Add a simple .editorconfig"
jenkins-bot [Thu, 31 May 2018 01:33:56 +0000 (01:33 +0000)]
Merge "Add a simple .editorconfig"

5 years agoRemove workaround for PHP bug 66021 (PHP < 5.5.12)
Fomafix [Sun, 16 Apr 2017 21:32:02 +0000 (23:32 +0200)]
Remove workaround for PHP bug 66021 (PHP < 5.5.12)

The PHP bug 66021 <https://bugs.php.net/bug.php?id=66021> was fixed by
https://github.com/php/php-src/pull/518 and is included in PHP 5.4.28+
and PHP 5.5.12+.
This workaround is not necessary anymore because the minimum PHP
version for MediaWiki is 7.0.0+.

Change-Id: I801eaffc253fd88e0d3c87cfe97777837bd3902d

5 years agoUse PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
Bartosz Dziewoński [Fri, 6 Oct 2017 22:17:58 +0000 (00:17 +0200)]
Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient

Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '

(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)

Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).

Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf

5 years agoUse PHP 7 '<=>' operator in 'sort()' callbacks
Bartosz Dziewoński [Fri, 6 Oct 2017 20:39:13 +0000 (22:39 +0200)]
Use PHP 7 '<=>' operator in 'sort()' callbacks

`$a <=> $b` returns `-1` if `$a` is lesser, `1` if `$b` is lesser,
and `0` if they are equal, which are exactly the values 'sort()'
callbacks are supposed to return.

It also enables the neat idiom `$a[x] <=> $b[x] ?: $a[y] <=> $b[y]`
to sort arrays of objects first by 'x', and by 'y' if they are equal.

* Replace a common pattern like `return $a < $b ? -1 : 1` with the
  new operator (and similar patterns with the variables, the numbers
  or the comparison inverted). Some of the uses were previously not
  correctly handling the variables being equal; this is now
  automatically fixed.
* Also replace `return $a - $b`, which is equivalent to `return
  $a <=> $b` if both variables are integers but less intuitive.
* (Do not replace `return strcmp( $a, $b )`. It is also equivalent
  when both variables are strings, but if any of the variables is not,
  'strcmp()' converts it to a string before comparison, which could
  give different results than '<=>', so changing this would require
  careful review and isn't worth it.)
* Also replace `return $a > $b`, which presumably sort of works most
  of the time (returns `1` if `$b` is lesser, and `0` if they are
  equal or `$a` is lesser) but is erroneous.

Change-Id: I19a3d2fc8fcdb208c10330bd7a42c4e05d7f5cf3

5 years agoUse PHP 5.6 '**' operator instead of 'pow()' function
Bartosz Dziewoński [Fri, 6 Oct 2017 19:17:52 +0000 (21:17 +0200)]
Use PHP 5.6 '**' operator instead of 'pow()' function

Change-Id: Ieb22e1dbfcffaa4e7b3dcfabbcc999e5dd59a4bf

5 years agoUse PHP 5.6 constant expressions for some bitfield constants
Bartosz Dziewoński [Fri, 6 Oct 2017 19:10:53 +0000 (21:10 +0200)]
Use PHP 5.6 constant expressions for some bitfield constants

I searched the entire codebase for 'const' and looked for things
that looked suspiciously like manually calculated bitfield unions.
As of PHP 5.6, we can have them calculated automatically when
defining constants.

Change-Id: I7d971d1a63f8916db2f8f6c053c7dd0a13add92d

5 years agoPhpHttpRequest: Drop back-compat code for PHP 5.5 and before
James D. Forrester [Thu, 24 May 2018 20:03:18 +0000 (13:03 -0700)]
PhpHttpRequest: Drop back-compat code for PHP 5.5 and before

Change-Id: Ic2b144e333639dfeff0a86b14e4b4927e9bf6db0

5 years agoPHPSessionHandler: Drop now-pointless return methods for PHP5 compat.
James D. Forrester [Thu, 24 May 2018 18:16:21 +0000 (11:16 -0700)]
PHPSessionHandler: Drop now-pointless return methods for PHP5 compat.

Change-Id: I8c3a4d12a34407f29764adb010f91dc870e715d7

5 years agoMerge "rdbms: make runOnTransactionIdleCallbacks() reset DBO_TRX on exceptions"
jenkins-bot [Wed, 30 May 2018 21:47:27 +0000 (21:47 +0000)]
Merge "rdbms: make runOnTransactionIdleCallbacks() reset DBO_TRX on exceptions"

5 years agorcfilters: Stop the "Live updates" button animation from affecting text rendering
Bartosz Dziewoński [Wed, 30 May 2018 21:25:02 +0000 (23:25 +0200)]
rcfilters: Stop the "Live updates" button animation from affecting text rendering

Add 'z-index: 0' to introduce a stacking context. Stacking contexts
fix everything. Apparently.

In this case, this prevents browsers (tested with Chrome and Firefox)
from using grayscale text antialiasing instead of the usual subpixel
text antialiasing for the rest of the page; it is only used for this
button, which is acceptable.

(Firefox has some problems rendering the animation, but they already
existed before this patch.)

Bug: T181338
Change-Id: I059f819eb27b0f22fc2d09a2c61e5e65af878ed4

5 years agoMerge "Special:Preferences/reset: Always use OOUI not the deprecated vform"
jenkins-bot [Wed, 30 May 2018 20:26:11 +0000 (20:26 +0000)]
Merge "Special:Preferences/reset: Always use OOUI not the deprecated vform"

5 years agoMerge "jquery.lengthLimit: Fix 'cut'/'paste' event handling"
jenkins-bot [Wed, 30 May 2018 20:26:07 +0000 (20:26 +0000)]
Merge "jquery.lengthLimit: Fix 'cut'/'paste' event handling"

5 years agoregistration: Initialize PSR-4 namespaces at same stage as normal autoloader
Antoine Musso [Wed, 30 May 2018 19:02:46 +0000 (21:02 +0200)]
registration: Initialize PSR-4 namespaces at same stage as normal autoloader

readFromQueue() injects the content of AutoloadClasses to
$wgAutoloadClasses however it missed doing the same for
AutoloadNamespaces.

When using the installer with an extension having AutoloadNamespaces
set, its classes would not be found.

Make ExtensionRegistry append to AutoLoader::$psr4Namespaces, and add
a test to cover the new behavior.

Bug: T195783
Change-Id: Id61155867a4ca7d9bc4a347f8671da74b0fa490b

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 30 May 2018 20:05:58 +0000 (22:05 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I74622ed8964fc45ad35223301346fa1533e3f14a

5 years agoMerge "Call Database::timestamp in some tests"
jenkins-bot [Wed, 30 May 2018 19:32:02 +0000 (19:32 +0000)]
Merge "Call Database::timestamp in some tests"