lhc/web/wiklou.git
5 years agoMove FauxResponse class to own file
Umherirrender [Fri, 15 Feb 2019 19:11:49 +0000 (20:11 +0100)]
Move FauxResponse class to own file

Similar to FauxRequest

Change-Id: Ia9e4e7287ade605899d935db7c9f1f017e0bcb85

5 years agoMerge "Show password policy flags on Special:PasswordPolicies"
jenkins-bot [Sat, 2 Mar 2019 03:51:05 +0000 (03:51 +0000)]
Merge "Show password policy flags on Special:PasswordPolicies"

5 years agoShow password policy flags on Special:PasswordPolicies
Gergő Tisza [Sun, 20 Jan 2019 02:16:51 +0000 (18:16 -0800)]
Show password policy flags on Special:PasswordPolicies

Follow-up to I28c31fc4ea.

Also improves what policy values are considered disabled, documents
how to extend core checks/flags and adds a structure test for it.

Bug: T118774
Change-Id: I66bf396e8e8a8c310a47ba337abe9070e7e83ff6

5 years agoMerge "Simplify strings in PHP code"
jenkins-bot [Fri, 1 Mar 2019 22:03:26 +0000 (22:03 +0000)]
Merge "Simplify strings in PHP code"

5 years agoMerge "maintenance: Replace custom .ext extraction with pathinfo()"
jenkins-bot [Fri, 1 Mar 2019 21:51:24 +0000 (21:51 +0000)]
Merge "maintenance: Replace custom .ext extraction with pathinfo()"

5 years agoMerge "Add mediawiki.interface.helpers.styles where it is needed"
jenkins-bot [Fri, 1 Mar 2019 21:17:55 +0000 (21:17 +0000)]
Merge "Add mediawiki.interface.helpers.styles where it is needed"

5 years agoSimplify strings in PHP code
Fomafix [Fri, 1 Mar 2019 21:15:22 +0000 (22:15 +0100)]
Simplify strings in PHP code

Change-Id: I481810ade68b0c5a5be21d22e2a107646d5813e6

5 years agoMerge "Add UserSendConfirmationMail hook"
jenkins-bot [Fri, 1 Mar 2019 20:25:21 +0000 (20:25 +0000)]
Merge "Add UserSendConfirmationMail hook"

5 years agoMerge "Hygiene: use null-coalescing operator when operating on tags"
jenkins-bot [Fri, 1 Mar 2019 19:31:55 +0000 (19:31 +0000)]
Merge "Hygiene: use null-coalescing operator when operating on tags"

5 years agoAdd mediawiki.interface.helpers.styles where it is needed
jdlrobson [Thu, 28 Feb 2019 21:12:26 +0000 (13:12 -0800)]
Add mediawiki.interface.helpers.styles where it is needed

Bug: T212613
Change-Id: I7d5920c3464838f68dc1169779e2f2662a3e336e

5 years agoHygiene: use null-coalescing operator when operating on tags
Piotr Miazga [Fri, 1 Mar 2019 18:13:28 +0000 (19:13 +0100)]
Hygiene: use null-coalescing operator when operating on tags

Change-Id: I7d5b4e05ee6c010b4f9438bc4871a3369b1871a6

5 years agoReplace lowercase {@inheritdoc} with @inheritDoc
Thiemo Kreuz [Tue, 26 Feb 2019 12:57:24 +0000 (13:57 +0100)]
Replace lowercase {@inheritdoc} with @inheritDoc

According to the coding standards we even enforce with a custom PHPCS sniff.
It currently does not pick these mistakes up because of the curly brackets.
I'm not sure if this is worth an update of the PHPCS sniff. I wanted to
suggest this fix anyway.

Change-Id: I9041ea7a00baf7f55e0ff0e56879a89fb74bb479

5 years agomaintenance: Add missing limit parameters to some explode()
Thiemo Kreuz [Thu, 28 Feb 2019 08:55:50 +0000 (09:55 +0100)]
maintenance: Add missing limit parameters to some explode()

