lhc/web/wiklou.git
6 years agoAdd mobile and desktop thresholds
jdlrobson [Fri, 18 Aug 2017 17:55:35 +0000 (12:55 -0500)]
Add mobile and desktop thresholds

This will allow us to centralise these values similar to tablet
device width and allow us to remove a Minerva/MobileFrontend
dependency

Going forward we will encourage explicitly tracked imports
deviceWidthTablet is retained for backwards compatibility
but on long term it should be imported directly from mediawiki.ui's
variables

Bug: T171365
Change-Id: Ib9f843147db4473ce5590741e0fb490384b0007e

6 years agoMerge "Make interim WAN cache key deactivation logic broader"
jenkins-bot [Fri, 2 Feb 2018 04:04:13 +0000 (04:04 +0000)]
Merge "Make interim WAN cache key deactivation logic broader"

6 years agoMerge "rdbms: Bump TransactionProfiler log entries to WARNING"
jenkins-bot [Fri, 2 Feb 2018 04:00:27 +0000 (04:00 +0000)]
Merge "rdbms: Bump TransactionProfiler log entries to WARNING"

6 years agordbms: Bump TransactionProfiler log entries to WARNING
Aaron Schulz [Wed, 31 Jan 2018 22:33:28 +0000 (14:33 -0800)]
rdbms: Bump TransactionProfiler log entries to WARNING

Change-Id: I4816cfb8c8cd3b8e3dd2fe10c028c4654cc82854

6 years agoMerge "deferred: Make MWCallableUpdate support a list of DB handles"
jenkins-bot [Fri, 2 Feb 2018 03:51:32 +0000 (03:51 +0000)]
Merge "deferred: Make MWCallableUpdate support a list of DB handles"

6 years agoMerge "objectcache: use region prefixes for mcrouter-backed WAN cache"
jenkins-bot [Fri, 2 Feb 2018 03:34:06 +0000 (03:34 +0000)]
Merge "objectcache: use region prefixes for mcrouter-backed WAN cache"

6 years agoMerge "Warn if stateful ParserOutput transforms are used"
jenkins-bot [Fri, 2 Feb 2018 02:45:27 +0000 (02:45 +0000)]
Merge "Warn if stateful ParserOutput transforms are used"

6 years agoMerge "benchmarks: Fix divide by zero in Benchmarker"
jenkins-bot [Fri, 2 Feb 2018 02:31:24 +0000 (02:31 +0000)]
Merge "benchmarks: Fix divide by zero in Benchmarker"

6 years agobenchmarks: Fix divide by zero in Benchmarker
Brad Jorsch [Thu, 1 Feb 2018 21:26:09 +0000 (16:26 -0500)]
benchmarks: Fix divide by zero in Benchmarker

Follows-up 593442683dc471c0.

Bug: T186269
Change-Id: I011a8614e0acf489daf5bd9dcb932e920b995092

6 years agoMerge "qunit: Test `before` and `after` hooks in QUnit testrunner"
jenkins-bot [Fri, 2 Feb 2018 01:27:33 +0000 (01:27 +0000)]
Merge "qunit: Test `before` and `after` hooks in QUnit testrunner"

6 years agoMerge "qunit: Refactor and simplify testrunner to fix nested modules"
jenkins-bot [Fri, 2 Feb 2018 01:24:12 +0000 (01:24 +0000)]
Merge "qunit: Refactor and simplify testrunner to fix nested modules"

6 years agoMerge "Added letter Kra (ĸ) to special characters toolbar"
jenkins-bot [Fri, 2 Feb 2018 01:18:41 +0000 (01:18 +0000)]
Merge "Added letter Kra (ĸ) to special characters toolbar"

6 years agoAdded letter Kra (ĸ) to special characters toolbar
navisk13 [Tue, 30 Jan 2018 13:11:50 +0000 (18:41 +0530)]
Added letter Kra (ĸ) to special characters toolbar

Added 'Kra' to latin extended collection in the file /resources/src/mediawiki.language/specialcharacters.json

Bug: T185918
Change-Id: Ibc739297e5a1b8d109202477e1314cc3a0d6d5b4

6 years agoRemove wrapclass from parser cache key
Brad Jorsch [Fri, 22 Dec 2017 18:47:33 +0000 (13:47 -0500)]
Remove wrapclass from parser cache key

This will result in an exception from WikiPage::getParserOutput() if
anything was missed.

This also hard-deprecates ParserOptions::setWrapOutputClass( false )

Bug: T181846
Change-Id: Ica541e1f6b52f5eec6d28cff60ba64bf525258c7
Depends-On: Ie5d6c5ce34c05b8fe2353d3bb36b2a3a4166ec4b
Depends-On: Ibfaefde2f3811151ec712554cbc9cf2415ed017f
Depends-On: I55048bbae5d4d2d0c79c241c1784448b82db3bb4
Depends-On: I23a26ba0dfbe83007cd40e97d71a2139a5ecddc7
Depends-On: Ibc013a41f4a463f4014fbbce7ce27f8690161728
Depends-On: Ie936dff918dc0869503a924298b4580402038b52

