lhc/web/wiklou.git
5 years agoHard deprecate Interwiki static methods
Kunal Mehta [Thu, 7 Jun 2018 18:40:46 +0000 (11:40 -0700)]
Hard deprecate Interwiki static methods

Change-Id: I803df3ef90bf6b602e85ae48f25745f4dc6aab3a

5 years agoMerge "registration: Allow the mtime of extension.json files to be zero"
jenkins-bot [Thu, 7 Jun 2018 18:10:54 +0000 (18:10 +0000)]
Merge "registration: Allow the mtime of extension.json files to be zero"

5 years agoregistration: Allow the mtime of extension.json files to be zero
Ed Schouten [Thu, 7 Jun 2018 12:21:53 +0000 (14:21 +0200)]
registration: Allow the mtime of extension.json files to be zero

When creating Docker images of MediaWiki using the Bazel build system, I
noticed that I'm not able to load any extensions. This is due to the
fact that Bazel always generates container layers with mtimes of files
set to 1970-01-01 for determinism/reproducibility.

Relax the check a bit to only fail when the mtime is false, which
happens when filemtime() fails.

Bug: T196672
Change-Id: Ieaeb3113a7d9c44f29cca2d062c5bb11ebeada0d

5 years agoRestore original OpenSearch namespaces
Lucas Werkmeister [Thu, 7 Jun 2018 16:48:39 +0000 (18:48 +0200)]
Restore original OpenSearch namespaces

Though that URL may no longer resolve, the correct XML namespace for
OpenSearch remains http://a9.com/-/spec/opensearch/1.1/ – see [1] and
[2] for some discussion clarifying this.

Similarly, the canonical namespace URL for MozSearch uses HTTP, not
HTTPS, as can be seen when visiting it (via either protocol) [3].

This reverts commit 3b86cf03c162298211da2f57333bcc645123a979.

[1]: https://github.com/dewitt/opensearch/issues/3
[2]: https://groups.google.com/d/msg/opensearch/8ecuX35-lEs/JR_cs0N6k68J
[3]: https://www.mozilla.org/2006/browser/search/

Bug: T196643
Change-Id: I8d14660550a5c67cefc421a334502963bfd6ed3c

5 years agoMerge "installer: Fix display of UPGRADE by disabling InterwikiLookup"
jenkins-bot [Thu, 7 Jun 2018 16:49:40 +0000 (16:49 +0000)]
Merge "installer: Fix display of UPGRADE by disabling InterwikiLookup"

5 years agoMerge "Add code to write to change_tag_def table"
jenkins-bot [Thu, 7 Jun 2018 16:26:23 +0000 (16:26 +0000)]
Merge "Add code to write to change_tag_def table"

5 years agoMerge "Add getLoginSecurityLevel() support to FormSpecialPage"
jenkins-bot [Thu, 7 Jun 2018 14:50:14 +0000 (14:50 +0000)]
Merge "Add getLoginSecurityLevel() support to FormSpecialPage"

5 years agoMerge "tests: Reset mwuser/pagecontent tables if necessary for postgres"
jenkins-bot [Thu, 7 Jun 2018 14:39:15 +0000 (14:39 +0000)]
Merge "tests: Reset mwuser/pagecontent tables if necessary for postgres"

5 years agoMerge "Introduce per-schema unit tests for revision storage."
jenkins-bot [Thu, 7 Jun 2018 13:47:00 +0000 (13:47 +0000)]
Merge "Introduce per-schema unit tests for revision storage."

5 years agoMerge "Reset relevant DB tables before the first test of a suite."
jenkins-bot [Thu, 7 Jun 2018 13:46:56 +0000 (13:46 +0000)]
Merge "Reset relevant DB tables before the first test of a suite."

5 years agoIntroduce per-schema unit tests for revision storage.
daniel [Mon, 14 May 2018 11:57:43 +0000 (13:57 +0200)]
Introduce per-schema unit tests for revision storage.

This introduces traits for testing different schema variations.
These are not very useful in this patch, but make it much easier
to add tests for MCR schema migration in subsequent patches.

The code in this patch was previously part of If259b1e1c49ceaa4.

Change-Id: I239572f75bebbc9c731a3e3860c4eff179dc15e4

5 years agoReset relevant DB tables before the first test of a suite.
daniel [Thu, 7 Jun 2018 12:36:06 +0000 (14:36 +0200)]
Reset relevant DB tables before the first test of a suite.

MediaWikiTestCase truncates all the tables in the tablesUsed field
after each test. It should also do that before the first test of the
class.