This is, in theory, a loophole that can not only cause such code to
consume suprising amounts of memory and runtime. It can also create
suprising results. For example, an input like

 -param="might contain a = char"

might result in a cut-off value.

Not so much of a problem in a maintenance script. But still good
practice, I find.

Change-Id: I14fb278e6fdb61d0c486ca7e23229851ea479408

5 years agoMerge "rdbms: document Database::doQuery() return value"
jenkins-bot [Fri, 1 Mar 2019 03:00:21 +0000 (03:00 +0000)]
Merge "rdbms: document Database::doQuery() return value"

5 years agoMerge "Avoid use of deprecated ObjectCache::getMainWANInstance method"
jenkins-bot [Fri, 1 Mar 2019 02:58:34 +0000 (02:58 +0000)]
Merge "Avoid use of deprecated ObjectCache::getMainWANInstance method"

5 years agoMerge "obectcache: split out some WAN cache refresh logic into scheduleAsyncRefresh()"
jenkins-bot [Fri, 1 Mar 2019 02:50:11 +0000 (02:50 +0000)]
Merge "obectcache: split out some WAN cache refresh logic into scheduleAsyncRefresh()"

5 years agoAvoid use of deprecated ObjectCache::getMainWANInstance method
Aaron Schulz [Thu, 28 Feb 2019 20:42:20 +0000 (12:42 -0800)]
Avoid use of deprecated ObjectCache::getMainWANInstance method

Change-Id: I429e68c8642a00afa812f5ae900c1fb4f8308528

5 years agoMerge "Remove comments literally repeating the next line of code"
jenkins-bot [Fri, 1 Mar 2019 02:37:27 +0000 (02:37 +0000)]
Merge "Remove comments literally repeating the next line of code"

5 years agordbms: document Database::doQuery() return value
Aaron Schulz [Fri, 1 Mar 2019 02:21:49 +0000 (18:21 -0800)]
rdbms: document Database::doQuery() return value

Removed random @throws tag from a subclass while at it

Change-Id: I1cad1f66b62bb4a306feb5c773ed5556891f82a7

5 years agoMerge "Fix is_array check in ResourceLoaderImageModule"
jenkins-bot [Fri, 1 Mar 2019 01:25:03 +0000 (01:25 +0000)]
Merge "Fix is_array check in ResourceLoaderImageModule"

5 years agoRCFilters: Make SaveFiltersPopup header's label and icon wrap
Volker E [Fri, 1 Mar 2019 00:17:02 +0000 (16:17 -0800)]
RCFilters: Make SaveFiltersPopup header's label and icon wrap

Wrapping SaveFiltersPopup header's label and icon in languages like
Catalan and German.
Also re-positioning close button from absolute top and remove duplicated,
inherited properties.

Change-Id: I3fd35b237f82ab95b66e6e710cba36cf1887618f

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

Change-Id: Ibd3587a45d063cdd7f7276bd15319f1067819eab

5 years agoFix is_array check in ResourceLoaderImageModule
Umherirrender [Thu, 28 Feb 2019 20:06:53 +0000 (21:06 +0100)]
Fix is_array check in ResourceLoaderImageModule

Checking the variable used as expression in the foreach seems wrong.
Also the var is already checked before, so this is the wrong var name

Change-Id: Ia2a7352422ace1e78949a2009b0ad1f16681fc74

5 years agoMerge "DateTimeFormatter: Use mw.RegExp.escape from 'mediawiki.RegExp'"
jenkins-bot [Thu, 28 Feb 2019 14:25:08 +0000 (14:25 +0000)]
Merge "DateTimeFormatter: Use mw.RegExp.escape from 'mediawiki.RegExp'"

5 years agoMerge "Preferences: Remove href="#" from stub threshold sample link"
jenkins-bot [Thu, 28 Feb 2019 14:25:03 +0000 (14:25 +0000)]
Merge "Preferences: Remove href="#" from stub threshold sample link"