6 years agoAdd 'unwrap' ParserOutput post-cache transform
Brad Jorsch [Fri, 22 Dec 2017 18:32:49 +0000 (13:32 -0500)]
Add 'unwrap' ParserOutput post-cache transform

And deprecate passing false for ParserOptions::setWrapOutputClass().

There are three cases for the Parser wrapper: the default
mw-parser-output, a custom wrapper, or no wrapper. As things currently
stand, we have to fragment the parser cache on each of these options,
which uses a nontrival amount of storage space (T167784).

Ideally we'd do all the wrapping as a post-cache transform, but
TemplateStyles needs to know the wrapper in use in order to properly
prefix its CSS rules (that's why we added the wrapper in the first
place). So, second best option is to make *un*wrapping be a post-cache
transform and make "custom wrapper" be uncacheable.

This patch does the first bit (unwrapping as a post-cache transform),
and a followup will do the second part once the deprecation process is
satisfied.

Bug: T181846
Change-Id: Iba16e78c41be992467101e7d83e9c3134765b101

6 years agoShell: Set pipes to non-blocking
Brad Jorsch [Thu, 1 Feb 2018 18:45:35 +0000 (13:45 -0500)]
Shell: Set pipes to non-blocking

The select(2) system call only guarantees a "sufficiently small write"
can be made without blocking. It doesn't define what that means.

And on Linux the read might block too in certain cases, although I don't
know if any of them can occur here.

Regardless, set all the pipes to non-blocking, which avoids the blocking
that's behind T184171.

And then, since a non-blocking read might validly return empty-string or
a non-blocking write might validly return 0, use feof() to check for EOF
and actually close the write pipe when it runs out of data.

