3 years agoMerge "Fix namespace handling on Special:PagesWithProp"
jenkins-bot [Fri, 20 Sep 2019 10:32:31 +0000 (10:32 +0000)]
Merge "Fix namespace handling on Special:PagesWithProp"

3 years agoFix namespace handling on Special:PagesWithProp
Matěj Suchánek [Fri, 20 Sep 2019 09:41:58 +0000 (11:41 +0200)]
Fix namespace handling on Special:PagesWithProp

Firstly, restore the availability to query all namespaces.
There is no reason to remove this feature.

Secondly, fix code not to treat '0' as falsy. Instead, use
the request object to get an integer or null.

Bug: T50247
Change-Id: I182e25be2d694d010a1e8382a461c5c08f898581

3 years agoMerge "Use BlobStore::getBlobBatch for RevisionStore::newRevisionsFromBatch"
jenkins-bot [Fri, 20 Sep 2019 09:39:17 +0000 (09:39 +0000)]
Merge "Use BlobStore::getBlobBatch for RevisionStore::newRevisionsFromBatch"

3 years agoMerge "import: Update docs about WikiRevision requiring a Config"
jenkins-bot [Fri, 20 Sep 2019 08:19:34 +0000 (08:19 +0000)]
Merge "import: Update docs about WikiRevision requiring a Config"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 20 Sep 2019 06:22:19 +0000 (08:22 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I66ff316a7d099f45e0cff71b7281117ea12a7db0

3 years agoMerge "Log entries can be rendered with parentheses in HTML"
jenkins-bot [Fri, 20 Sep 2019 00:22:16 +0000 (00:22 +0000)]
Merge "Log entries can be rendered with parentheses in HTML"

3 years agoMerge "title: Improve docs of get*URL()"
jenkins-bot [Thu, 19 Sep 2019 20:26:45 +0000 (20:26 +0000)]
Merge "title: Improve docs of get*URL()"

3 years agoMerge "LogPager: separate getter from query filter"
jenkins-bot [Thu, 19 Sep 2019 19:07:34 +0000 (19:07 +0000)]
Merge "LogPager: separate getter from query filter"

3 years agoMerge "Add assertFileContains to MediaWikiTestCaseTrait"
jenkins-bot [Thu, 19 Sep 2019 18:52:09 +0000 (18:52 +0000)]
Merge "Add assertFileContains to MediaWikiTestCaseTrait"

3 years agoLogPager: separate getter from query filter
Matěj Suchánek [Fri, 13 Sep 2019 17:40:13 +0000 (19:40 +0200)]
LogPager: separate getter from query filter

The method LogPager::getFilterParams combines data aggregation and query
modification which is problematic: it starts with "get" and is public
but has a side-effect. Instead, make a dedicated private method for
building the query and remove the side-effect.

The new private method is now dedicated to building the query, and so
it can also make sure whether selection by log id is requested. If it's
the case, it won't filter the log types out (fix for T220834).

Also remove redundant comment: it's irrelevant to require callers to
call a private method.

Bug: T220834
Change-Id: I0fb6e6ee30ac626192cdf4ef920a731c03b2732f

3 years agoMerge "export: Align docs of close(Rename/Reopen) methods"
jenkins-bot [Thu, 19 Sep 2019 17:52:57 +0000 (17:52 +0000)]
Merge "export: Align docs of close(Rename/Reopen) methods"

3 years agotitle: Improve docs of get*URL()
Daimona Eaytoy [Sun, 15 Sep 2019 08:54:13 +0000 (10:54 +0200)]
title: Improve docs of get*URL()

These functions call fixUrlQueryArgs, which in turns uses wfArrayToCgi,
which can handle array values. Hence, array[] is also valid.

Replace string[] with array, as the values may also be integers.

Change-Id: I5de4f8f32a47c3f41c990ffe2ebd091fc23d1a58

3 years agoexport: Align docs of close(Rename/Reopen) methods
Daimona Eaytoy [Sun, 15 Sep 2019 09:10:29 +0000 (11:10 +0200)]
export: Align docs of close(Rename/Reopen) methods

The base implementation says it can accept an array with a single
element, but the subclasses only had `string` in the docblock (although
they could handle the array case). Hence, replace docblocks in
subclasses with @inheritDoc to copy the parent description and avoid
such discrepancies in the future.

Plus, change `array` to `string[]` for better type inference.

Change-Id: Ica9929fd50f31d8d5f0e29f7c60364086ea39ae5

3 years agodocs: Avoid some scalar juggling
Daimona Eaytoy [Sun, 15 Sep 2019 14:40:42 +0000 (16:40 +0200)]
docs: Avoid some scalar juggling

Phan can treat scalar types as non-interchangeable with
`scalar_implicit_cast` set to false. This patch fixes some of those
issues (which are in total >1000), namely the ones with alphabetic order
< includes/actions.

Change-Id: Ib1c6573ab899088bc319b9da9ceaffc850da3dbe

3 years agoUse BlobStore::getBlobBatch for RevisionStore::newRevisionsFromBatch
Petr Pchelko [Wed, 18 Sep 2019 00:25:43 +0000 (17:25 -0700)]
Use BlobStore::getBlobBatch for RevisionStore::newRevisionsFromBatch

Bug: T233173
Change-Id: I3ffcfabc3524ce137593e0dba32c83f5eb7e5763

3 years agoFix using null for a non-nullable argument
Daimona Eaytoy [Sun, 15 Sep 2019 13:53:14 +0000 (15:53 +0200)]
Fix using null for a non-nullable argument

These are reported by phan as PhanTypeMismatchArgumentNullableInternal
when null_casts_as_any_type is disabled.

Change-Id: I85076ee31c1bfc59a19600e84da0d915e425890a

3 years agoMerge "Remove Revision::getRevisionText from ApiQueryDeletedrevs"
jenkins-bot [Thu, 19 Sep 2019 16:47:51 +0000 (16:47 +0000)]
Merge "Remove Revision::getRevisionText from ApiQueryDeletedrevs"

3 years agoMerge "Sync up with Parsoid parserTests.txt"
jenkins-bot [Thu, 19 Sep 2019 16:05:24 +0000 (16:05 +0000)]
Merge "Sync up with Parsoid parserTests.txt"

3 years agoRemove Revision::getRevisionText from ApiQueryDeletedrevs
Petr Pchelko [Wed, 18 Sep 2019 21:23:09 +0000 (14:23 -0700)]
Remove Revision::getRevisionText from ApiQueryDeletedrevs

This module is deprecated and is scheduled to be removed in T221869
but in order to unblock MCR work we can still remove the method call.

Bug: T198343
Change-Id: I4aed8aa0dedc7284925ce9ba48db71e6ca2db5f0

3 years agoMerge "Document that services don't normally vary by global state"
jenkins-bot [Thu, 19 Sep 2019 12:11:38 +0000 (12:11 +0000)]
Merge "Document that services don't normally vary by global state"

3 years agoDocument that services don't normally vary by global state
Thalia [Tue, 27 Aug 2019 16:49:36 +0000 (17:49 +0100)]
Document that services don't normally vary by global state

To avoid confusion about passing global state via ServiceWiring.php,
document that cases where this is happening are an exception.

Change-Id: I3b590a816d309b5c7dee08a5baa9b418fb698e56

3 years agoMerge "Update remex-html library to 2.1.0"
jenkins-bot [Thu, 19 Sep 2019 11:34:14 +0000 (11:34 +0000)]
Merge "Update remex-html library to 2.1.0"

3 years agoUpdate remex-html library to 2.1.0
C. Scott Ananian [Wed, 18 Sep 2019 16:22:55 +0000 (12:22 -0400)]
Update remex-html library to 2.1.0

This fixes a lingering incompatibility with PHP 7.4.

Bug: T233012
Bug: T233062
Depends-On: I569cffadcde7a2db36a970cf21da9909d7650cf6
Change-Id: I9939c8697a5c4bbe1694a0e9be22b9efa782f027

3 years agotests: Make SpecialPageDataTest independend from the language
Thiemo Kreuz [Thu, 19 Sep 2019 10:51:54 +0000 (12:51 +0200)]
tests: Make SpecialPageDataTest independend from the language

Required for I67632cc.

Change-Id: Ib1d135a52756939da3c63dfabfe971ed708e8734

3 years agoMerge "generatePhpCharToUpperMappings: Die if fopen fails"
jenkins-bot [Thu, 19 Sep 2019 08:19:53 +0000 (08:19 +0000)]
Merge "generatePhpCharToUpperMappings: Die if fopen fails"

3 years agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Thu, 19 Sep 2019 08:19:47 +0000 (08:19 +0000)]
Merge "Localisation updates from https://translatewiki.net."

