lhc/web/wiklou.git
5 years agoUse (int) rather than intval()
Reedy [Mon, 25 Feb 2019 00:38:33 +0000 (00:38 +0000)]
Use (int) rather than intval()

Bug: T216969
Change-Id: I4c06716c83b69d128f26fa7f68736808aa2d3d64

5 years agoMerge "Return the page_id in list=iwbacklinks as an int rather than string"
jenkins-bot [Mon, 25 Feb 2019 00:31:59 +0000 (00:31 +0000)]
Merge "Return the page_id in list=iwbacklinks as an int rather than string"

5 years agoReturn the page_id in list=iwbacklinks as an int rather than string
setian [Sun, 24 Feb 2019 21:43:33 +0000 (16:43 -0500)]
Return the page_id in list=iwbacklinks as an int rather than string

Bug: T216968
Change-Id: I6645c5f1c6e76be3187c24053ed430e99c03bff4

5 years agoMerge "resourceloader: Make JSMinPlus allow reserved words as property name (ES5)"
jenkins-bot [Sun, 24 Feb 2019 22:49:26 +0000 (22:49 +0000)]
Merge "resourceloader: Make JSMinPlus allow reserved words as property name (ES5)"

5 years agoresourceloader: Make JSMinPlus allow reserved words as property name (ES5)
Ebrahim Byagowi [Wed, 20 Feb 2019 23:41:08 +0000 (03:11 +0330)]
resourceloader: Make JSMinPlus allow reserved words as property name (ES5)

This makes parse of "var a = { true: 12 };" and "var a = { true: 12 };"
possible thus making JSMinPlus ES5 compatible.