Bug: T184171
Change-Id: I403235a328630112b6920905730f933777e2d453

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 1 Feb 2018 20:56:02 +0000 (21:56 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I3eb13a00f4f315cc23b29602a8ef1206f26065dc

6 years agoobjectcache: use region prefixes for mcrouter-backed WAN cache
Aaron Schulz [Tue, 5 Dec 2017 06:05:31 +0000 (22:05 -0800)]
objectcache: use region prefixes for mcrouter-backed WAN cache

This allows for mcrouter to have proper cross-DC and intra-DC timeouts.

Change-Id: If48f740f435d266a2050839f34611c0c8f36b3a7

6 years agoMerge "Add ability to proxy thumbnail requests to a service"
jenkins-bot [Thu, 1 Feb 2018 17:43:10 +0000 (17:43 +0000)]
Merge "Add ability to proxy thumbnail requests to a service"

6 years agoMerge "Hygiene: Use “OOUI” as unified name in build and code documentation"
jenkins-bot [Thu, 1 Feb 2018 17:41:53 +0000 (17:41 +0000)]
Merge "Hygiene: Use “OOUI” as unified name in build and code documentation"

6 years agoMerge "Bump composer/spdx-licenses to 1.3.0"
jenkins-bot [Thu, 1 Feb 2018 16:01:35 +0000 (16:01 +0000)]
Merge "Bump composer/spdx-licenses to 1.3.0"

6 years agoMerge "Fix jump-to-nav element overlap on RCFilters"
jenkins-bot [Thu, 1 Feb 2018 15:33:24 +0000 (15:33 +0000)]
Merge "Fix jump-to-nav element overlap on RCFilters"

6 years agoForce CommentMigration MIGRATION_OLD in 2 RevisionTest tests
addshore [Thu, 1 Feb 2018 14:37:04 +0000 (14:37 +0000)]
Force CommentMigration MIGRATION_OLD in 2 RevisionTest tests

These tests fail when the comment store migration is not
set to old, this probably indicates that we need some more
tests for other cases, or that we don't want to test the comment
store functionality here and should mock comment store.

Change-Id: I06d2171498da6e07997569d4a74a0c5cfc913f33

6 years agoAdd missing PHPDoc block to DifferenceEngine::getParserOutput
Thiemo Mättig [Thu, 1 Feb 2018 11:48:29 +0000 (12:48 +0100)]
Add missing PHPDoc block to DifferenceEngine::getParserOutput

Bug: T186163
Change-Id: Ifde6f8e458d90b1ec250dc4d587cd428717fe509

6 years agoqunit: Test `before` and `after` hooks in QUnit testrunner
Aleksey Bekh-Ivanov (WMDE) [Wed, 2 Aug 2017 14:21:56 +0000 (16:21 +0200)]
qunit: Test `before` and `after` hooks in QUnit testrunner

Change-Id: Ib5b5d29e860d37dbec675e5d24c31b57c5e64102

6 years agoAdd ability to proxy thumbnail requests to a service
Gilles Dubuc [Mon, 20 Nov 2017 06:57:29 +0000 (07:57 +0100)]
Add ability to proxy thumbnail requests to a service

Bug: T169144
Change-Id: I4af09a8b75e7158d6ff15f97e8f067b66ac33d5c

6 years agoFix invocation of MWHttpRequest::factory with one argument.
Stanislav Malyshev [Thu, 1 Feb 2018 07:05:20 +0000 (23:05 -0800)]
Fix invocation of MWHttpRequest::factory with one argument.

Change-Id: Ib96c2888a6fd91ca80c162a80d283f650d6fa4b9

6 years agoBump composer/spdx-licenses to 1.3.0
Kunal Mehta [Thu, 1 Feb 2018 07:01:02 +0000 (23:01 -0800)]
Bump composer/spdx-licenses to 1.3.0

https://github.com/composer/spdx-licenses/compare/1.2.0...1.3.0

Change-Id: I41be6cecc1b322796ed448f664eb58642d7511ff

6 years agoHygiene: Use “OOUI” as unified name in build and code documentation
Volker E [Wed, 17 Jan 2018 07:04:01 +0000 (23:04 -0800)]
Hygiene: Use “OOUI” as unified name in build and code documentation

Bug: T182360
Change-Id: I981c574003fa505fe133be6da405e73330c4e9a1

6 years agodeferred: Make MWCallableUpdate support a list of DB handles
Aaron Schulz [Tue, 23 Jan 2018 15:06:32 +0000 (16:06 +0100)]
deferred: Make MWCallableUpdate support a list of DB handles

Change-Id: I0371ecd20101c5e622497e5912676300b040865e

6 years agoMake interim WAN cache key deactivation logic broader
Aaron Schulz [Thu, 1 Feb 2018 00:47:09 +0000 (16:47 -0800)]
Make interim WAN cache key deactivation logic broader

* This is how it was before d5aa846d8, which accidentally changed
  the behavior. The WAN cache call in Setup.php was too coupled to
  the ChronologyProtector cookies. It made the assumption that DB
  positions and cookies are stored even when there are no replica
  databases setup (which changed in that patch).
* Check the "UseDC" cookie instead, which is already set in exactly
  the cases this logic should apply.

Bug: T185328
Change-Id: I4dd2a6ca6cdead0052d59be86e6030dbe01f141b

6 years agoqunit: Refactor and simplify testrunner to fix nested modules
Timo Tijhof [Wed, 31 Jan 2018 21:05:09 +0000 (13:05 -0800)]
qunit: Refactor and simplify testrunner to fix nested modules

Follows-up 5a4938140643dc5c1539e882454f51b2742dae.

* Merge the three QUnit.module extensions into one.
* Change makeSafeEnv() to use Object.create() instead of creating
  a simplified objects so that other properties are still accessible.

The 'testrunner-nested > Dummy' test now actually runs,
previously it was lost.

Change-Id: Id4aeb93582f8cc73b0dffe768a7864002ec85deb

6 years agoskins: Deprecate QuickTemplate::setRef()
Timo Tijhof [Fri, 26 Jan 2018 18:16:13 +0000 (10:16 -0800)]
skins: Deprecate QuickTemplate::setRef()

Removed all use from core. It was only used in a handful of other
repos, most of which have been updated already.

Bug: T140664
Change-Id: I6b1ea3221022597ca38a5cd40eee040d34d1abb8

6 years agoMerge "Localisation updates from https://translatewiki.net."
L10n-bot [Wed, 31 Jan 2018 20:55:05 +0000 (20:55 +0000)]
Merge "Localisation updates from https://translatewiki.net."

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 31 Jan 2018 20:54:53 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I6a6aa5aefc1fcc048d16bc4f509efdbfd6006ddc

6 years agoMerge "tests: Add @group and @covers to wfArrayFilterTest"
jenkins-bot [Wed, 31 Jan 2018 20:53:36 +0000 (20:53 +0000)]
Merge "tests: Add @group and @covers to wfArrayFilterTest"

6 years agotests: Add @group and @covers to wfArrayFilterTest
Timo Tijhof [Wed, 31 Jan 2018 20:14:02 +0000 (12:14 -0800)]
tests: Add @group and @covers to wfArrayFilterTest

Change-Id: I6565ad21b6d6e78d876f730596e213555143c3fc

6 years agoMerge "Rewrite pref cleanup script"
jenkins-bot [Wed, 31 Jan 2018 18:47:59 +0000 (18:47 +0000)]
Merge "Rewrite pref cleanup script"

6 years agordbms: set the schema in the LBFactory local domain
Aaron Schulz [Tue, 30 Jan 2018 03:09:07 +0000 (19:09 -0800)]
rdbms: set the schema in the LBFactory local domain

Also, enforce that new DB connection use the domain
schema as is the case with the DB name and table prefix.

The code worked previously since the local domain did not override
the schema in the server configuration arrays, so it happened not
to clobber the domain schema.

Lastly, fix unit test fatal in LBFactorySingle::forEachLB() when
called during LBFactorySingle::_destruct().

Change-Id: Ia9ddef0f21591d0c8b15f2947cd61569e3fec7a0

6 years agoMerge "jquery.textSelection: Remove code supporting IE 6 selection APIs"
jenkins-bot [Wed, 31 Jan 2018 15:53:51 +0000 (15:53 +0000)]
Merge "jquery.textSelection: Remove code supporting IE 6 selection APIs"

6 years agoMerge "jquery.textSelection: Remove final remnants of WikiEditor iframe support"
jenkins-bot [Wed, 31 Jan 2018 15:53:28 +0000 (15:53 +0000)]
Merge "jquery.textSelection: Remove final remnants of WikiEditor iframe support"

6 years agoMerge "Move @group and @covers tags in tests close to class"
jenkins-bot [Wed, 31 Jan 2018 14:51:26 +0000 (14:51 +0000)]
Merge "Move @group and @covers tags in tests close to class"

6 years agoMerge "resourceloader: Add minified version of mw.loader.implement() wrapper"
jenkins-bot [Wed, 31 Jan 2018 13:40:37 +0000 (13:40 +0000)]
Merge "resourceloader: Add minified version of mw.loader.implement() wrapper"

6 years agojquery.textSelection: Remove code supporting IE 6 selection APIs
Bartosz Dziewoński [Wed, 31 Jan 2018 05:44:53 +0000 (06:44 +0100)]
jquery.textSelection: Remove code supporting IE 6 selection APIs

Removing all the code that uses the document.selection and
document.body.createTextRange() APIs, or that only runs if
these APIs are present (workarounds for old IE bugs).

These APIs were supported by Internet Explorer up to version 9
and by Opera up to version 10.5. More recent versions of both
browsers only support the standard selection APIs.

Bug: T186005
Change-Id: I32dc5a16b03cf1c2ea44f6c7361447607ccc7e62

6 years agojquery.textSelection: Remove final remnants of WikiEditor iframe support
Bartosz Dziewoński [Wed, 31 Jan 2018 05:37:54 +0000 (06:37 +0100)]
jquery.textSelection: Remove final remnants of WikiEditor iframe support

After WikiEditor's experimental iframe mode was removed in
952d6b9d8fc1d4ac606b6f8d0a3341ba7ec27e02, the code here was mostly
removed in 62b4198859e4ac7cf41775dc8bc943272e3ddfc3, but this little
stub remained to support CodeEditor (it piggy-backed on that feature
to support textSelection() overrides). That was also cleaned up
afterwards in 37228b257896e0a36816a61543ed5809e8ad6596, but everyone
forgot about this little remnant.

This code was not doing anything, as nothing sets the 'context.$iframe'
property anymore, in any extension.

Change-Id: I0ffe2405df7d6aaecc51b06ba6c7fea5fd8380b4

6 years agoMerge "rdbms: make affectedRows() work more consistently"
jenkins-bot [Wed, 31 Jan 2018 04:48:32 +0000 (04:48 +0000)]
Merge "rdbms: make affectedRows() work more consistently"

6 years agoMerge "rdbms: avoid pointless "SHOW SLAVE STATUS" calls in masterPosWait()"
jenkins-bot [Wed, 31 Jan 2018 04:43:38 +0000 (04:43 +0000)]
Merge "rdbms: avoid pointless "SHOW SLAVE STATUS" calls in masterPosWait()"

6 years agordbms: make affectedRows() work more consistently
Aaron Schulz [Sun, 28 Jan 2018 14:10:39 +0000 (06:10 -0800)]
rdbms: make affectedRows() work more consistently

* Update replace()/upsert() to combine the affected row
  count for the non-native case
* Also make replace() atomic in the non-native case,
  similar to how upsert() already works

Change-Id: I6c9bcba54eca6bcf4a93a9b230aaedf7f36aa877

6 years agoJavaScriptMinifier: Fix "Uninitialized offset" in regexp char class parsing
Timo Tijhof [Wed, 31 Jan 2018 03:55:15 +0000 (19:55 -0800)]
JavaScriptMinifier: Fix "Uninitialized offset" in regexp char class parsing

Bug: T75556
Change-Id: I0bb63212dd44aec3c6b40477553dbf6a471bc7b3

6 years agoMerge "Revert "Remove workaround for comparing database domain IDs.""
jenkins-bot [Wed, 31 Jan 2018 03:13:46 +0000 (03:13 +0000)]
Merge "Revert "Remove workaround for comparing database domain IDs.""

6 years agordbms: avoid pointless "SHOW SLAVE STATUS" calls in masterPosWait()
Aaron Schulz [Tue, 30 Jan 2018 12:39:36 +0000 (04:39 -0800)]
rdbms: avoid pointless "SHOW SLAVE STATUS" calls in masterPosWait()

This code branch is not useful in the GTID case

Change-Id: Ia112c9b4b9c1f1297cc4eaac7f4a5a1ca882f02e

6 years agoMerge "rdbms: clean up non-native Database::replace() code"
jenkins-bot [Tue, 30 Jan 2018 23:53:30 +0000 (23:53 +0000)]
Merge "rdbms: clean up non-native Database::replace() code"

6 years agoMerge "Fix $wgSharedDB with sqlite"
jenkins-bot [Tue, 30 Jan 2018 22:20:53 +0000 (22:20 +0000)]
Merge "Fix $wgSharedDB with sqlite"

6 years agoMerge "Fix issue when modifying groups in Special:Userrights"
jenkins-bot [Tue, 30 Jan 2018 21:00:56 +0000 (21:00 +0000)]
Merge "Fix issue when modifying groups in Special:Userrights"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 30 Jan 2018 20:57:21 +0000 (21:57 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibfb41f389c5b2c511d9372a423e2caa5cc844b37

6 years agoFix issue when modifying groups in Special:Userrights
Ryan Schmidt [Sun, 23 Jul 2017 04:19:49 +0000 (21:19 -0700)]
Fix issue when modifying groups in Special:Userrights

If a user has permission to remove a group but not add it, they cannot
manipulate other groups on a user who currently has the un-addable
group. An error is shown that the expiry is invalid and prevents the
save. To fix this, add a hidden input that is hardcoded to the existing
expiration (either 'existing' if it is a temporary assignment, or
'infinite' if the assignment does not expire), so that the validation
succeeds. Validation of this input is already taken care of in
execute(), so it is not possible for a user to extend an expiration this
way if they do not have the necessary privileges to do so.

Bug: T171345
Change-Id: I9268c05d6c491eab45147f8a9941ad4d4e1f563f

6 years agoRewrite pref cleanup script
Chad Horohoe [Tue, 25 Jul 2017 20:32:31 +0000 (13:32 -0700)]
Rewrite pref cleanup script

- Keep the current hidden pref cleanup stuff, that's not harmful
  and marginally useful
- Drop preferences we dunno wtf they're about. Cuz they're probably
  deprecated or otherwise unused
- Normalize preferences into accepted value ranges. This part is kinda
  hard and I haven't figured it out, so slap a TODO

More to come, stay tuned!

Change-Id: I70047adba0034136d107ce7534294cc6fa3c1860

6 years agoFix $wgSharedDB with sqlite
Ryan Schmidt [Tue, 2 Jan 2018 17:56:32 +0000 (11:56 -0600)]
Fix $wgSharedDB with sqlite

At the time of the constructor, tableAliases will always be an empty
array. As such, the ATTACH command is never run for shared dbs, and we
get query errors when later trying to reference them. This changes it so
that the shared db is attached whenever the table aliases are finally
set.

Since table aliases may be set multiple times, the list of already
attached dbs was moved into class scope so that subsequent calls to set
the aliases do not result in query errors.

Bug: T181962
Change-Id: Ia654e996f54077bc3749b884a528e121ab25a2d2

6 years agoMerge "parser: Replace Sanitizer::armorLinksCallback() with a closure"
jenkins-bot [Tue, 30 Jan 2018 20:02:16 +0000 (20:02 +0000)]
Merge "parser: Replace Sanitizer::armorLinksCallback() with a closure"

6 years agoparser: Replace Sanitizer::armorLinksCallback() with a closure
Max Semenik [Mon, 13 Nov 2017 23:48:03 +0000 (15:48 -0800)]
parser: Replace Sanitizer::armorLinksCallback() with a closure

Used only once, small enough. Perfect candidate to not be exposed
even as a private function.

Change-Id: Ic020a596f709cb4f69c48ffe8138f9023a5c4062

6 years agoMerge "mw.Feedback: If the message is posted remotely, link the title correctly"
jenkins-bot [Tue, 30 Jan 2018 19:51:00 +0000 (19:51 +0000)]
Merge "mw.Feedback: If the message is posted remotely, link the title correctly"

6 years agoMerge "postEdit: Show a different success messsage on publish vs. save wikis"
jenkins-bot [Tue, 30 Jan 2018 19:44:06 +0000 (19:44 +0000)]
Merge "postEdit: Show a different success messsage on publish vs. save wikis"

6 years agoMerge "objectcache: add some WANObjectCache comments to set() and delete()"
jenkins-bot [Tue, 30 Jan 2018 19:35:13 +0000 (19:35 +0000)]
Merge "objectcache: add some WANObjectCache comments to set() and delete()"

6 years agopostEdit: Show a different success messsage on publish vs. save wikis
James D. Forrester [Tue, 18 Apr 2017 15:59:08 +0000 (08:59 -0700)]
postEdit: Show a different success messsage on publish vs. save wikis

Bug: T183901
Change-Id: I065f733bd8b27bda68023cd1b718e257fd135aa2

6 years agoresourceloader: Move FILTER_NOMIN annotation to the beginning of output
Bartosz Dziewoński [Tue, 30 Jan 2018 11:12:46 +0000 (12:12 +0100)]
resourceloader: Move FILTER_NOMIN annotation to the beginning of output

This allows ResourceLoader::filter() to handle this case slightly
faster, since it searches for this annotation from the beginning.
In practice this is a negligible performance optimization, but let's
set a good example for the future.

Also tweak the comments and whitespace:
* Move comment about the FILTER_NOMIN from doc comment to code comment,
  it's an implementation detail and not meant for public documentation
* Remove duplicated documentation from the parent class
* Change whitespace to be identical in both cases

Change-Id: I624914ff28d903027ba58710708ccc3c66af9e24

6 years agoSpecialPage: Hard deprecate getTitle, deprecated since 1.23
James D. Forrester [Wed, 25 Oct 2017 16:42:12 +0000 (09:42 -0700)]
SpecialPage: Hard deprecate getTitle, deprecated since 1.23

Change-Id: I839e9aaa0be7491087cc144ea13153abb2e77aa6

6 years agoRevert "Remove workaround for comparing database domain IDs."
Addshore [Tue, 30 Jan 2018 17:22:50 +0000 (17:22 +0000)]
Revert "Remove workaround for comparing database domain IDs."

This seems to have broken stuff, see failing tests on:
https://gerrit.wikimedia.org/r/#/c/406302/

Could not insert main page: RevisionStore for  cannot
be used with a DB connection for jenkins_u0_mw

This reverts commit d2a4d614fce09cdf9dfc137f8507b504e09c0ccc.

Bug: T186017
Change-Id: Ic3de8e856d7d6b224b02816f2c5a1aa0648cd184

6 years agoMerge "SpecialExpandTemplates: Remove leftover 'mw-ui-input-inline' class"
jenkins-bot [Tue, 30 Jan 2018 17:43:13 +0000 (17:43 +0000)]
Merge "SpecialExpandTemplates: Remove leftover 'mw-ui-input-inline' class"

6 years agoMerge "Remove unused method parameters from TestBagOStuff"
jenkins-bot [Tue, 30 Jan 2018 16:24:55 +0000 (16:24 +0000)]
Merge "Remove unused method parameters from TestBagOStuff"

6 years agoRemove unused method parameters from TestBagOStuff
Thiemo Mättig [Wed, 10 Jan 2018 13:32:56 +0000 (14:32 +0100)]
Remove unused method parameters from TestBagOStuff

This is a test mock exclusively used in tests. All code I'm removing here
is unused and neither needed nor covered by any test.

Change-Id: Ifd010c49973460f6fbb2cd83f8fd63488f5fd291

6 years agoSpecialExpandTemplates: Remove leftover 'mw-ui-input-inline' class
Bartosz Dziewoński [Tue, 30 Jan 2018 14:29:44 +0000 (15:29 +0100)]
SpecialExpandTemplates: Remove leftover 'mw-ui-input-inline' class

mediawiki.ui is not loaded on this page anymore after the OOUI
conversion. However, if some extension etc. were to load it, this
field (page title) would have the styles applies unexpectedly,
and it looks rather silly with them (very narrow).

Change-Id: I5cfe71897f435a514c6971b3a0ff7521e422324c

6 years agojquery.textSelection: Remove outdated FIXME comments
Bartosz Dziewoński [Tue, 30 Jan 2018 09:26:15 +0000 (10:26 +0100)]
jquery.textSelection: Remove outdated FIXME comments

These are from 2010 or earlier; they blame to 32377424b94 / rSVN72349,
which is a huge SVN branch merge and I'm not going to dig past that.

To be honest I don't really understand them (perhaps some context has
been lost over the years), but their main point is "we may not need
these functions", to which I say we definitely need them because
they've been a public API for over 7 years now.

Change-Id: I43a5453003e8d64d00323eb973629a96b6b386ab

6 years agoMerge "Remove workaround for comparing database domain IDs."
jenkins-bot [Tue, 30 Jan 2018 05:55:38 +0000 (05:55 +0000)]
Merge "Remove workaround for comparing database domain IDs."

6 years agoRemove workaround for comparing database domain IDs.
daniel [Tue, 30 Jan 2018 03:43:11 +0000 (19:43 -0800)]
Remove workaround for comparing database domain IDs.

Change-Id: I240d68eddec871794ed98b7ce67773114ee73ff7

6 years agordbms: clean up non-native Database::replace() code
Aaron Schulz [Sun, 14 Jan 2018 03:57:51 +0000 (19:57 -0800)]
rdbms: clean up non-native Database::replace() code

* Make sure all unique keys specified have all their values
  provided to avoid large bogus DELETEs. Do not ignore them
  in such cases either, as that would cause inconsistencies
  between the native and non-native case. Use an exception.
* Make ChangeTags caller clearer that the list of indexes
  is not a list of fields for a single index. Also, avoid
  mentioning indexes for values not defined in the new
  records, as this causes errors or inconsistencies with
  the native vs non-native case.
* This also fixes the "Undefined index: ts_log_id" error
  when running unit tests on postgres.

Change-Id: I30263df22066bd6d4836202b1bcad5d1aa1e7383

6 years agoMerge "cleanupTitles: Don't add 'Broken/' prefix if the title is valid without it"
jenkins-bot [Tue, 30 Jan 2018 02:21:49 +0000 (02:21 +0000)]
Merge "cleanupTitles: Don't add 'Broken/' prefix if the title is valid without it"

6 years agoMerge "Use ::class to resolve class names in includes files"
jenkins-bot [Tue, 30 Jan 2018 02:16:28 +0000 (02:16 +0000)]
Merge "Use ::class to resolve class names in includes files"

6 years agoMerge ".mailmap: Fix my name to use the form used elsewhere"
jenkins-bot [Tue, 30 Jan 2018 02:09:02 +0000 (02:09 +0000)]
Merge ".mailmap: Fix my name to use the form used elsewhere"

6 years agoMerge "Make DatabaseMysqlBase::insertSelect() safer to use"
jenkins-bot [Tue, 30 Jan 2018 01:57:26 +0000 (01:57 +0000)]
Merge "Make DatabaseMysqlBase::insertSelect() safer to use"

6 years agoMerge "Hide link to ApiSandbox in ApiSandbox"
jenkins-bot [Tue, 30 Jan 2018 01:57:21 +0000 (01:57 +0000)]
Merge "Hide link to ApiSandbox in ApiSandbox"

6 years agoobjectcache: add some WANObjectCache comments to set() and delete()
Aaron Schulz [Tue, 30 Jan 2018 01:29:20 +0000 (17:29 -0800)]
objectcache: add some WANObjectCache comments to set() and delete()

Change-Id: I527f1244c5c7cece888ace25e7a01653cf2b9542

6 years agoresourceloader: Add minified version of mw.loader.implement() wrapper
Timo Tijhof [Mon, 29 Jan 2018 23:30:23 +0000 (15:30 -0800)]
resourceloader: Add minified version of mw.loader.implement() wrapper

Follows-up b7eb243d92, which changed minification to be per-module,
but had as result that the little implement() wrapper is not always
minified, e.g. when outputting modules that have minification disabled
(such as 'user.tokens' and 'user.options').

Rather than introducing some complex minification cache for the
wrapper (with a find and replace for the variable content), simply
add a hardcoded minified version of the wrapper.

Change-Id: Iccf0d3408beab4387031cc55689394ff67e1e64b

6 years agoresourceloader: Disable minify for embedded 'user.options' module
Timo Tijhof [Mon, 29 Jan 2018 23:14:19 +0000 (15:14 -0800)]
resourceloader: Disable minify for embedded 'user.options' module

Follows-up 6fa489392815 (T84960), which disabled minification
for 'user.tokens'.

In 2014 'user.tokens' module was changed to change tokens on every page view,
even for the same user within a short period of time. This led to a huge
minify-cache growth, and we subsequently disabled caching for its minification
result.

Since then, we have also done:
* Disable minification for 'user.tokens' more generally, given
  that it's just a simple JSON blob and we already pass down the 'debug' mode
  flag down to the creation of that blob, so there's virtually nothing to left
  to minify.
* Disable minification for mw.config.set(). Config values are exported by
  ResourceLoaderClientHtml and not part of any module. Given that since 2015
  we minify per-module and not per-response (b7eb243d92) that means config
  data naturally doesn't go through minification, which is good, because
  just like for 'user.tokens', the config data is JSON which is already created
  without whitespace. Minification would be pointless.

However, 'user.options' is still being minified and cached, and makes up about
25% of the 'resourceloader:minify-js.*' keys in APC on Wikimedia servers.

Unlike 'user.tokens', the minify cache for 'user.options' does actually get
used by subsequent page views from the same user (unless preferences changed).

However, it isn't useful because it's plain JSON and already compressed enough.
Besides, the blob is so small that it's not worth the overhead of cache-checking.
If we would want to minify it, I'd recommend we re-minify each view without cache.

Change-Id: Ic0ffb0e23df9b40e2c1283c89bd876a5c0555951

6 years agoMerge "Revert "selenium: add new message banner test to user spec""
jenkins-bot [Mon, 29 Jan 2018 20:55:23 +0000 (20:55 +0000)]
Merge "Revert "selenium: add new message banner test to user spec""

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 29 Jan 2018 20:54:35 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia30ac7ea1fbab5248058c09f793c583f73dc27c7

6 years agoRevert "selenium: add new message banner test to user spec"
Jdlrobson [Mon, 29 Jan 2018 19:47:07 +0000 (19:47 +0000)]
Revert "selenium: add new message banner test to user spec"

This reverts commit 6ca3e221d1b907f55462394f910f283bb3627cc9.
This is breaking CI for the Minerva skin and Echo as Echo changes how
this interaction works. When the browser test tries to locate the
div.usermessage it has moved so fails.

This test needs to be rewritten to take this into account.

On a side note, given usermessage is generated by all skins (and not
in core) there is a big argument to be made that this shouldn't be in
core but in the individual skins. MinervaNeue the mobile skin notably
does not use this class so this test would always fail on a mediawiki
instance which only uses the Minerva skin.

Bug: T185928
Change-Id: I43b6cf328aaf4a4fded0bb9746716c4cc9d8f364

6 years agoMerge "benchmarks: Add benchmarkSanitizer.php"
jenkins-bot [Mon, 29 Jan 2018 19:14:10 +0000 (19:14 +0000)]
Merge "benchmarks: Add benchmarkSanitizer.php"

6 years agoMerge "benchmarks: Add rate per second and standard deviation to output"
jenkins-bot [Mon, 29 Jan 2018 19:14:07 +0000 (19:14 +0000)]
Merge "benchmarks: Add rate per second and standard deviation to output"

6 years agoRCFilters: replace usages of deprecated getSelectedItem
Stephane Bisson [Mon, 29 Jan 2018 16:59:55 +0000 (11:59 -0500)]
RCFilters: replace usages of deprecated getSelectedItem

Use findSelectedItem instead.

Change-Id: Id13a1a94a2808910f3a2f2e434551229016ac865

6 years ago.mailmap: Fix my name to use the form used elsewhere
James D. Forrester [Mon, 29 Jan 2018 15:57:02 +0000 (07:57 -0800)]
.mailmap: Fix my name to use the form used elsewhere

Change-Id: I0468a185d19cade3f2c51947190111a66cccc129

6 years agoMerge "API: Allow to pass whitespaces in MultiValue"
jenkins-bot [Mon, 29 Jan 2018 15:31:43 +0000 (15:31 +0000)]
Merge "API: Allow to pass whitespaces in MultiValue"

6 years agoHide link to ApiSandbox in ApiSandbox
Brad Jorsch [Mon, 29 Jan 2018 14:31:16 +0000 (09:31 -0500)]
Hide link to ApiSandbox in ApiSandbox

It's a bit redundant. Wrap the paragraph with the link in an appropriate
CSS class, and add a rule to mediawiki.special.apisandbox.css to hide it
when inside ApiSandbox.

Bug: T185855
Change-Id: I118e535420e3395268fe99aa0f69f2b032340d53

6 years ago[MCR] RevisionStore::getTitle final logged fallback to master
addshore [Wed, 10 Jan 2018 16:05:46 +0000 (16:05 +0000)]
[MCR] RevisionStore::getTitle final logged fallback to master

There have been many issues with RevisionStore and titles due
to code paths that already know the title for a Revision not
passing the title into Revision in various ways or not passing
in the correct queryFlags.
The getTitle method now has a further fallback using Title::newFromID
and Title::GAID_FOR_UPDATE if not already attempted.

Bug: T183548
Bug: T183716
Bug: T183717
Bug: T183550
Bug: T183505
Bug: T184559
Bug: T184595
Change-Id: I6cf13e6baba354b08533a6151bbbc88a317be9d6

6 years agoMerge "benchmarks: Simplify benchmarkLruHash.php by using a --method option"
jenkins-bot [Mon, 29 Jan 2018 12:53:22 +0000 (12:53 +0000)]
Merge "benchmarks: Simplify benchmarkLruHash.php by using a --method option"

6 years agoMerge "selenium: add new message banner test to user spec"
jenkins-bot [Mon, 29 Jan 2018 11:53:46 +0000 (11:53 +0000)]
Merge "selenium: add new message banner test to user spec"

6 years agobenchmarks: Add benchmarkSanitizer.php
Timo Tijhof [Sat, 27 Jan 2018 17:46:12 +0000 (09:46 -0800)]
benchmarks: Add benchmarkSanitizer.php

Covering the following common methods:

* validateEmail (input=valid, input=invalid)
* encodeAttribute (input=simple, input=special)
* safeEncodeAttribute (input=simple, input=special)
* removeHTMLtags (input=small, input=large)
* stripAllTags (input=small, input=large)

Change-Id: I3c645e960607ab247bd30324a2e70eb5fbcc5d6e

6 years agobenchmarks: Add rate per second and standard deviation to output
Timo Tijhof [Sun, 28 Jan 2018 21:46:32 +0000 (13:46 -0800)]
benchmarks: Add rate per second and standard deviation to output

* Convert to using RunningStat to ensure mostly constant memory
  usage, instead of storing each result.
* Remove 'median' (no longer possible with this setup).
* Remove 'min' from output.

Change-Id: I6efbc500181eb502c1800165870eee81dbc418a7

6 years agobenchmarks: Simplify benchmarkLruHash.php by using a --method option
Timo Tijhof [Sat, 27 Jan 2018 17:06:12 +0000 (09:06 -0800)]
benchmarks: Simplify benchmarkLruHash.php by using a --method option

Easier to extend.

Change-Id: Ib9c6b3d10caad7de138d8bafd2f0e6e9bbe6a8cc

6 years agoAPI: Allow to pass whitespaces in MultiValue
Fomafix [Sun, 21 Jan 2018 20:58:59 +0000 (21:58 +0100)]
API: Allow to pass whitespaces in MultiValue

This allows to response with an invalidreason instead silently ignore
the parameter.

Example request: api.php?format=json&action=query&titles=%20

Response before this change:
{
  "batchcomplete": ""
}

Response with this change:
{
  "batchcomplete": "",
  "query": {
    "pages": {
      "-1": {
        "title": " ",
        "invalidreason": "The requested page title is empty or contains only the name of a namespace.",
        "invalid": ""
      }
    }
  }
}

Bug: T185846
Change-Id: I6fdaf32792a0e6e37b08176f975c10607093351b

6 years agoImprove MediaWiki's lock file error message when uploading files
Zoranzoki21 [Sun, 28 Jan 2018 13:56:02 +0000 (13:56 +0000)]
Improve MediaWiki's lock file error message when uploading files

Bug: T181453
Change-Id: I1e78d5eadd19c5cf203b8f4bbc8ab6d533307a15