Change-Id: I8c33be7b1bdd83559a9ea7803471a1f39e0eb870

5 years agoMerge "Replace call_user_func_array(), part 1"
jenkins-bot [Thu, 7 Jun 2018 12:11:10 +0000 (12:11 +0000)]
Merge "Replace call_user_func_array(), part 1"

5 years agoresourceloader: move Message methods from mediawiki.js to base module
Aaron Schulz [Wed, 6 Jun 2018 00:13:10 +0000 (17:13 -0700)]
resourceloader: move Message methods from mediawiki.js to base module

Also set "use strict" in the base module.

Bug: T192623
Change-Id: I18a710e167df8be47a70da93a7aba0784fc62aef

5 years agoMerge "Fix UploadBase::checkXMLEncodingMissmatch() on PHP 7.1+"
jenkins-bot [Thu, 7 Jun 2018 08:57:27 +0000 (08:57 +0000)]
Merge "Fix UploadBase::checkXMLEncodingMissmatch() on PHP 7.1+"

5 years agoinstaller: Fix display of UPGRADE by disabling InterwikiLookup
Kunal Mehta [Thu, 7 Jun 2018 08:01:13 +0000 (01:01 -0700)]
installer: Fix display of UPGRADE by disabling InterwikiLookup

Since 129067c907ea65f62, parsing section titles has looked up interwiki
prefixes with InterwikiLookup. In the web upgrader, this triggers
database access, and since that service is disabled, it throws
exceptions, causing parsing to fail.

Work around that by using a dummy InterwikiLookup service that knows
about no interwiki prefixes. Maybe one could be written to just read
from the stock `interwiki.list`, but that's a project for another time.

Bug: T196607
Change-Id: I13485a9af79297b552a1128240cb8597c2ef83d8

5 years agoMerge "Revert "docs: Rename README to README.md""
jenkins-bot [Thu, 7 Jun 2018 07:06:59 +0000 (07:06 +0000)]
Merge "Revert "docs: Rename README to README.md""

5 years agoRevert "docs: Rename README to README.md"
Legoktm [Thu, 7 Jun 2018 06:53:59 +0000 (06:53 +0000)]
Revert "docs: Rename README to README.md"

This file is parsed in the web installer, which doesn't
understand markdown - it uses the MediaWiki parser.

This reverts commit c0342da8e9a675ce6803d651a781addb801ef8f3.

Bug: T196607
Change-Id: If35f0212dafa80afe59c019ab25b875cd0977fc8

5 years agotests: Reset mwuser/pagecontent tables if necessary for postgres
Kunal Mehta [Sat, 2 Jun 2018 03:31:52 +0000 (20:31 -0700)]
tests: Reset mwuser/pagecontent tables if necessary for postgres

As of 556c5cf464b9, postgres renames the `user` and `text` tables to
`mwuser` and `pagecontent` respectively. Have resetDB() explicitly
reset those tables when using postgres.

Bug: T195807
Change-Id: I5052dd663a4fb16389611cd2985b712fb9a15069

5 years agoFix UploadBase::checkXMLEncodingMissmatch() on PHP 7.1+
Kunal Mehta [Thu, 7 Jun 2018 00:54:07 +0000 (17:54 -0700)]
Fix UploadBase::checkXMLEncodingMissmatch() on PHP 7.1+

file_get_contents() started supporting a negative offset in 7.1+. But
we really just want to start with 0.

Also fix the order of arguments to assertSame() so that the expected
value is first.

Bug: T182366
Change-Id: I84c92652de5b51a43f6e2b58cd235d2889093453

5 years agoMerge "Use the old linkshere-related messages without "-2""
jenkins-bot [Wed, 6 Jun 2018 21:15:36 +0000 (21:15 +0000)]
Merge "Use the old linkshere-related messages without "-2""

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

Change-Id: I6ffcde700fa06cecb3d4bc4016ddc3c0ca2559e9

5 years agoMerge "Add RELEASE-NOTES for I4678250331a48db4d50d1fc6c489c991a4dee920"
jenkins-bot [Wed, 6 Jun 2018 18:48:21 +0000 (18:48 +0000)]
Merge "Add RELEASE-NOTES for I4678250331a48db4d50d1fc6c489c991a4dee920"

5 years agoMerge "Selenium tests: Use assert.strictEqual instead of assert.equal"
jenkins-bot [Wed, 6 Jun 2018 18:36:53 +0000 (18:36 +0000)]
Merge "Selenium tests: Use assert.strictEqual instead of assert.equal"