Bug: T215280
Change-Id: I84bcacf26ab8900d09958b5d961cc40e1a046698

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 24 Feb 2019 21:23:34 +0000 (22:23 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Iaa33d306da2a1daf0f99f7432b542f7bdbd72eca

5 years agoMerge "specials: Cleanup and fix PHPDoc comments"
jenkins-bot [Sun, 24 Feb 2019 18:17:35 +0000 (18:17 +0000)]
Merge "specials: Cleanup and fix PHPDoc comments"

5 years agospecials: Cleanup and fix PHPDoc comments
Derick Alangi [Sat, 23 Feb 2019 14:17:53 +0000 (15:17 +0100)]
specials: Cleanup and fix PHPDoc comments

Fix and cleanup code documentation in PHPDoc for clarity. This involves
correcting return types, parameter types and errors expected to be thrown
by methods within a class.

Change-Id: I30ba4b99d25460f84d348dd96480df67e92c69a6

5 years agoMerge "Upgrade moment from 2.19.3 to 2.24.0"
jenkins-bot [Sun, 24 Feb 2019 00:38:34 +0000 (00:38 +0000)]
Merge "Upgrade moment from 2.19.3 to 2.24.0"

5 years agoMerge "Remove comments literally documenting unit tests being unit tests"
jenkins-bot [Sun, 24 Feb 2019 00:19:54 +0000 (00:19 +0000)]
Merge "Remove comments literally documenting unit tests being unit tests"

5 years agoMerge "Sanitizer: remove deprecated parameter to escapeIdReferenceList()"
jenkins-bot [Sat, 23 Feb 2019 10:46:56 +0000 (10:46 +0000)]
Merge "Sanitizer: remove deprecated parameter to escapeIdReferenceList()"

5 years agoregistration: Fix 'ResourceLoaderWikiModule' schema validation
Kunal Mehta [Sat, 23 Feb 2019 01:17:05 +0000 (17:17 -0800)]
registration: Fix 'ResourceLoaderWikiModule' schema validation

There is a full schema for ResourceModules when the
class: ResourceLoaderWikiModule is used. Except it doesn't actually work,
since it it fails validating against that schema, it will continue to check
the other anyOf schemas, find the arbitrary class one, and pass that one.

Blacklisting ResourceLoaderWikiModule from the arbitrary class schema means
that it has to pass the specified schema for it, or fail validation.

I verified that all extensions and skins in Gerrit pass validation with this
patch.

Change-Id: Icb862088c0ca1f89ed5a57a4286dd9049d213021

5 years agoregistration: Fix 'arbitrary ResourceLoaderModule definition' schema regex
Kunal Mehta [Sat, 23 Feb 2019 01:03:01 +0000 (17:03 -0800)]
registration: Fix 'arbitrary ResourceLoaderModule definition' schema regex

We want this regex to match on everything that is not the literal string
'ResourceFileModule' or 'ResourceImageModule' (actually
'ResourceLoaderWikiModule' should be in this too, but I'll fix that in a
follow-up). But the current regex would not match if one of those was in a
substring.

The new regex should match everything that is *not* those two strings.

Bug: T216861
Change-Id: I7d888adfdc67b2075028e49432710308aa0125af

5 years agoMerge "resourceloader: Remove back compat for old packageFiles format"
jenkins-bot [Fri, 22 Feb 2019 23:32:54 +0000 (23:32 +0000)]
Merge "resourceloader: Remove back compat for old packageFiles format"

5 years agoUpgrade moment from 2.19.3 to 2.24.0
James D. Forrester [Fri, 22 Feb 2019 10:34:40 +0000 (10:34 +0000)]
Upgrade moment from 2.19.3 to 2.24.0

Bug: T191339
Change-Id: I15034d88fabd9185f3eb5ffff98ee6f9922a7bc2

5 years agoMerge "Add .phar to $wgFileBlacklist as a paranoia measure"
jenkins-bot [Fri, 22 Feb 2019 20:54:04 +0000 (20:54 +0000)]
Merge "Add .phar to $wgFileBlacklist as a paranoia measure"

5 years agoMerge "foreign-resources: Pull all moment locales, even the ones we don't yet use"
jenkins-bot [Fri, 22 Feb 2019 19:33:48 +0000 (19:33 +0000)]
Merge "foreign-resources: Pull all moment locales, even the ones we don't yet use"

5 years agoMerge "foreign-resources: Add moment to our list of resources"
jenkins-bot [Fri, 22 Feb 2019 19:33:43 +0000 (19:33 +0000)]
Merge "foreign-resources: Add moment to our list of resources"

5 years agoMerge "resourceloader: Change 'packageFiles' format to be JSON-compatible"
jenkins-bot [Fri, 22 Feb 2019 19:30:40 +0000 (19:30 +0000)]
Merge "resourceloader: Change 'packageFiles' format to be JSON-compatible"

5 years agoforeign-resources: Pull all moment locales, even the ones we don't yet use
James D. Forrester [Fri, 22 Feb 2019 10:30:11 +0000 (10:30 +0000)]
foreign-resources: Pull all moment locales, even the ones we don't yet use

This makes things simpler for configuration at a trivial cost of bytes.

Change-Id: I2d7a0dd4136ccccf1eba6c93af4ba34acfbf0886

5 years agoforeign-resources: Add moment to our list of resources
James D. Forrester [Wed, 23 Jan 2019 00:51:45 +0000 (16:51 -0800)]
foreign-resources: Add moment to our list of resources

Because we don't pull down all the locales, we current have to list
each of them. To be fixed in a follow-up.

Also add the changelog for in-repo visibility about changes, as we
have begun to make standard.

Change-Id: I839301d05877eb63279cc1dc94ffbe05f8bb0bfc

5 years agoresourceloader: Remove back compat for old packageFiles format
Roan Kattouw [Fri, 22 Feb 2019 01:31:22 +0000 (17:31 -0800)]
resourceloader: Remove back compat for old packageFiles format

Was introduced as a transitional measure in Ic566a1cd7efd075c3.

Depends-On: I717f03caf9ea8266e6a4d2b6daf4c543c0815931
Change-Id: I6ae615ea38572042f8ba705338067b393827153a

5 years agoresourceloader: Change 'packageFiles' format to be JSON-compatible
Roan Kattouw [Fri, 22 Feb 2019 01:26:23 +0000 (17:26 -0800)]
resourceloader: Change 'packageFiles' format to be JSON-compatible

The module definition format for 'packageFiles', as initially designed,
mixes sequential and associative arrays. This works in PHP, but not in
JSON. To make the format JSON compatible, use a 'name' key instead of
using the key in the main array.

Leave backwards compatibility in place so that extensions using the old
format can be migrated. This will be removed in the next commit.

Before:

'packageFiles' => [
'script.js',
'script2.js',
'config.json' => [ 'config' => [ 'Foo', 'Bar' ] ],
'data.json' => [ 'callback' => function () { ... } ],
],

After:

'packageFiles' => [
'script.js',
'script2.js',
[ 'name' => 'config.json', 'config' => [ 'Foo', 'Bar' ] ],
[ 'name' => 'data.json', 'callback' => function () { ... } ],
],

This can then be written in extension.json as:
"packageFiles": [
"script.js",
"script2.js",
[ "name": "config.json", "config": [ "Foo", "Bar" ] ],
[ "name": "data.json", "callback: [ "MyExtHooks", "getData" ] ]
]

Change-Id: Ic566a1cd7efd075c380bc50ba0cc2c329a2041d7

5 years agoMerge "Return early in Title::checkUserBlock() if user does not have a block."
jenkins-bot [Fri, 22 Feb 2019 17:37:38 +0000 (17:37 +0000)]
Merge "Return early in Title::checkUserBlock() if user does not have a block."

5 years agoselenium: prevent webdriverio automatic screenshot
Antoine Musso [Fri, 22 Feb 2019 13:58:27 +0000 (14:58 +0100)]
selenium: prevent webdriverio automatic screenshot

When the wdio configuration has screenshotPath, when a test fail a
screenshot is automatically taken. However there is no support to
specify a filename, we thus went with our own handler in afterTest hook
to have the screenshot names after the full test name.

As a result we had two screenshots taken:

A) CHROME-Error-xxx.png
B) Suite-Sometest.png