3 years agoMerge "StringUtils: Add a utility for checking if a string is a valid regex"
jenkins-bot [Thu, 19 Sep 2019 08:03:33 +0000 (08:03 +0000)]
Merge "StringUtils: Add a utility for checking if a string is a valid regex"

3 years agogeneratePhpCharToUpperMappings: Die if fopen fails
Fomafix [Wed, 18 Sep 2019 19:46:42 +0000 (21:46 +0200)]
generatePhpCharToUpperMappings: Die if fopen fails

This prevents additional errors in the following code.

Change-Id: I27770e6ca09c495ec7b6cb588c251b4014697bfe

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 19 Sep 2019 06:48:24 +0000 (08:48 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia5a76e28cc8a824370748cc719ad76dd7f9f0d02

3 years agoLog entries can be rendered with parentheses in HTML
jdlrobson [Tue, 26 Mar 2019 23:58:19 +0000 (16:58 -0700)]
Log entries can be rendered with parentheses in HTML

Entries such as "User creation log" on Special:RecentChanges can
be wrapped or not wrapped in parentheses

Bug: T219348
Change-Id: Ic764081497dbe8d6d9e5bff6f8a1ceeac4b306e2

3 years agoSync up with Parsoid parserTests.txt
C. Scott Ananian [Wed, 18 Sep 2019 23:45:58 +0000 (19:45 -0400)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit 4d7cacfedc69ecac6e65f8d62f54583b900a54d2

Change-Id: I14d74032d09da1c6abf478e058e67c4040c1fcd0

3 years agoMake purgeList.php use getCdnUrls()
Gilles Dubuc [Wed, 18 Sep 2019 20:36:26 +0000 (22:36 +0200)]
Make purgeList.php use getCdnUrls()

Bug: T233095
Change-Id: I8c1d3f273ff2d81b9f28403136f4a6e4c3311724

3 years agoMerge "Remove unused `.success-box` class"
jenkins-bot [Wed, 18 Sep 2019 20:21:11 +0000 (20:21 +0000)]
Merge "Remove unused `.success-box` class"

3 years agoAPI: Use ApiBlockInfoTrait in ApiQueryUsers and AllUsers
Brad Jorsch [Thu, 5 Sep 2019 18:24:28 +0000 (14:24 -0400)]
API: Use ApiBlockInfoTrait in ApiQueryUsers and AllUsers

For efficient bulk querying, this means that
ApiQueryBase::showHiddenUsersAddBlockInfo() needs to return everything
needed by DatabaseBlock::newFromRow().

Since we're rewriting it anyway, we may as well also move
ApiQueryBase::showHiddenUsersAddBlockInfo() out into a trait of its own.

Bug: T232021
Change-Id: I9c5b17a232ecbfbffefc7e40608cf5684ce8a644

3 years agoMerge "Remove redundant 'jquery.accessKeylabel' module alias"
jenkins-bot [Wed, 18 Sep 2019 19:02:59 +0000 (19:02 +0000)]
Merge "Remove redundant 'jquery.accessKeylabel' module alias"

3 years agoMerge "Remove unused localisation messages for old edit toolbar"
jenkins-bot [Wed, 18 Sep 2019 19:01:35 +0000 (19:01 +0000)]
Merge "Remove unused localisation messages for old edit toolbar"

3 years agoRemove redundant 'jquery.accessKeylabel' module alias
Timo Tijhof [Wed, 18 Sep 2019 18:37:03 +0000 (19:37 +0100)]
Remove redundant 'jquery.accessKeylabel' module alias

Follows-up f168493b57. This isn't actually used anywhere so might
as well remove right away like we did with some of the other
modules we combined this release.

Change-Id: I6267db732e9835d9dba5cf32d2c6743461f7cb35

3 years agoMerge "wdio-mediawiki: release 0.5.0"
jenkins-bot [Wed, 18 Sep 2019 16:31:56 +0000 (16:31 +0000)]
Merge "wdio-mediawiki: release 0.5.0"

3 years agowdio-mediawiki: release 0.5.0
Lucas Werkmeister [Tue, 17 Sep 2019 16:10:34 +0000 (18:10 +0200)]
wdio-mediawiki: release 0.5.0

Change-Id: Ib6bfcb18aed1ea24753ea8e2e15796c9fff84cf0

3 years agoMobile friendly styling of Special:ListFiles
jdlrobson [Wed, 11 Sep 2019 21:31:56 +0000 (14:31 -0700)]
Mobile friendly styling of Special:ListFiles

This makes core's Special:ListFiles match the styling of
Special:Uploads that is provided by MobileFrontend. The latter
can be removed once this change is incorporated.

The tablet/desktop mode of this page is not impacted except
that the title will be context aware when a username is selected
to show "Uploads by <username>" rather than the generic "list files".

Bug: T102139
Change-Id: I266313b8c71bdf410d336e020aca7dabbe115be5

3 years agoRemove unused localisation messages for old edit toolbar
Bartosz Dziewoński [Wed, 28 Aug 2019 10:33:50 +0000 (12:33 +0200)]
Remove unused localisation messages for old edit toolbar

Not used since cfa70ea6d003ae69d52aad67a543912449c71e00. Also not used
by any extensions (WikiEditor and VisualEditor have their own messages).

The message 'sig-text' used to also be part of the old edit toolbar,
but it is currently still used by WikiEditor.

Bug: T224429
Change-Id: I342351aaa2c69b5a7dde865edd38f1f2f94cfb8c

3 years agoMerge "Set l18n cache to array in DevelopmentSettings.php"
jenkins-bot [Wed, 18 Sep 2019 11:59:57 +0000 (11:59 +0000)]
Merge "Set l18n cache to array in DevelopmentSettings.php"

3 years agoStringUtils: Add a utility for checking if a string is a valid regex
Daimona Eaytoy [Wed, 5 Sep 2018 14:20:13 +0000 (16:20 +0200)]
StringUtils: Add a utility for checking if a string is a valid regex

There's no function to check if a string is a valid regex, and doing it
via preg_match requires error suppression, often performed with @. This
isn't however a good practice, and suppressing errors via functions is
not a one line solution. Adding an utility function would probably be a
benefit for several use cases (try to grep '@preg_match' for a few of

Change-Id: I257a096319f1ec13441e9f745dcd22545fdd5cc6

3 years agoLocalFile: avoid hard failures on non-existing files.
daniel [Fri, 30 Aug 2019 08:55:01 +0000 (10:55 +0200)]
LocalFile: avoid hard failures on non-existing files.

Some methods on LocalFile will fatal if called on a non-existing file.
ApiQueryImageInfo did not take that into account.

This patch changes LocalFile to avoid fatal errors, and ApiQueryImageInfo
to not try and report information on non-existing files.

NOTE: the modified code has NO test coverage! This should be fixed
before this patch is applied, or the patch needs to be thoroughly tested

Bug: T221812
Change-Id: I9b74545a393d1b7a25c8262d4fe37a6492bbc11e

3 years agoMerge "objectcache: fix DatabaseSqlite::initSqliteDatabase() call location"
jenkins-bot [Wed, 18 Sep 2019 08:39:40 +0000 (08:39 +0000)]
Merge "objectcache: fix DatabaseSqlite::initSqliteDatabase() call location"

3 years agoUse UserIdentity instead of User in REST
Petr Pchelko [Fri, 13 Sep 2019 21:07:59 +0000 (14:07 -0700)]
Use UserIdentity instead of User in REST

Change-Id: Ia6a517c6a64664be2363492108f9497fc949f299

3 years agoMerge "objectcache: Escape dots from cache keys in StatsD metrics"
jenkins-bot [Wed, 18 Sep 2019 02:54:32 +0000 (02:54 +0000)]
Merge "objectcache: Escape dots from cache keys in StatsD metrics"

3 years agoobjectcache: fix DatabaseSqlite::initSqliteDatabase() call location
Aaron Schulz [Wed, 18 Sep 2019 02:22:51 +0000 (19:22 -0700)]
objectcache: fix DatabaseSqlite::initSqliteDatabase() call location

This should be called in the non-LB cause (e.g. custom DBs).

Follow-up mishandled merge conflict in 3298a9db9021.

Bug: T233117
Change-Id: I71a5c28db05a3c294e5c244037be2ee0209d61ad

3 years agoRemove unused `.success-box` class
Volker E [Tue, 17 Sep 2019 22:24:24 +0000 (15:24 -0700)]
Remove unused `.success-box` class

Change-Id: Ie5ecaed60fc7f6342301550c57b238044c20e4a4

3 years agoMerge "docs: Ignore extensions/ and skins/ in mwdocgen.php by default"
jenkins-bot [Tue, 17 Sep 2019 21:53:11 +0000 (21:53 +0000)]
Merge "docs: Ignore extensions/ and skins/ in mwdocgen.php by default"

3 years agoMerge "docs: Ignore README.md by default"
jenkins-bot [Tue, 17 Sep 2019 21:53:04 +0000 (21:53 +0000)]
Merge "docs: Ignore README.md by default"

3 years agoSet l18n cache to array in DevelopmentSettings.php
Amir Sarabadani [Thu, 8 Aug 2019 10:37:48 +0000 (12:37 +0200)]
Set l18n cache to array in DevelopmentSettings.php

Bug: T218207
Change-Id: Ib52d766436f487570b26fde54abfb1ff780c3647

3 years agoMerge "DefaultPreferencesFactory: Remove fallback for null PermissionManager"
jenkins-bot [Tue, 17 Sep 2019 20:32:17 +0000 (20:32 +0000)]
Merge "DefaultPreferencesFactory: Remove fallback for null PermissionManager"

3 years agoMerge "Break PreferencesFormOOUI->PermissionManager dependency"
jenkins-bot [Tue, 17 Sep 2019 20:32:10 +0000 (20:32 +0000)]
Merge "Break PreferencesFormOOUI->PermissionManager dependency"

3 years agoMerge "Improve documentation for the MinimumPasswordLengthToLogin policy"
jenkins-bot [Tue, 17 Sep 2019 20:07:50 +0000 (20:07 +0000)]
Merge "Improve documentation for the MinimumPasswordLengthToLogin policy"

3 years agoMerge "mediawiki.Title: Reduce transfer size of phpCharToUpper.json"
jenkins-bot [Tue, 17 Sep 2019 19:48:47 +0000 (19:48 +0000)]
Merge "mediawiki.Title: Reduce transfer size of phpCharToUpper.json"

3 years agoImprove documentation for the MinimumPasswordLengthToLogin policy
Thalia [Tue, 17 Sep 2019 19:16:05 +0000 (20:16 +0100)]
Improve documentation for the MinimumPasswordLengthToLogin policy

Bug: T233119
Change-Id: I2d0fa6f7116b407cbf62ad93da73d0800c9d14f9

3 years agoMerge "wdio-mediawiki: fix @since versions"
jenkins-bot [Tue, 17 Sep 2019 19:06:31 +0000 (19:06 +0000)]
Merge "wdio-mediawiki: fix @since versions"

3 years agomediawiki.Title: Reduce transfer size of phpCharToUpper.json
Timo Tijhof [Tue, 17 Sep 2019 18:40:03 +0000 (19:40 +0100)]
mediawiki.Title: Reduce transfer size of phpCharToUpper.json

Follows-up 416895821fdb68, which increased this payload by 1-2KB.

Bug: T233095
Change-Id: I90745fe1c1ad4389fef399a30966b123f7812506

3 years agoMerge "REST: Properly handle HEAD requests"
jenkins-bot [Tue, 17 Sep 2019 18:57:18 +0000 (18:57 +0000)]
Merge "REST: Properly handle HEAD requests"

3 years agoMerge "Use TextFormatter in the REST API"
jenkins-bot [Tue, 17 Sep 2019 18:57:09 +0000 (18:57 +0000)]
Merge "Use TextFormatter in the REST API"

3 years agowdio-mediawiki: update signatures in README.md
Lucas Werkmeister [Tue, 17 Sep 2019 16:03:38 +0000 (18:03 +0200)]
wdio-mediawiki: update signatures in README.md

Add parameter types everywhere, and mark the parameters of blockUser and
unblockUser as optional.

Change-Id: I4713fed9f073801333796d974fff9d2d7059d1f0

3 years agoBreak PreferencesFormOOUI->PermissionManager dependency
Petr Pchelko [Fri, 13 Sep 2019 15:26:11 +0000 (08:26 -0700)]
Break PreferencesFormOOUI->PermissionManager dependency

Depends-On: Id0f0bdb39b9e0be4d7c38c229371be04bb5aec5c
Change-Id: I9209cf26a27ab66306f61937b620bfe05c2045b0

3 years agoAdd assertFileContains to MediaWikiTestCaseTrait
David Causse [Tue, 17 Sep 2019 15:23:17 +0000 (17:23 +0200)]
Add assertFileContains to MediaWikiTestCaseTrait

Used by CirrusSearch unit tests.

Change-Id: I1b67a9cddfca7fa06fb0b916981d1efde0764018

3 years agoimport: Update docs about WikiRevision requiring a Config
Thiemo Kreuz [Tue, 17 Sep 2019 14:36:32 +0000 (16:36 +0200)]
import: Update docs about WikiRevision requiring a Config

Change-Id: I5a3d6883150d63d16c1d59ae202e884acb7ec429

3 years agoMerge "Allow logging arbitrary extra data in MWExceptionHandler::logException"
jenkins-bot [Tue, 17 Sep 2019 12:54:18 +0000 (12:54 +0000)]
Merge "Allow logging arbitrary extra data in MWExceptionHandler::logException"

3 years agoMerge "Make WatchedItemQueryService depend on PermissionManager"
jenkins-bot [Tue, 17 Sep 2019 10:11:26 +0000 (10:11 +0000)]
Merge "Make WatchedItemQueryService depend on PermissionManager"

3 years agoDeprecate `$wgSysopEmailBans`
DannyS712 [Thu, 5 Sep 2019 22:57:06 +0000 (22:57 +0000)]
Deprecate `$wgSysopEmailBans`

Bug: T232169
Change-Id: Iba2493eb2f49d32c5aa1b4da53c9c221847fb125

3 years agoMergeHistory: Update revactor_page too
Brad Jorsch [Tue, 10 Sep 2019 15:24:24 +0000 (11:24 -0400)]
MergeHistory: Update revactor_page too

When using MergeHistory, we need to update the denormalized
revision_actor_temp.revactor_page to match the update we do for

Also, we need a maintenance script to clean up the rows that were broken
by our failure to do that before.

Bug: T232464
Change-Id: Ib819a9d9fc978d75d7cc7e53f361483b69ab8020

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 17 Sep 2019 06:23:10 +0000 (08:23 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I5c4e2bd9d76c70622b408f870ac11af9739dad73

3 years agoREST: Properly handle HEAD requests
Tim Starling [Tue, 10 Sep 2019 06:26:53 +0000 (16:26 +1000)]
REST: Properly handle HEAD requests

Just handle a HEAD request as a GET request, if no specific HEAD handler
exists. This is simple and similar to what the rest of MediaWiki does in
response to a HEAD request.

Bug: T226043
Change-Id: I7b2bd657c20b56844459874131a3d85fabe7db3d

3 years agoUse TextFormatter in the REST API
Tim Starling [Tue, 16 Jul 2019 22:43:43 +0000 (08:43 +1000)]
Use TextFormatter in the REST API

* Add ResponseFactory::createLocalizedHttpError(), which generates a
  JSON response body from a MessageValue
* ResponseFactory::__construct() accepts an array of TextFormatter
  objects. For ease of testing, the array may be empty. The integrated
  ResponseFactory has a TextFormatter for English, and one for
  $wgContLang if that is different.
* Use createLocalizedHttpError() to show helpful error messages for
  errors generated by Router.

Change-Id: I897a0aee42227916c568333ab384966f1b87f599

3 years agoMerge "Standardise preview warning box when using ?action=edit"
jenkins-bot [Tue, 17 Sep 2019 02:06:54 +0000 (02:06 +0000)]
Merge "Standardise preview warning box when using ?action=edit"

3 years agoMerge "BaseTemplate: Hard-deprecate msgWiki()"
jenkins-bot [Tue, 17 Sep 2019 01:59:13 +0000 (01:59 +0000)]
Merge "BaseTemplate: Hard-deprecate msgWiki()"

3 years agoMerge "Bump PHP version requirement to 7.2.0+"
jenkins-bot [Tue, 17 Sep 2019 01:39:02 +0000 (01:39 +0000)]
Merge "Bump PHP version requirement to 7.2.0+"

3 years agoBump PHP version requirement to 7.2.0+
James D. Forrester [Thu, 13 Jun 2019 18:53:16 +0000 (11:53 -0700)]
Bump PHP version requirement to 7.2.0+

Bug: T216165
Bug: T216166
Change-Id: I99e45c2a8fd1512a76a42ce978cb96f39ee2456e

3 years agoMerge "services: Do not use deprecated ReflectionType::__toString() in tests"
jenkins-bot [Tue, 17 Sep 2019 00:40:49 +0000 (00:40 +0000)]
Merge "services: Do not use deprecated ReflectionType::__toString() in tests"

3 years agoMerge "SectionProfiler: Do not attempt to use null values as arrays"
jenkins-bot [Mon, 16 Sep 2019 23:37:17 +0000 (23:37 +0000)]
Merge "SectionProfiler: Do not attempt to use null values as arrays"

3 years agoMerge "Title::getTalkPage(): Restore behavior of interwiki-prefixed & fragment-only...
jenkins-bot [Mon, 16 Sep 2019 23:16:16 +0000 (23:16 +0000)]
Merge "Title::getTalkPage(): Restore behavior of interwiki-prefixed & fragment-only titles"

3 years agoMerge "Add namespace restrictions to `meta=siteinfo&siprop=namespaces` API result"
jenkins-bot [Mon, 16 Sep 2019 22:47:52 +0000 (22:47 +0000)]
Merge "Add namespace restrictions to `meta=siteinfo&siprop=namespaces` API result"

3 years agoMerge "wdio-mediawiki: extract bot() function"
jenkins-bot [Mon, 16 Sep 2019 22:47:41 +0000 (22:47 +0000)]
Merge "wdio-mediawiki: extract bot() function"

3 years agoMerge "Chinese Conversion Table Update 2019-3"
jenkins-bot [Mon, 16 Sep 2019 21:06:05 +0000 (21:06 +0000)]
Merge "Chinese Conversion Table Update 2019-3"

3 years agoMerge "mediawiki.page.ready: Avoid duplicate DOM query on logout click"
jenkins-bot [Mon, 16 Sep 2019 20:28:05 +0000 (20:28 +0000)]
Merge "mediawiki.page.ready: Avoid duplicate DOM query on logout click"

3 years agoMerge "mediawiki.page.ready: Convert to packageFiles, remove jquery.checkboxShiftClick"
jenkins-bot [Mon, 16 Sep 2019 20:27:59 +0000 (20:27 +0000)]
Merge "mediawiki.page.ready: Convert to packageFiles, remove jquery.checkboxShiftClick"

3 years agoSectionProfiler: Do not attempt to use null values as arrays
Máté Szabó [Mon, 16 Sep 2019 19:30:47 +0000 (21:30 +0200)]
SectionProfiler: Do not attempt to use null values as arrays

When SectionProfiler::getFunctionStats() is called, the 'start'
and 'end' member variables may be null if no code called the
scopedProfileIn()/scopedProfileOut() methods on this profiler instance.
This can occur, for instance, when generating the parser limit report
for wikitext that did not include expensive parser functions.

In PHP 7.4, attemping to use a null value as an array generates
a PHP Notice.[1] This patch adds a check to SectionProfiler::getFunctionStats
to verify that the 'start' value is an array before attempting to
access its keys.

[1] https://github.com/php/php-src/blob/php-7.4.0RC1/UPGRADING#L25

Bug: T233012
Change-Id: I2d35bfddfcc4c194aa71265e40387f2f2914e3a5

3 years agoservices: Do not use deprecated ReflectionType::__toString() in tests
Máté Szabó [Mon, 16 Sep 2019 19:14:07 +0000 (21:14 +0200)]
services: Do not use deprecated ReflectionType::__toString() in tests

The \MediaWikiServicesTest::provideGetService() PHPUnit data provider
method uses the ReflectionType::__toString() method to obtain the
return type of service instantiator callables as a string.

In PHP 7.4, calling this method generates an E_DEPRECATED notice.
The solution is to use ReflectionType::getName() instead, available
since PHP 7.1.[1]

This patch updates the method to use ReflectionType::getName()
if it is available, and fall back to ReflectionType::__toString()

[1] https://github.com/php/php-src/blob/php-7.4.0RC1/UPGRADING#L395

Bug: T233012
Change-Id: I69b97f75795e6c4e005bf1a23fb798f7e52da2fd

3 years agoMerge "Update old URLs in DefaultSettings related to Squid caching"
jenkins-bot [Mon, 16 Sep 2019 18:34:31 +0000 (18:34 +0000)]
Merge "Update old URLs in DefaultSettings related to Squid caching"

3 years agowdio-mediawiki: extract bot() function
Lucas Werkmeister [Mon, 16 Sep 2019 14:36:13 +0000 (16:36 +0200)]
wdio-mediawiki: extract bot() function

This functionality was previously copy+pasted for most other methods,
and is also useful externally, to make API requests that are not covered
by other methods in Api.js.

createAccount() needs a different type of token, so for now we leave it
alone. (Perhaps the token type could become a parameter of bot() later?)

Change-Id: Ica24213a1f0d651bfc3fbffe24b63251a4841658

3 years agowdio-mediawiki: fix @since versions
Lucas Werkmeister [Mon, 16 Sep 2019 16:39:08 +0000 (18:39 +0200)]
wdio-mediawiki: fix @since versions

The initial version of this package (added in change I547a7899e7, commit
16a4d9da7b) was 0.1.0, not 1.0.0.

Change-Id: I39511be15ea8ec27692f8547f375349bb6384a6b

3 years agoMake WatchedItemQueryService depend on PermissionManager
Petr Pchelko [Fri, 13 Sep 2019 20:39:50 +0000 (13:39 -0700)]
Make WatchedItemQueryService depend on PermissionManager

Bug: T220191
Change-Id: I714d2b33b83dab230a8168765d5523cb14971371

3 years agoChinese Conversion Table Update 2019-3
Chiefwei [Mon, 16 Sep 2019 14:30:52 +0000 (22:30 +0800)]
Chinese Conversion Table Update 2019-3

Update the Chinese conversion table routinely to fix bugs reported from https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: Iaed40e230bd7be0656af3b24837e870743c84700

3 years agoNote in `Createacct-reason` that the reason provided is publicly visible
DannyS712 [Sun, 21 Jul 2019 22:51:25 +0000 (22:51 +0000)]
Note in `Createacct-reason` that the reason provided is publicly visible

Bug: T211732
Change-Id: Idb3a354dd7b2425bcde1f85382481f7af5ca3080

3 years agoMerge "objectcache: remove references to recently removed methods"
jenkins-bot [Mon, 16 Sep 2019 09:15:37 +0000 (09:15 +0000)]
Merge "objectcache: remove references to recently removed methods"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 16 Sep 2019 07:08:56 +0000 (09:08 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ic665f6f2f3f9ee34f2447d74e4c7c890b5ad0710

3 years agoobjectcache: remove references to recently removed methods
Aaron Schulz [Sun, 15 Sep 2019 20:52:07 +0000 (13:52 -0700)]
objectcache: remove references to recently removed methods

Follow-up to 9d5e3f56d55c81e

Change-Id: Idca42b5ca405c31953a516aa3f96cf64cc0e0a12

3 years agoMerge "resourceloader: Add Doxygen group and improve overall docs"
jenkins-bot [Sun, 15 Sep 2019 19:58:46 +0000 (19:58 +0000)]
Merge "resourceloader: Add Doxygen group and improve overall docs"

3 years agoMerge "OutputPage: Add visibility to various methods & do some micro-optimizations"
jenkins-bot [Sun, 15 Sep 2019 16:41:21 +0000 (16:41 +0000)]
Merge "OutputPage: Add visibility to various methods & do some micro-optimizations"

3 years agoMerge "Update docblocks for methods potentially returning null"
jenkins-bot [Sun, 15 Sep 2019 16:27:34 +0000 (16:27 +0000)]
Merge "Update docblocks for methods potentially returning null"

3 years agoOutputPage: Add visibility to various methods & do some micro-optimizations
Derick Alangi [Sat, 14 Sep 2019 10:26:31 +0000 (11:26 +0100)]
OutputPage: Add visibility to various methods & do some micro-optimizations

Methods that visibility was added to are; `addMeta()`, `addLink()`,
`setCanonicalUrl()`, `addScript()`, `getHeadItemsArray()`, `addParserOutput()`,
`getCacheVaryCookies()` and `haveCacheVaryCookies()`. Last but not lease, did
a few micro-optimizations to `addMeta()` and `addLink()`.

Change-Id: I94d037a5edc7131627724fd1d864000128077b0c

3 years agoUpdate docblocks for methods potentially returning null
Daimona Eaytoy [Sun, 15 Sep 2019 13:22:08 +0000 (15:22 +0200)]
Update docblocks for methods potentially returning null

These were discovered by setting `null_casts_as_any_type` to true in
phan, and filtering by `PhanTypeMismatchReturnNullable`. Of course there
are others, some of which are false positives, but we cannot suppress
them now (or the UnusedSuppressionPlugin will complain).

Change-Id: Ia8443e575c22f47a6d8c63038f4e7ac36815fc27