5 years agoAdd RELEASE-NOTES for I4678250331a48db4d50d1fc6c489c991a4dee920
Reedy [Wed, 6 Jun 2018 18:31:49 +0000 (18:31 +0000)]
Add RELEASE-NOTES for I4678250331a48db4d50d1fc6c489c991a4dee920

Change-Id: Ic880a54427bf8bd9adf96863da25c485cb3c5662

5 years agoMerge "maintenance/purgePage.php output page being purged"
jenkins-bot [Wed, 6 Jun 2018 18:21:27 +0000 (18:21 +0000)]
Merge "maintenance/purgePage.php output page being purged"

5 years agoMerge "mediawiki.js: Fix eslint valid-jsdoc"
jenkins-bot [Wed, 6 Jun 2018 18:21:24 +0000 (18:21 +0000)]
Merge "mediawiki.js: Fix eslint valid-jsdoc"

5 years agoMerge "Avoid "unittest_imagelinks" already exists error in tests"
jenkins-bot [Wed, 6 Jun 2018 18:21:21 +0000 (18:21 +0000)]
Merge "Avoid "unittest_imagelinks" already exists error in tests"

5 years agoUpdate OOUI to v0.27.2
Volker E [Wed, 6 Jun 2018 16:49:23 +0000 (18:49 +0200)]
Update OOUI to v0.27.2

Release notes:
 https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.27.2

Depends-on: I6755650daf6be2e76785fda992d41c9e7e75e09c
Change-Id: Ieea0c26b0fa9d99c7fc7ebd6cca213e8c33db2ce

5 years agomediawiki.js: Fix eslint valid-jsdoc
Fomafix [Wed, 6 Jun 2018 15:33:58 +0000 (17:33 +0200)]
mediawiki.js: Fix eslint valid-jsdoc

Remove eslint-disable-next-line valid-jsdoc

Change-Id: I23fc5d68dd25048ed090000946806a01e66e4469

5 years agoresourceloader: remove "mediaWikiLoadStart" and move mwNow() to mediawiki.js
Aaron Schulz [Tue, 5 Jun 2018 23:19:58 +0000 (16:19 -0700)]
resourceloader: remove "mediaWikiLoadStart" and move mwNow() to mediawiki.js

Bug: T160315
Change-Id: I2d4745e9c34526e5e86f25a3d47799004a5908fe

5 years agoMerge "build: Enable qunit/no-assert-equal and enforce"
jenkins-bot [Wed, 6 Jun 2018 15:23:24 +0000 (15:23 +0000)]
Merge "build: Enable qunit/no-assert-equal and enforce"

5 years agoSelenium tests: Use assert.strictEqual instead of assert.equal
Ed Sanders [Wed, 6 Jun 2018 10:49:33 +0000 (11:49 +0100)]
Selenium tests: Use assert.strictEqual instead of assert.equal

assert.equal is deprecated

Change-Id: I2f83d596db2ad475de5e005baa849782261d433e

5 years agobuild: Enable qunit/no-assert-equal and enforce
Ed Sanders [Wed, 6 Jun 2018 10:44:23 +0000 (11:44 +0100)]
build: Enable qunit/no-assert-equal and enforce

This is the equivalent of the '===' rule ("eqeqeq") in eslint core.

Change-Id: I1e6ea8bc1e86c6629ebe938f1b4a6bd288bcfcf7

5 years agoMerge "objectcache: clean up language about expiration/invalidation"
jenkins-bot [Wed, 6 Jun 2018 00:12:01 +0000 (00:12 +0000)]
Merge "objectcache: clean up language about expiration/invalidation"

5 years agoobjectcache: clean up language about expiration/invalidation
Aaron Schulz [Sun, 3 Jun 2018 22:24:25 +0000 (15:24 -0700)]
objectcache: clean up language about expiration/invalidation

Change-Id: I593e7bf9bd4f7fbb615d3d164e77273bd4033dde

5 years agoUpdate wikimedia/wrappedstring to 3.0.1
Timo Tijhof [Tue, 5 Jun 2018 21:56:11 +0000 (22:56 +0100)]
Update wikimedia/wrappedstring to 3.0.1

Bug: T196496
Depends-On: I13dbdba2b9df52f2d4214c1327e20292c6941331
Change-Id: I5a5d7de4702c23f069c27bcf31b9ace97d54fd82

5 years agoMerge "Populate 1.31 rc.0 -> rc.2 release notes"
jenkins-bot [Tue, 5 Jun 2018 23:05:11 +0000 (23:05 +0000)]
Merge "Populate 1.31 rc.0 -> rc.2 release notes"