Set screenshotPath to null which disable the automatic screenshoting.
Adjust rest of code to use logPath as a base path to save screenshots.

As a side effect, it works around a nasty race condition in the
reporting. The report is generated while some test still has an
afterTest hook running. The report fail to generate and cause nodejs to
exit. The exact fix still has to be figured out though. T216818.

Bug: T216818
Change-Id: I4b53c98bd4de0d9ff850bb883ba899dd1dce0274

5 years agoMerge "ForeignResourceManager: Catch responses other than 200 OK"
jenkins-bot [Fri, 22 Feb 2019 10:44:16 +0000 (10:44 +0000)]
Merge "ForeignResourceManager: Catch responses other than 200 OK"

5 years agoMerge "Fix grammar in UserPasswordPolicy documentation"
jenkins-bot [Fri, 22 Feb 2019 09:33:27 +0000 (09:33 +0000)]
Merge "Fix grammar in UserPasswordPolicy documentation"

5 years agoMerge "Print logs generated during unit test when test fails"
jenkins-bot [Fri, 22 Feb 2019 08:01:16 +0000 (08:01 +0000)]
Merge "Print logs generated during unit test when test fails"

5 years agoMerge "build: Increase fresnel runs to 5, and add more scenarios"
jenkins-bot [Fri, 22 Feb 2019 05:02:56 +0000 (05:02 +0000)]
Merge "build: Increase fresnel runs to 5, and add more scenarios"

5 years agoAdd .phar to $wgFileBlacklist as a paranoia measure
Brian Wolff [Fri, 22 Feb 2019 04:31:56 +0000 (04:31 +0000)]
Add .phar to $wgFileBlacklist as a paranoia measure

Seems like it can't hurt.

Change-Id: I833dd95742d7de772833c738ca7f5403e57bc2f4

5 years agoSanitizer: remove deprecated parameter to escapeIdReferenceList()
Max Semenik [Fri, 22 Feb 2019 04:12:22 +0000 (20:12 -0800)]
Sanitizer: remove deprecated parameter to escapeIdReferenceList()

Change-Id: Iacd5796718c1d64e7290cfd9669c99d8f9e85dc5

5 years agoMerge "ApiQueryUserContribs: Only use 'contributions' replica if querying by user ID"
jenkins-bot [Fri, 22 Feb 2019 03:58:47 +0000 (03:58 +0000)]
Merge "ApiQueryUserContribs: Only use 'contributions' replica if querying by user ID"

5 years agoMerge "Follow-up I68179974: Remove from 1.33 RL, backported to 1.32"
jenkins-bot [Fri, 22 Feb 2019 03:55:59 +0000 (03:55 +0000)]
Merge "Follow-up I68179974: Remove from 1.33 RL, backported to 1.32"

5 years agoReturn early in Title::checkUserBlock() if user does not have a block.
David Barratt [Sat, 16 Feb 2019 06:08:10 +0000 (01:08 -0500)]
Return early in Title::checkUserBlock() if user does not have a block.

To reduce the overhead of the block checks, return early if the user does not
have a block.

Bug: T216309
Change-Id: I14930fcb7987cbc83294497ab54fcfeeedc94bfe

5 years agobuild: Increase fresnel runs to 5, and add more scenarios
Timo Tijhof [Tue, 19 Feb 2019 16:28:41 +0000 (16:28 +0000)]
build: Increase fresnel runs to 5, and add more scenarios

Also remove unrecognised 'alerts' property from Fresnel config.
That isn't a feature (yet) :)

Change-Id: I45820de67a20c4f0e614b9e845a186f157cab3f4

5 years agoMerge "Apply the pseudo-css selector rules to diff and changelist pages"
jenkins-bot [Fri, 22 Feb 2019 00:32:52 +0000 (00:32 +0000)]
Merge "Apply the pseudo-css selector rules to diff and changelist pages"

5 years agoApply the pseudo-css selector rules to diff and changelist pages
jdlrobson [Wed, 9 Jan 2019 00:30:18 +0000 (16:30 -0800)]
Apply the pseudo-css selector rules to diff and changelist pages

The styles that we are applying on changelist pages should also
apply on diff pages. This generalises the rules into a new
module.