5 years agoPreferences: Remove href="#" from stub threshold sample link
Fomafix [Mon, 18 Feb 2019 09:03:56 +0000 (10:03 +0100)]
Preferences: Remove href="#" from stub threshold sample link

* Prevents the sample link from being focusable and selectable via
  keyboard navigation.
* Prevents the sample link from being clicked, which would switch
  to the first preferences tab and scroll to the top, unhelpfully.
* Since 4f8967672d an <a> without an href also has cursor:pointer on
  hover.

Change-Id: I679e277d17dc679177c29d557806c9a9e91c6703

5 years agoAdd missing dependency on module 'mediawiki.RegExp'
Fomafix [Thu, 28 Feb 2019 13:16:17 +0000 (14:16 +0100)]
Add missing dependency on module 'mediawiki.RegExp'

moment-locale-overrides.js uses mw.RegExp.escape() from module
'mediawiki.RegExp'.

Change-Id: Iac669355ca1c763a34b28badc2bac3fd08e57db9

5 years agoMerge "mw-ui-radio, mw-ui-checkbox: Don't reset every font style"
jenkins-bot [Thu, 28 Feb 2019 12:31:31 +0000 (12:31 +0000)]
Merge "mw-ui-radio, mw-ui-checkbox: Don't reset every font style"

5 years agomaintenance: Replace custom .ext extraction with pathinfo()
Thiemo Kreuz [Thu, 28 Feb 2019 10:47:07 +0000 (11:47 +0100)]
maintenance: Replace custom .ext extraction with pathinfo()

Note the custom code was not working correctly for filenames that do
not contain a dot. I assume this is not relevant for the filenames this
code needs to process.

Change-Id: Id4578bc86203dcbd9f76928bbec71a2c46176e11

5 years agoDateTimeFormatter: Use mw.RegExp.escape from 'mediawiki.RegExp'
Fomafix [Thu, 28 Feb 2019 08:49:33 +0000 (09:49 +0100)]
DateTimeFormatter: Use mw.RegExp.escape from 'mediawiki.RegExp'

Change-Id: I7aa0264f58d7f79fd80da2a3bb37caa767d78474

5 years agoMerge "maintenance: Remove arguments that match their default values"
jenkins-bot [Thu, 28 Feb 2019 08:42:04 +0000 (08:42 +0000)]
Merge "maintenance: Remove arguments that match their default values"

5 years agomw-ui-radio, mw-ui-checkbox: Don't reset every font style
Santhosh Thottingal [Tue, 26 Feb 2019 12:02:00 +0000 (17:32 +0530)]
mw-ui-radio, mw-ui-checkbox: Don't reset every font style

The following existing style:

.client-js .mw-ui-radio:not( #noop ) {
 * {
font: inherit;
  }
}

is a strong reset, preventing any font style customization such
as a bold label for .mw-ui-radio.

Change it only to font-size as required for the original reason
for override. Same for .mw-ui-checkbox

I am not sure whether this override is required now, but not going
in to that now.

Change-Id: I5d1815bcfa897bdb03c81be11f63e1acb9412c10

5 years agoobectcache: split out some WAN cache refresh logic into scheduleAsyncRefresh()
Aaron Schulz [Thu, 28 Feb 2019 01:13:40 +0000 (17:13 -0800)]
obectcache: split out some WAN cache refresh logic into scheduleAsyncRefresh()

Change-Id: If5f895a0d38cd0d6861125000df4fcfc66f1eeb3

5 years agoAdd UserSendConfirmationMail hook
Roan Kattouw [Wed, 27 Feb 2019 02:16:49 +0000 (18:16 -0800)]
Add UserSendConfirmationMail hook

Allow extensions to modify the confirmation email.

Bug: T215665
Change-Id: I4bcf76699a5114292fc19085fe441de8b898a8d3

5 years agoMerge "API: Use log context for api-feature-usage log"
jenkins-bot [Wed, 27 Feb 2019 22:43:54 +0000 (22:43 +0000)]
Merge "API: Use log context for api-feature-usage log"