5 years agoMerge "build: Enable qunit/no-early-return,no-negated-ok and enforce"
jenkins-bot [Tue, 5 Jun 2018 22:57:06 +0000 (22:57 +0000)]
Merge "build: Enable qunit/no-early-return,no-negated-ok and enforce"

5 years agoMerge "build: Introduce eslint-plugin-qunit and enforce"
jenkins-bot [Tue, 5 Jun 2018 22:50:51 +0000 (22:50 +0000)]
Merge "build: Introduce eslint-plugin-qunit and enforce"

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 agoMerge "DateTimeInputWidget: Fix disabled `border-color`"
jenkins-bot [Tue, 5 Jun 2018 21:45:12 +0000 (21:45 +0000)]
Merge "DateTimeInputWidget: Fix disabled `border-color`"

5 years agobuild: Enable qunit/no-early-return,no-negated-ok and enforce
Ed Sanders [Tue, 5 Jun 2018 21:18:06 +0000 (22:18 +0100)]
build: Enable qunit/no-early-return,no-negated-ok and enforce

Change-Id: Ief1911517ae06545f842cbcbfd0cf3e815ac2b5b

5 years agoAdd getLoginSecurityLevel() support to FormSpecialPage
Brad Jorsch [Wed, 9 May 2018 18:53:32 +0000 (14:53 -0400)]
Add getLoginSecurityLevel() support to FormSpecialPage

The base SpecialPage will handle reauthentication automatically if you
just implement getLoginSecurityLevel() to return an appropriate string.

But it doesn't work with FormSpecialPage, and if you try calling
checkLoginSecurityLevel() manually it'll lose any post data if the
reauth happens when the form is posted.

So this patch has SpecialPage::checkLoginSecurityLevel() preserve post
data across reauth (using logic similar to that in AuthManagerSpecialPage),
and has FormSpecialPage call checkLoginSecurityLevel() in the same
way the base SpecialPage does.

It also fixes the SpecialPage logic to not call
checkLoginSecurityLevel() when the special page doesn't implement
getLoginSecurityLevel(), as was the originally-intended behavior.
Apparently almost nothing actually gets to SpecialPage::execute() or
this would probably have been noticed already.

Change-Id: Ic89dc1b6583aaecd2efe3f5109896148a188c271

5 years agobuild: Introduce eslint-plugin-qunit and enforce
Ed Sanders [Tue, 5 Jun 2018 20:58:25 +0000 (21:58 +0100)]
build: Introduce eslint-plugin-qunit and enforce

Change-Id: Iefe06cc865c458000ca5350c2d9205f5b768bac8

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 agomaintenance/purgePage.php output page being purged
addshore [Mon, 4 Jun 2018 09:03:22 +0000 (10:03 +0100)]
maintenance/purgePage.php output page being purged

This is useful when piping lists of pages into the script
to see progress.

Change-Id: I077249ad012d0c463306c0a1a1e38d00624c5170

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 agoReplace call_user_func_array(), part 1
Max Semenik [Tue, 5 Jun 2018 06:24:34 +0000 (23:24 -0700)]
Replace call_user_func_array(), part 1

Uses new PHP 5.6 syntax like ...parameter unpacking and
calling anything looking like a callback to make the code more readable.
There are much more occurrences but this commit is intentionally limited
to an easily reviewable size.

Change-Id: Idcec077ef3fdf029b632cceafd0150851ad723e3

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 agoDateTimeInputWidget: Fix disabled `border-color`
Volker E [Mon, 4 Jun 2018 23:12:01 +0000 (01:12 +0200)]
DateTimeInputWidget: Fix disabled `border-color`

Fixing disabled `border-color`, which was set to a too dark tone.

Change-Id: I767b79d51abab05958cf796878c7e10fdaf8ce82

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 agoUse the old linkshere-related messages without "-2"
Daimona Eaytoy [Thu, 31 May 2018 21:43:04 +0000 (23:43 +0200)]
Use the old linkshere-related messages without "-2"

As follow-up of I68a8639a61237c67deb61aefd5360dea3cced6cd, we can now go
back to the old messages, which have a clearer name and don't need
furher customization.

Bug: T189860
Change-Id: Ie8cbebe286bc18d016949ff05e7aef18e6aa8952

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 agoAvoid "unittest_imagelinks" already exists error in tests
Aaron Schulz [Sat, 2 Jun 2018 23:25:01 +0000 (16:25 -0700)]
Avoid "unittest_imagelinks" already exists error in tests

This occured in MediaWikiTestCase::setUpSchema if the original wiki prefix was not empty.

Change-Id: I6b0a21473986334bcfbb85ef416759aed44f79a3

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