To avoid problems with cached HTML mediawiki.special.changeslist
temporarily loads resources/src/mediawiki.interface.helpers.styles.
This will be removed after the change has been in production for a
week.

Bug: T212613
Change-Id: I6aad563e48f41c783df8b176a4f437e60a1255cc

5 years agoForeignResourceManager: Catch responses other than 200 OK
Timo Tijhof [Thu, 21 Feb 2019 23:44:56 +0000 (23:44 +0000)]
ForeignResourceManager: Catch responses other than 200 OK

Makes it easier to catch issues like at I839301d05877eb63279c.

Change-Id: I22b9af7bf36a256d8363ed96fe42c087e0c8a895

5 years agoMerge "RCFilters: Export config vars in the RL modules where possible (take 2)"
jenkins-bot [Thu, 21 Feb 2019 21:57:49 +0000 (21:57 +0000)]
Merge "RCFilters: Export config vars in the RL modules where possible (take 2)"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 21 Feb 2019 20:55:49 +0000 (21:55 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibb1121f0765cd41ba7f8b6cfafb6e88d30021820

5 years agoMerge "Block: Remove unnecessary lines related to old use of Block::prevents"
jenkins-bot [Thu, 21 Feb 2019 20:29:54 +0000 (20:29 +0000)]
Merge "Block: Remove unnecessary lines related to old use of Block::prevents"

5 years agoBlock: Remove unnecessary lines related to old use of Block::prevents
Thalia [Wed, 20 Feb 2019 10:40:59 +0000 (10:40 +0000)]
Block: Remove unnecessary lines related to old use of Block::prevents

Block::prevents simply returns true for 'edit'. In Block::newLoad,
prevents was called as a setter with 'edit', but there was nothing
to set - this call was removed in I0e1316964192113. This patch
removes some more lines related to that call.

Originally added in r84475 (6dbcdc1be097) for T15611.

Change-Id: I8778229d7adfcdee9e21cf560462ef7e7d1c67b3

5 years agoMerge "mediawiki.ui: Align button height to standard (and input)"
jenkins-bot [Thu, 21 Feb 2019 20:01:50 +0000 (20:01 +0000)]
Merge "mediawiki.ui: Align button height to standard (and input)"

5 years agoMerge "Separate out different functionalities of Block::prevents"
jenkins-bot [Thu, 21 Feb 2019 19:20:03 +0000 (19:20 +0000)]
Merge "Separate out different functionalities of Block::prevents"

5 years agoSeparate out different functionalities of Block::prevents
Thalia [Sat, 9 Feb 2019 12:17:54 +0000 (12:17 +0000)]
Separate out different functionalities of Block::prevents

Block::prevents plays several different roles:
* acts as get/setter for Boolean properties that correspond to
ipb_create_account, ipb_block_email and ipb_allow_usertalk
* calculates whether a block blocks a given right, based on Block
properties, global configs, white/blacklists and anonymous user
rights
* decides whether a block prevents editing of the target's own
user talk page (listed separately because 'editownusertalk' is
not a right)

This patch:
* renames mDisableUsertalk to allowEditUsertalk (and reverses the
value), to match the field ipb_allow_usertalk and make this logic
easier to follow
* renames mCreateAccount to blockCreateAccount, to make it clear
that the flag blocks account creation when true, and make this
logic easier to follow
* decouples the block that is stored in the database (which now
reflects the form that the admin submitted) and the behaviour of
the block on enforcement (since the properties set by the admin
can be overridden by global configs) - so if the global configs
change, the block behaviour could too
* creates get/setters for blockCreateAccount, mBlockEmail and
allowEditUsertalk properties
* creates appliesToRight, exclusively for checking whether the
block blocks a given right, taking into account the block
properties, global configs and anonymous user rights
* creates appliesToUsertalk, for checking whether the block
blocks a user from editing their own talk page. The block is
unaware of the user trying to make the edit, and this user is not
always the same as the block target, e.g. if the block target is
an IP range. Therefore the user's talk page is passed in to this
method. appliesToUsertalk can be called from anywhere where the
user is known
* uses the get/setters wherever Block::prevents was being used as
such
* uses appliesToRight whenever Block::prevents was being used to
determine if the block blocks a given right
* uses appliesToUsertalk in User::isBlockedFrom

Bug: T211578
Bug: T214508
Change-Id: I0e131696419211319082cb454f4f05297e55d22e

5 years agoMerge "Add language support for Saisiyat (xsy)"
jenkins-bot [Thu, 21 Feb 2019 18:03:10 +0000 (18:03 +0000)]
Merge "Add language support for Saisiyat (xsy)"

5 years agoMerge "Uncheck "create account" on Special:Block for partial blocks"
jenkins-bot [Thu, 21 Feb 2019 17:45:46 +0000 (17:45 +0000)]
Merge "Uncheck "create account" on Special:Block for partial blocks"

5 years agoAdd language support for Saisiyat (xsy)
MarcoAurelio [Tue, 19 Feb 2019 21:21:22 +0000 (22:21 +0100)]
Add language support for Saisiyat (xsy)

Bug: T216479
Change-Id: Ide1c708c2cf3124794da650667ab140b1f4e9f5e

5 years agoApiQueryUserContribs: Only use 'contributions' replica if querying by user ID
Brad Jorsch [Thu, 21 Feb 2019 15:47:07 +0000 (10:47 -0500)]
ApiQueryUserContribs: Only use 'contributions' replica if querying by user ID

When querying by user name or actor ID, the partitioning on the
'contributions' replicas makes things worse rather than better.

Bug: T216656
Change-Id: Ib4caf19d8fad64c527dee99667e425fd3e4b1a16

5 years agoMerge "Update OOUI to v0.30.3"
jenkins-bot [Thu, 21 Feb 2019 15:58:49 +0000 (15:58 +0000)]
Merge "Update OOUI to v0.30.3"

5 years agoMerge "Remove suggestions for negative namespaces in Page Restrictions"
jenkins-bot [Thu, 21 Feb 2019 15:26:35 +0000 (15:26 +0000)]
Merge "Remove suggestions for negative namespaces in Page Restrictions"

5 years agoMerge "mw.widgets.TitleWidget: Add 'excludeDynamicNamespaces' config"
jenkins-bot [Thu, 21 Feb 2019 15:26:00 +0000 (15:26 +0000)]
Merge "mw.widgets.TitleWidget: Add 'excludeDynamicNamespaces' config"

5 years agomediawiki.ui: Align button height to standard (and input)
Volker E [Thu, 21 Feb 2019 07:56:44 +0000 (23:56 -0800)]
mediawiki.ui: Align button height to standard (and input)

Aligning to standard height of `32px` at base font size of `14px`,
mediawiki.ui's inputs and OOUI.

Bug: T209455
Change-Id: I3ef5bb0920aadd22667f0a9b3701e6714bc04133

5 years agoUpdate OOUI to v0.30.3
James D. Forrester [Thu, 21 Feb 2019 11:08:08 +0000 (11:08 +0000)]
Update OOUI to v0.30.3

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

Bug: T215559
Bug: T216070
Bug: T216075
Bug: T216578
Bug: T216582
Depends-On: Ic5a4598bbb222fa4b98c2706fe909aa9eb297f4b
Change-Id: Ic5a4598bbb222fa4b98c2706fe909aa9eb297f4a

5 years agoMerge "build: Update eslint-config-wikimedia to 0.11.0"
jenkins-bot [Thu, 21 Feb 2019 10:37:50 +0000 (10:37 +0000)]
Merge "build: Update eslint-config-wikimedia to 0.11.0"

5 years agoMerge "Add support for Argon2 password hashing"
jenkins-bot [Thu, 21 Feb 2019 07:24:52 +0000 (07:24 +0000)]
Merge "Add support for Argon2 password hashing"

5 years agoMerge "Set $wgMediaInTargetLanguage to true by default"
jenkins-bot [Thu, 21 Feb 2019 06:54:45 +0000 (06:54 +0000)]
Merge "Set $wgMediaInTargetLanguage to true by default"

5 years agoMerge "Set BlockDisablesLogin false for Blocking group tests that assume this"
jenkins-bot [Thu, 21 Feb 2019 04:30:09 +0000 (04:30 +0000)]
Merge "Set BlockDisablesLogin false for Blocking group tests that assume this"

5 years agoSet $wgMediaInTargetLanguage to true by default
Max Semenik [Thu, 21 Feb 2019 04:26:46 +0000 (20:26 -0800)]
Set $wgMediaInTargetLanguage to true by default

This feature flag is still unreleased, flipping it on by default
in preparation for removal.

Change-Id: Ice3c3d7e35023d93afb85d43f838c18dae9a9c3a

5 years agoRCFilters: Export config vars in the RL modules where possible (take 2)
Catrope [Fri, 15 Feb 2019 22:12:02 +0000 (22:12 +0000)]
RCFilters: Export config vars in the RL modules where possible (take 2)

This reverts commit 492969e12bb34c6832213769d822d0b3d564550c
and reinstates commit bf4f9d0313495dd67a53b9925edf9a3cc6ef36fe.

Bug: T201574
Depends-On: I58901657daf3e82229a303d8fe7a2c051ffe7634
Change-Id: I1b0a777760d4c2a149415da0d2068e6bfea5b917

5 years agobuild: Update eslint-config-wikimedia to 0.11.0
Ed Sanders [Wed, 20 Feb 2019 22:53:09 +0000 (22:53 +0000)]
build: Update eslint-config-wikimedia to 0.11.0

Change-Id: Iee025a518962e68c5ec2c07d952f402cd2a7f69b

5 years agoMerge "Database: Have buildStringCast() actually cast for MySQL, MSSQL"
jenkins-bot [Wed, 20 Feb 2019 22:14:37 +0000 (22:14 +0000)]
Merge "Database: Have buildStringCast() actually cast for MySQL, MSSQL"

5 years agoMerge "Fix password policy handling in temporary password provider"
jenkins-bot [Wed, 20 Feb 2019 20:48:33 +0000 (20:48 +0000)]
Merge "Fix password policy handling in temporary password provider"

5 years agoMerge "Make uca-tr use I as uppercase of dotless ı instead of reverse"
jenkins-bot [Wed, 20 Feb 2019 20:25:59 +0000 (20:25 +0000)]
Merge "Make uca-tr use I as uppercase of dotless ı instead of reverse"

5 years agoFix password policy handling in temporary password provider
Gergő Tisza [Tue, 19 Feb 2019 04:19:13 +0000 (20:19 -0800)]
Fix password policy handling in temporary password provider

Fix breakage caused by f15ecc60cd94. Also use correct check name.

Bug: T216196
Change-Id: Id2567adf8334742ef18a59a6c7e74b2b780ab43a

5 years agoMerge "Add missing use for IMaintainableDatabase"
jenkins-bot [Wed, 20 Feb 2019 20:15:38 +0000 (20:15 +0000)]
Merge "Add missing use for IMaintainableDatabase"

5 years agoMerge "DifferenceEngine: Allow cache hits for empty diffs"
jenkins-bot [Wed, 20 Feb 2019 20:01:20 +0000 (20:01 +0000)]
Merge "DifferenceEngine: Allow cache hits for empty diffs"

5 years agoAdd missing use for IMaintainableDatabase
Umherirrender [Wed, 20 Feb 2019 19:57:18 +0000 (20:57 +0100)]
Add missing use for IMaintainableDatabase

Change-Id: I00b30466fa6044988768493586993c3db253c975

5 years agoDatabase: Have buildStringCast() actually cast for MySQL, MSSQL
Brad Jorsch [Wed, 20 Feb 2019 19:41:55 +0000 (14:41 -0500)]
Database: Have buildStringCast() actually cast for MySQL, MSSQL

While these databases allow implicit casts (at least from int to
string), in MySQL at least the implicit cast can prevent appropriate
index usage (see T216183). So let's have buildStringCast() actually do
the cast.

This also changes the base implementation in Wikimedia\Rdmbs\Database to
explicitly cast. Any other subclasses should check whether this new
version works for them.

Bug: T216247
Change-Id: I98c67c857b35de3191d47ab28810d8eb21ddbbc8

5 years agoFix grammar in UserPasswordPolicy documentation
Thalia [Wed, 20 Feb 2019 19:47:39 +0000 (19:47 +0000)]
Fix grammar in UserPasswordPolicy documentation

Change-Id: I423d5ce9f9a778ee21381ba433a52b8bd3e154fc

5 years agoMerge "API: Spread autoblocks from action=edit and action=move"
jenkins-bot [Wed, 20 Feb 2019 19:31:44 +0000 (19:31 +0000)]
Merge "API: Spread autoblocks from action=edit and action=move"

5 years agoMerge "API: Add block info to more block errors"
jenkins-bot [Wed, 20 Feb 2019 19:24:49 +0000 (19:24 +0000)]
Merge "API: Add block info to more block errors"

5 years agoMake uca-tr use I as uppercase of dotless ı instead of reverse
Brian Wolff [Wed, 20 Feb 2019 16:55:44 +0000 (16:55 +0000)]
Make uca-tr use I as uppercase of dotless ı instead of reverse

The primary collision resolution makes wrong choice

Bug: T203158
Change-Id: Id677476937cc6575950496767b50c1e8c21f2fbc

5 years agoMerge "resourceloader: Tolerate string as deps for test suites"
jenkins-bot [Wed, 20 Feb 2019 16:18:02 +0000 (16:18 +0000)]
Merge "resourceloader: Tolerate string as deps for test suites"

5 years agoresourceloader: Tolerate string as deps for test suites
James D. Forrester [Wed, 20 Feb 2019 12:55:51 +0000 (12:55 +0000)]
resourceloader: Tolerate string as deps for test suites

Change-Id: I53a5fd0f3716e50abd10e4cae1de6329e7b0f6e8

5 years agoMerge "objectcache: avoid duplicate cache sets for missing keys with lockTSE"
jenkins-bot [Wed, 20 Feb 2019 15:37:21 +0000 (15:37 +0000)]
Merge "objectcache: avoid duplicate cache sets for missing keys with lockTSE"

5 years agoMerge "Various fixes for phan-taint-check"
jenkins-bot [Wed, 20 Feb 2019 03:07:24 +0000 (03:07 +0000)]
Merge "Various fixes for phan-taint-check"

5 years agoobjectcache: avoid duplicate cache sets for missing keys with lockTSE
Aaron Schulz [Thu, 14 Feb 2019 03:56:05 +0000 (19:56 -0800)]
objectcache: avoid duplicate cache sets for missing keys with lockTSE

Follow-up to 70bf85d4626 which only affected the case of tombstoned keys.

Improve documentation about getWithSetCallback() options.

Bug: T203786
Change-Id: I683a38f65a79cb98a4ae71cbc5dd88aefe48d022

5 years agoMerge "eslint: Enable caching"
jenkins-bot [Wed, 20 Feb 2019 00:32:14 +0000 (00:32 +0000)]
Merge "eslint: Enable caching"

5 years agoMerge "TOC: Add z-index: -1 to hidden checkbox"
jenkins-bot [Wed, 20 Feb 2019 00:32:07 +0000 (00:32 +0000)]
Merge "TOC: Add z-index: -1 to hidden checkbox"

5 years agoAPI: Spread autoblocks from action=edit and action=move
Brad Jorsch [Mon, 18 Feb 2019 19:46:05 +0000 (14:46 -0500)]
API: Spread autoblocks from action=edit and action=move

The code in EditPage and SpecialMovepage does this primarily in web UI
code paths that aren't called by the API. EditPage also has a check in
the internal code path used by the API, but ApiEditPage runs its own
permissions check first and won't reach that code path.

Bug: T216245
Change-Id: I6263c8b60a24f3195dba583463f1ce4b004f82f5

5 years agoAPI: Add block info to more block errors
Brad Jorsch [Mon, 18 Feb 2019 20:30:41 +0000 (15:30 -0500)]
API: Add block info to more block errors

When using ApiBase::errorArrayToStatus(), block info was added to
'blocked' errors. But when using dieStatus() with a Status object
returned by core MediaWiki code, block info was not being added.

Change-Id: I14887b6dd76d665055283945b956b2e26c521ed5
Depends-On: Ie3addf53ab5fabf1c24e1033b58e63927f4e21bf

5 years agoMerge "MultiHttpClient: Don't relay the end-of-headers line"
jenkins-bot [Tue, 19 Feb 2019 21:49:35 +0000 (21:49 +0000)]
Merge "MultiHttpClient: Don't relay the end-of-headers line"

5 years agoMerge "RCFilters: Don't show tags with 0 hits in tag menu"
jenkins-bot [Tue, 19 Feb 2019 21:47:54 +0000 (21:47 +0000)]
Merge "RCFilters: Don't show tags with 0 hits in tag menu"

5 years agoMerge "pagers: Remove unused "form" properties from two pagers"
jenkins-bot [Tue, 19 Feb 2019 21:34:50 +0000 (21:34 +0000)]
Merge "pagers: Remove unused "form" properties from two pagers"

5 years agoMultiHttpClient: Don't relay the end-of-headers line
Brad Jorsch [Tue, 19 Feb 2019 18:54:03 +0000 (13:54 -0500)]
MultiHttpClient: Don't relay the end-of-headers line

The callback registered by CURLOPT_HEADERFUNCTION is called for the
empty line that separates the headers from the body, as well as all the
actual headers. In this case, the $header string will be "\r\n".

It turns out that HHVM ignores a call to header() when passed a string
that's empty after trimming whitespace, while Zend PHP only ignores the
call when the string is empty before trimming whitespace. This later
causes problems when headers_list() is used expecting all strings
returned to contain a colon.

Bug: T216086
Change-Id: I07937b17beb06788166266fbb1ea1bbf456761e3

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 19 Feb 2019 21:01:52 +0000 (22:01 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I1959bd49bd394c4a206843a2967111df1de9081d

5 years agoDifferenceEngine: Allow cache hits for empty diffs
Brad Jorsch [Tue, 19 Feb 2019 20:54:33 +0000 (15:54 -0500)]
DifferenceEngine: Allow cache hits for empty diffs

PHP considers the empty string as falsey, so check for a string
result instead.

Bug: T216554
Change-Id: I3b7d1199acbfede8a95761c5cb1c797b9a3d64cb

5 years agoRCFilters: Don't show tags with 0 hits in tag menu
Roan Kattouw [Tue, 19 Feb 2019 20:53:53 +0000 (12:53 -0800)]
RCFilters: Don't show tags with 0 hits in tag menu

Bug: T182219
Change-Id: Id6b4c6fe652c15388f0d6b37912cb582ea205a47

5 years agopagers: Remove unused "form" properties from two pagers
Thiemo Kreuz [Tue, 19 Feb 2019 14:31:45 +0000 (15:31 +0100)]
pagers: Remove unused "form" properties from two pagers

I used
https://codesearch.wmflabs.org/search/?q=BlockListPager
https://codesearch.wmflabs.org/search/?q=ProtectedPagesPager
to make sure no subclass of these two classes exist, as well as no
other code that uses them in the first place.

I would like to argue that this does not need a deprecation phase.

Change-Id: If66f2378bc88adb5e8a6df5e637714be135dfafd

5 years agoTOC: Add z-index: -1 to hidden checkbox
Fomafix [Tue, 19 Feb 2019 20:13:41 +0000 (21:13 +0100)]
TOC: Add z-index: -1 to hidden checkbox

The hidden checkbox is not visible but still clickable and changes the
cursor. The z-index: -1 prevent this.

Also add comments to explain the reason for each declaration.

This change is a follow-up to 68527cf47935a0350d3f0a153bd06cbb98062ec8.

Change-Id: Ia66f4fb250d1685fe5bb0089b789b36d9916a5d5

5 years agoSet BlockDisablesLogin false for Blocking group tests that assume this
Thalia [Tue, 19 Feb 2019 20:16:21 +0000 (20:16 +0000)]
Set BlockDisablesLogin false for Blocking group tests that assume this

The global config $wgBlockDisablesLogin can override certain block flags
if true, causing some tests to fail. Set it to false for these tests.

Change-Id: I497ef07bd34a1e458fd9692ef4874474e61151c8

5 years agoeslint: Enable caching
Ed Sanders [Tue, 19 Feb 2019 19:57:08 +0000 (19:57 +0000)]
eslint: Enable caching

Makes re-running eslint faster on dev environments.

Change-Id: I3bd7932b49de35022898cdc8add1934633e6dacb

5 years agopagers: Fix and add missing @param documentation
Thiemo Kreuz [Tue, 19 Feb 2019 14:27:25 +0000 (15:27 +0100)]
pagers: Fix and add missing @param documentation

Sometimes the code expects a specific subclass as it calls a specific
method that only exists in this subclass. If this is not the case, all
the code needs to know is that it got some special page.

Some of these constructors should be changed to expect a IContextSource
instead of a special page. But this is for another patch. Here in this
patch I intentionally touch documentation only.

Change-Id: I33bae9641a8871f359edccacf88f09cfe8e83139

5 years agoMerge "resourceloader: Make $rl parameter mandatory for MessageBlobStore"
jenkins-bot [Tue, 19 Feb 2019 17:49:17 +0000 (17:49 +0000)]
Merge "resourceloader: Make $rl parameter mandatory for MessageBlobStore"

5 years agoresourceloader: Make $rl parameter mandatory for MessageBlobStore
Timo Tijhof [Sat, 16 Feb 2019 23:46:30 +0000 (23:46 +0000)]
resourceloader: Make $rl parameter mandatory for MessageBlobStore

Change-Id: I851b2417b7e495a1d0c7ee1aa8be2b2e970840bb

5 years agobuild: Add initial version of Fresnel config
Timo Tijhof [Tue, 5 Feb 2019 20:57:11 +0000 (20:57 +0000)]
build: Add initial version of Fresnel config

Copied from fresnel.git (removed there with I742c56122).

Bug: T133646
Change-Id: I23e7e9bc6343cf9e14dbfe275c1cdbb4cc5bd76d

5 years agoFollow-up 262fd58: Correctly apply the ORDER BY in ActiveUsersPager
mainframe98 [Tue, 19 Feb 2019 15:01:59 +0000 (16:01 +0100)]
Follow-up 262fd58: Correctly apply the ORDER BY in ActiveUsersPager

In 262fd58, an ORDER BY clause was added, but the direction it
is supposed to use was not loaded correctly from the $data array.
It is available under the key 'order', not 'dir'.

Bug: T216200
Change-Id: I5e675c98820813cd9107865e11e82ae57828a974

5 years agoRemove comments literally documenting unit tests being unit tests
Thiemo Kreuz [Tue, 19 Feb 2019 14:18:12 +0000 (15:18 +0100)]
Remove comments literally documenting unit tests being unit tests

The name of the test class and method as well as the @covers tags already
explain well enough which code a test is testing. Repeating this does not
provide additional information.

Change-Id: Ieec4ec131e5925d11704a11e1df46bc00c9fad9b

5 years agoMerge "Remove deprecated method insertArticleLink() from class ChangeList"
jenkins-bot [Tue, 19 Feb 2019 12:49:46 +0000 (12:49 +0000)]
Merge "Remove deprecated method insertArticleLink() from class ChangeList"