5 years agoAPI: Use log context for api-feature-usage log
Brad Jorsch [Wed, 27 Feb 2019 20:51:38 +0000 (15:51 -0500)]
API: Use log context for api-feature-usage log

The text message is deprecated.

Bug: T217162
Change-Id: Ie891257140ea19369e10b2e91463a1fb4aa5d233

5 years agoMerge "objectcache: simplify WAN cache unwrap() method by removing FLG_STALE"
jenkins-bot [Wed, 27 Feb 2019 21:22:45 +0000 (21:22 +0000)]
Merge "objectcache: simplify WAN cache unwrap() method by removing FLG_STALE"

5 years agomaintenance: Remove arguments that match their default values
Derick Alangi [Mon, 25 Feb 2019 17:11:57 +0000 (18:11 +0100)]
maintenance: Remove arguments that match their default values

Calls to methods with arguments as default values can safely be
removed as there is an exact match. With or without them, code
will still work as intended.

Change-Id: Id8141626a51d9cc8bf8bc0baeb5e38d120664da5

5 years agoMerge "Use splat operator in HamcrestPHPUnitIntegration"
jenkins-bot [Wed, 27 Feb 2019 19:10:08 +0000 (19:10 +0000)]
Merge "Use splat operator in HamcrestPHPUnitIntegration"

5 years agoobjectcache: simplify WAN cache unwrap() method by removing FLG_STALE
Aaron Schulz [Tue, 26 Feb 2019 22:09:52 +0000 (14:09 -0800)]
objectcache: simplify WAN cache unwrap() method by removing FLG_STALE

Instead, make the "high read lag with lockTSE" case just lower FLD_TTL.
This also avoids constant regenerations by threads getting the mutex.

Added logging for TTL adjustments in set() for the lockTSE case.

Also remove some delete() calls from tests that were not needed.

Change-Id: Id7695f0377235e4a2f6e0efc88e870c8a990c3b0

5 years agoMerge "redis: Fix incomplete @var documentation in RedisConnRef"
jenkins-bot [Wed, 27 Feb 2019 17:46:53 +0000 (17:46 +0000)]
Merge "redis: Fix incomplete @var documentation in RedisConnRef"

5 years agoRemove comments literally repeating the next line of code
Thiemo Kreuz [Wed, 27 Feb 2019 15:29:35 +0000 (16:29 +0100)]
Remove comments literally repeating the next line of code

I would argue that these comments do not add any information that
would not be there already. Having them adds mental overhead, because
one needs to read both the comment and the next line of code first to
understand they say the exact same. I don't find this helpful, but
more distracting.

Change-Id: I39c98f25225947ebffdcc2fd8f0243e7a6c070d7

5 years agoMerge "Add tests to ensure that retrieved actions match passed in restrictions"
jenkins-bot [Wed, 27 Feb 2019 17:25:09 +0000 (17:25 +0000)]
Merge "Add tests to ensure that retrieved actions match passed in restrictions"

5 years agoAdd tests to ensure that retrieved actions match passed in restrictions
David Barratt [Wed, 20 Feb 2019 03:18:14 +0000 (22:18 -0500)]
Add tests to ensure that retrieved actions match passed in restrictions

This is a theoretical issue where a passed in restriction does not match the
retrieved actions. There are no actions like this in MediaWiki core or known
extensions, but since the possibility exists, tests should exist to prevent
the issue before it happens.

Bug: T213220
Change-Id: I58da016768a3ee958baa2a25b8177a9e667fa955

5 years agoFix warning on QUnit modules without dependencies
Elliott Eggleston [Wed, 27 Feb 2019 15:48:58 +0000 (10:48 -0500)]
Fix warning on QUnit modules without dependencies

Check if $module['dependencies'] is set before checking whether
it's a string.

Change-Id: I9ece83d4ec92d0d3a41a1c6863492e646f011eab

5 years agoredis: Fix incomplete @var documentation in RedisConnRef
Thiemo Kreuz [Wed, 27 Feb 2019 15:33:55 +0000 (16:33 +0100)]
redis: Fix incomplete @var documentation in RedisConnRef

Change-Id: Id6cf3731986a004ffa80611fcf02c43fd6609ff1

5 years agoMerge "Document type for class properties in ResourceLoaderImageModule"
jenkins-bot [Wed, 27 Feb 2019 14:28:01 +0000 (14:28 +0000)]
Merge "Document type for class properties in ResourceLoaderImageModule"

5 years agoMerge "Fix read-only mode for LoadBalancerSingle"
jenkins-bot [Wed, 27 Feb 2019 04:53:16 +0000 (04:53 +0000)]
Merge "Fix read-only mode for LoadBalancerSingle"

5 years agoUse splat operator in HamcrestPHPUnitIntegration
Kunal Mehta [Wed, 27 Feb 2019 02:52:03 +0000 (18:52 -0800)]
Use splat operator in HamcrestPHPUnitIntegration

Change-Id: I1421748fd338137dd6990775e0d79a6cfb82aa9d

5 years agoMerge "mw.ui forms: Style individual form field warnings, as well as errors"
jenkins-bot [Wed, 27 Feb 2019 01:50:37 +0000 (01:50 +0000)]
Merge "mw.ui forms: Style individual form field warnings, as well as errors"

5 years agomw.ui forms: Style individual form field warnings, as well as errors
Roan Kattouw [Wed, 27 Feb 2019 01:24:10 +0000 (17:24 -0800)]
mw.ui forms: Style individual form field warnings, as well as errors

If you put a <span class="error"> inside a vform-field, it would display
correctly, but a <span class="warning"> wouldn't. Make it work for both.

Change-Id: I9e582ade2fca87782aa7be38774fa4943dc196da

5 years agoMerge "Remove unnecessary variable from UserTest"
jenkins-bot [Tue, 26 Feb 2019 23:22:59 +0000 (23:22 +0000)]
Merge "Remove unnecessary variable from UserTest"

5 years agoMerge "resourceloader: Add getScript() method for loading scripts with callback"
jenkins-bot [Tue, 26 Feb 2019 22:44:51 +0000 (22:44 +0000)]
Merge "resourceloader: Add getScript() method for loading scripts with callback"

5 years agoRemove unnecessary variable from UserTest
Thalia [Tue, 26 Feb 2019 22:15:31 +0000 (22:15 +0000)]
Remove unnecessary variable from UserTest

Change-Id: I2aaae36cc3102b309aa8f5ab05f512c4fbf9810c

5 years agordbms: make safeWaitForMasterPos() handle master connection failure
Aaron Schulz [Wed, 23 Jan 2019 19:32:18 +0000 (11:32 -0800)]
rdbms: make safeWaitForMasterPos() handle master connection failure

Previously, in such cases where a master connection was needed
and could not be acquired, a fatal error would occur. Instead,
throw a DBReplicationWaitError exception.

Also removed a redundant documentation block for the method.

Change-Id: Ide3015d57673df0876daf265a0182fe41004052d

5 years agoEmit new style API action logs into Monolog.
Petr Pchelko [Thu, 21 Feb 2019 02:09:41 +0000 (18:09 -0800)]
Emit new style API action logs into Monolog.

Bug: T214080
Depends-On: I454d3d12dcc1d7e525dc468df90424e68df59d78
Change-Id: Id0be845884cd834d89df897cc8a862904caeb09a

5 years agoFix lowercase in namespace of LogCapturingSpi.php
Amir Sarabadani [Tue, 26 Feb 2019 12:17:09 +0000 (13:17 +0100)]
Fix lowercase in namespace of LogCapturingSpi.php

Basically turning Mediawiki to MediaWiki as all other classes exist
in that namespace

Bug: T217128
Change-Id: I95039a1a54c9900a2f2414b5a6ccce5fb6e5e612

5 years agoMerge "selenium: improve ffmpeg reporting"
jenkins-bot [Tue, 26 Feb 2019 11:03:17 +0000 (11:03 +0000)]
Merge "selenium: improve ffmpeg reporting"

5 years agoMerge "DatabasePostgres: Ignore "IGNORE" option to update()"
jenkins-bot [Tue, 26 Feb 2019 05:30:36 +0000 (05:30 +0000)]
Merge "DatabasePostgres: Ignore "IGNORE" option to update()"

5 years agoresourceloader: Add getScript() method for loading scripts with callback
Evad37 [Sat, 2 Feb 2019 05:42:00 +0000 (13:42 +0800)]
resourceloader: Add getScript() method for loading scripts with callback

Provides a friendly wrapper for loading scripts using $.ajax().
Returns a promise when the script dependency -- a single
script url -- has been loaded. This matches how mw.loader.load
is able to load a script url, and how mw.loader.using will
return a promised that is resolved when dependecies are loaded,
or rejected if there is an error.

Added as a separate function mw.loader.getScript(), rather
than adding this functionality to using(), as it is a separate
use case, less confusing for users, and there is no shared or
duplicated code between loading a script and loading one
or more named modules.

Bug: T27962
Change-Id: I13be426d03261a2d0c6a1631af94a9f9af58394b

5 years agoMerge "debug: Add basic accessibility support to debug console"
jenkins-bot [Mon, 25 Feb 2019 22:00:27 +0000 (22:00 +0000)]
Merge "debug: Add basic accessibility support to debug console"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 25 Feb 2019 21:46:14 +0000 (22:46 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Id54b521705d09e65558ed7ce20f67280c7eac13d

5 years agoMerge "Remove Target/User validation from Block::appliesToUsertalk()"
jenkins-bot [Mon, 25 Feb 2019 21:11:19 +0000 (21:11 +0000)]
Merge "Remove Target/User validation from Block::appliesToUsertalk()"

5 years agoDocument type for class properties in ResourceLoaderImageModule
Umherirrender [Sat, 23 Feb 2019 20:35:15 +0000 (21:35 +0100)]
Document type for class properties in ResourceLoaderImageModule

Also declare missing properties

Change-Id: Ia63597fa996e7050b29ff6df0694dd7e036800d8

5 years agoMerge "Add Priority Hints support"
jenkins-bot [Mon, 25 Feb 2019 20:31:59 +0000 (20:31 +0000)]
Merge "Add Priority Hints support"

5 years agoMerge "Chrome Origin Trial support"
jenkins-bot [Mon, 25 Feb 2019 20:31:48 +0000 (20:31 +0000)]
Merge "Chrome Origin Trial support"

5 years agoRemove Target/User validation from Block::appliesToUsertalk()
David Barratt [Mon, 25 Feb 2019 18:35:35 +0000 (13:35 -0500)]
Remove Target/User validation from Block::appliesToUsertalk()

This fixes a regression in I0e131696419211319082cb454f4f05297e55d22e where
an IP block that also blocks logged in users from editing, throws an exception.

The target/user validation in Block::appliesToUsertalk() does not work well
when an IP block prevents logged in users from editing. This case throws a
validation error, when in reality it should make a judgement.

This change means that the method will now trust whatever is passed into it as
the current user's talk page.

Bug: T211578
Change-Id: I3bb27cf7bec8421d31aa4de28a0e658365bb5bf2

5 years agoAdd Priority Hints support
Gilles Dubuc [Wed, 20 Feb 2019 14:06:36 +0000 (15:06 +0100)]
Add Priority Hints support

When the option is enabled, the first non-icon
thumbnail encountered has a "high" importance.

Bug: T216499
Change-Id: I8d3c1b3e2d136ba16bd7de4809ee3ca63ab462fe

5 years agoChrome Origin Trial support
Gilles Dubuc [Wed, 20 Feb 2019 08:49:28 +0000 (09:49 +0100)]
Chrome Origin Trial support

Bug: T216595
Change-Id: I74b8824a87e6f52a84d2f8a9708501fc05f73266

5 years agoMerge "objectcache: improve set() slam prevention in getWithSetCallback()"
jenkins-bot [Mon, 25 Feb 2019 17:05:36 +0000 (17:05 +0000)]
Merge "objectcache: improve set() slam prevention in getWithSetCallback()"

5 years agoMerge "media: Mark ImageHandler::getScriptParams() as protected"
jenkins-bot [Mon, 25 Feb 2019 16:40:50 +0000 (16:40 +0000)]
Merge "media: Mark ImageHandler::getScriptParams() as protected"

5 years agoMerge "media: Mark public MediaHandler/ImageHandler methods as such"
jenkins-bot [Mon, 25 Feb 2019 16:40:45 +0000 (16:40 +0000)]
Merge "media: Mark public MediaHandler/ImageHandler methods as such"

5 years agoselenium: improve ffmpeg reporting
Antoine Musso [Thu, 21 Feb 2019 16:00:32 +0000 (17:00 +0100)]
selenium: improve ffmpeg reporting

1) stdout/stderr log improvement

Our wdio test suite records video of Selenium test session using ffmpeg,
its stdout/stderr are relayed via console.log() however the new line was
not stripped which is confusing and in case the buffer contains multiple
lines, only the first line had the 'ffmpeg stderr: ' prefix.

Ensure each ffmpeg line is prefixed by logging them individually.

2) exit code / signal

childProcess 'close' event is being passed the exit code and the signal.
We only handled the exit code, thus when ffmpeg is send a signal we
logged:

  ffmpeg exited with code null

Handle the case when the childProcess is send a signal (typically
SIGINT).

Change-Id: I9f509690baa9b7981399a09448582f45c30800d7

5 years agoactions: Improve Action class code for clarity & consistency
Derick Alangi [Mon, 25 Feb 2019 12:28:37 +0000 (13:28 +0100)]
actions: Improve Action class code for clarity & consistency

~ Move local variable $obj to one liner as it's redundant in
  this case.
~ Use === check instead of == as in order case above for the
  purpose of consistency.
~ Make use of single quotes for strings literals instead of
  double quotes.

Change-Id: I69650cacb0658a7369147ea5e9933fb5585e3376

5 years agomedia: Mark ImageHandler::getScriptParams() as protected
Thiemo Kreuz [Mon, 25 Feb 2019 09:20:28 +0000 (10:20 +0100)]
media: Mark ImageHandler::getScriptParams() as protected

Proof this method is really not called from anywhere else, except the
ImageHandler class itself, and one subclass:

https://codesearch.wmflabs.org/search/?q=%5CSgetScriptParams&i=1

Change-Id: I57e75ce0cb7c9e52d545b8e8226610bcc6e06c44

5 years agomedia: Mark public MediaHandler/ImageHandler methods as such
Thiemo Kreuz [Mon, 25 Feb 2019 09:16:30 +0000 (10:16 +0100)]
media: Mark public MediaHandler/ImageHandler methods as such

Note I'm intentionally not touching the entire file, but only methods
I'm absolutely sure are already called from outside, e.g. from
MediaHandlerFactory, and must be public because of this.

I'm intentionally not doing anything with private or protected in this
patch, as such changes are much more fragile.

This is a direct follow up for the changes proposed in Iaa4f60d.

Change-Id: Ida817b289ddd5e9a8c162cc1fa3335c639a0bbe5

5 years agoMerge "Return the page_id in list=langbacklinks as an int"
jenkins-bot [Mon, 25 Feb 2019 02:45:42 +0000 (02:45 +0000)]
Merge "Return the page_id in list=langbacklinks as an int"

5 years agoReturn the page_id in list=langbacklinks as an int
Reedy [Mon, 25 Feb 2019 00:18:47 +0000 (00:18 +0000)]
Return the page_id in list=langbacklinks as an int

Bug: T216968
Change-Id: I5b16779be7b24b1e46d4787a82a8daa3611f67b1

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