3 years agoMerge "EditPage: Migrate Title::userCan() calls to PermissionManager"
jenkins-bot [Wed, 22 May 2019 11:18:36 +0000 (11:18 +0000)]
Merge "EditPage: Migrate Title::userCan() calls to PermissionManager"

3 years agoMerge "externalstore: make ExternalStoreDB::getDomainId treat false the same as null"
jenkins-bot [Wed, 22 May 2019 10:38:34 +0000 (10:38 +0000)]
Merge "externalstore: make ExternalStoreDB::getDomainId treat false the same as null"

3 years agoMerge "Add additional configuation parameters to RESTBagOStuff"
jenkins-bot [Wed, 22 May 2019 10:13:55 +0000 (10:13 +0000)]
Merge "Add additional configuation parameters to RESTBagOStuff"

3 years agoMerge "Don't pass Config to Parser(Factory)"
jenkins-bot [Wed, 22 May 2019 10:13:48 +0000 (10:13 +0000)]
Merge "Don't pass Config to Parser(Factory)"

3 years agoMerge "registration: Fix validation of ext-foo values"
jenkins-bot [Wed, 22 May 2019 10:12:52 +0000 (10:12 +0000)]
Merge "registration: Fix validation of ext-foo values"

3 years agoMerge "Fix logic in NamespaceInfo::getRestrictionLevels"
jenkins-bot [Wed, 22 May 2019 09:48:08 +0000 (09:48 +0000)]
Merge "Fix logic in NamespaceInfo::getRestrictionLevels"

3 years agoMerge "WikiPage: Make prepareContentForEdit method not accept an integer"
jenkins-bot [Wed, 22 May 2019 09:23:57 +0000 (09:23 +0000)]
Merge "WikiPage: Make prepareContentForEdit method not accept an integer"

3 years agoregistration: Fix validation of ext-foo values
Kunal Mehta [Wed, 22 May 2019 08:57:05 +0000 (01:57 -0700)]
registration: Fix validation of ext-foo values

Our json-schema library doesn't yet support "const" (at least not in a
released version), so use "enum" with one element, since it's functionally
equivalent per <https://json-schema.org/understanding-json-schema/reference/generic.html#constant-values>.

Change-Id: Ib9ebb5c6b9d07903fa47603fbe54a148e9c00352

3 years agoWikiPage: Make prepareContentForEdit method not accept an integer
Matěj Suchánek [Tue, 21 May 2019 18:17:20 +0000 (20:17 +0200)]
WikiPage: Make prepareContentForEdit method not accept an integer

This has been deprecated since 1.25.

Bug: T220656
Change-Id: I94f5cb78adcfbec1fdafd89495c045e6f8fd9246

3 years agoMerge "rdbms: improve query logging logic in Database"
jenkins-bot [Tue, 21 May 2019 22:12:32 +0000 (22:12 +0000)]
Merge "rdbms: improve query logging logic in Database"

3 years agoMerge "watchlist: make getLatestNotificationTimestamp() method use the correct user"
jenkins-bot [Tue, 21 May 2019 22:01:03 +0000 (22:01 +0000)]
Merge "watchlist: make getLatestNotificationTimestamp() method use the correct user"

3 years agoexternalstore: make ExternalStoreDB::getDomainId treat false the same as null
Aaron Schulz [Sun, 21 Apr 2019 19:57:05 +0000 (12:57 -0700)]
externalstore: make ExternalStoreDB::getDomainId treat false the same as null

Callers like SqlBlobStore sometimes pass in false for the current wiki

Bug: T200471
Change-Id: I3025c869df07de312471d00a0ab7107c1fa14a90

3 years agoRemoved 'public $user' as it is deprecated in 1.29
zoranzoki21 [Tue, 21 May 2019 20:54:52 +0000 (22:54 +0200)]
Removed 'public $user' as it is deprecated in 1.29

Change-Id: If9c59d432e4b8b91b8c81200bf3a8a910461eded

3 years agoAdd additional configuation parameters to RESTBagOStuff
Bill Pirkle [Mon, 29 Apr 2019 21:30:02 +0000 (16:30 -0500)]
Add additional configuation parameters to RESTBagOStuff

Class RESTBagOStuff is needed for the Kask session storage
service. Add additional configuration parameters so that
they will work together.

Bug: T215533
Change-Id: Ifbb9f8847bd10d65cc5e24f4aa6cb20cb71de3ca

3 years agoMerge "Correct autonym for rmy (Vlax Romani)"
jenkins-bot [Tue, 21 May 2019 07:30:50 +0000 (07:30 +0000)]
Merge "Correct autonym for rmy (Vlax Romani)"

3 years agoCorrect autonym for rmy (Vlax Romani)
Siebrand Mazeland [Sat, 18 May 2019 15:50:42 +0000 (17:50 +0200)]
Correct autonym for rmy (Vlax Romani)

Bug: T223524
Change-Id: Id128199119001bd318012d034ef727cdfa256f54

3 years agowatchlist: make getLatestNotificationTimestamp() method use the correct user
Aaron Schulz [Tue, 21 May 2019 00:32:41 +0000 (17:32 -0700)]
watchlist: make getLatestNotificationTimestamp() method use the correct user

This uses the proper stash entry and also fits within the 3 item process
cache in WatchedItemStore that contains last-visit maps for users.

Follows-up 588a46468252, which added use of the stash optimisation but
wrongly keyed against rc_actor/rc_user instead of $this->getUser,
which means that unlike the DB 'wl_notificationtimestamp' field (which
is result of joining against watchlist and user via $this->getUser), it
was now reading the cache key for a different user instead of the user
that is viewing their watchlist.

Bug: T218511
Bug: T223310
Change-Id: I5c4dd2c7384f7681cee21fb2caf10d4d4b64c724

3 years agoMerge "Remove tryLastResult function from includes/specials/QueryPage.php"
jenkins-bot [Mon, 20 May 2019 22:58:51 +0000 (22:58 +0000)]
Merge "Remove tryLastResult function from includes/specials/QueryPage.php"

3 years agoMerge "rdbms: replace some return-based sanity checks in Database with exception...
jenkins-bot [Mon, 20 May 2019 22:52:30 +0000 (22:52 +0000)]
Merge "rdbms: replace some return-based sanity checks in Database with exception-based checks"

3 years agordbms: replace some return-based sanity checks in Database with exception-based checks
Aaron Schulz [Mon, 20 May 2019 19:47:18 +0000 (12:47 -0700)]
rdbms: replace some return-based sanity checks in Database with exception-based checks

Change-Id: I51a541fb560438a34522ca442a8b8e572830deea

3 years agoRemove tryLastResult function from includes/specials/QueryPage.php
zoranzoki21 [Thu, 16 May 2019 13:56:17 +0000 (15:56 +0200)]
Remove tryLastResult function from includes/specials/QueryPage.php

It is deprecated in 1.27

Change-Id: Ia10696a3d8e700cdf889c15e9b16b9d8e3e7f94f

3 years agoMerge "jobqueue: Remove duplicate property from DoubleRedirectJob"
jenkins-bot [Mon, 20 May 2019 20:05:38 +0000 (20:05 +0000)]
Merge "jobqueue: Remove duplicate property from DoubleRedirectJob"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 20 May 2019 19:55:39 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I30b63a979dbf32b92ba5bea8799afdd51d00ce5f

3 years agoDon't pass Config to Parser(Factory)
Aryeh Gregor [Fri, 12 Apr 2019 09:50:30 +0000 (12:50 +0300)]
Don't pass Config to Parser(Factory)

Change-Id: I5996b7cad8c8a61518d2997e955a4547c64a73a5

3 years agoMerge "Allow hidden skins to show up in preferences"
jenkins-bot [Mon, 20 May 2019 06:46:02 +0000 (06:46 +0000)]
Merge "Allow hidden skins to show up in preferences"

3 years agoMerge "Enable email settings for ApiBlockTest::testBlockWithEmailBlock"
jenkins-bot [Mon, 20 May 2019 05:14:48 +0000 (05:14 +0000)]
Merge "Enable email settings for ApiBlockTest::testBlockWithEmailBlock"

3 years agoMerge "Enable email in TemporaryPasswordPrimaryAuthenticationProviderTest"
jenkins-bot [Mon, 20 May 2019 05:06:12 +0000 (05:06 +0000)]
Merge "Enable email in TemporaryPasswordPrimaryAuthenticationProviderTest"

3 years agoMerge "Linker: Fix fatal error for "/* */" in an edit summary"
jenkins-bot [Sun, 19 May 2019 21:37:51 +0000 (21:37 +0000)]
Merge "Linker: Fix fatal error for "/*  */" in an edit summary"

3 years agoSpecialAllMessages: Specify filter messages so we always escape them
Daimona Eaytoy [Sun, 19 May 2019 13:51:25 +0000 (15:51 +0200)]
SpecialAllMessages: Specify filter messages so we always escape them

As reported by phan-taint-check, HTMLForm options have to be escaped.

Bug: T223821
Change-Id: I663911a2c3d8a5c60d407e84ec528f71af2eafe9

3 years agoAllow hidden skins to show up in preferences
jdlrobson [Sat, 18 May 2019 17:19:54 +0000 (19:19 +0200)]
Allow hidden skins to show up in preferences

It should be possible for power users to reveal hidden preferences
using the useskin query parameter. In future this will allow us
to use wgSkipSkins to deprecate poorly supported skins for new
users whilst not hard deprecating and removing skin support for
users who strongly want to continue to use them.

Change-Id: I1bbd4a09dff72f513c9413e0f826d8db38a5e04c

3 years agoMerge "Follow-up 3535a5f327: Remove old CSS now caches have expired"
jenkins-bot [Sun, 19 May 2019 13:12:04 +0000 (13:12 +0000)]
Merge "Follow-up 3535a5f327: Remove old CSS now caches have expired"

3 years agoLinker: Fix fatal error for "/* */" in an edit summary
Timo Tijhof [Sun, 19 May 2019 11:17:23 +0000 (13:17 +0200)]
Linker: Fix fatal error for "/*  */" in an edit summary

Follows-up b6e1e99bec8, which switched the method from Title::makeTitleSafe
to TitleValue. The latter throws fatal on non-string $fragment.

Title::makeTitleSafe, on the other hand, uses makeName(), which casts
$fragment to a string, and ignores if it ends up as empty string
(boolean false becomes empty string and thus did "the right thing").

Bug: T222857
Change-Id: Iecc2140fabd31ef0f193740c7fab0fc698c38e51

3 years agoMerge "i18n: Rename 11 messages for case-compliance"
jenkins-bot [Sun, 19 May 2019 10:00:00 +0000 (10:00 +0000)]
Merge "i18n: Rename 11 messages for case-compliance"

3 years agoMerge "Simplify a few list() that only care about the first element"
jenkins-bot [Sun, 19 May 2019 08:18:37 +0000 (08:18 +0000)]
Merge "Simplify a few list() that only care about the first element"

3 years agoMerge "docs: Fix UploadVerifyUpload/UploadStashFile hook docs"
jenkins-bot [Sun, 19 May 2019 08:17:11 +0000 (08:17 +0000)]
Merge "docs: Fix UploadVerifyUpload/UploadStashFile hook docs"

3 years agoMerge "Replace use of deprecated methods in Linker and SkinFactory classes"
jenkins-bot [Sun, 19 May 2019 08:03:45 +0000 (08:03 +0000)]
Merge "Replace use of deprecated methods in Linker and SkinFactory classes"

3 years agoMerge "Simplify a few binary checks for bit 1"
jenkins-bot [Sun, 19 May 2019 07:54:48 +0000 (07:54 +0000)]
Merge "Simplify a few binary checks for bit 1"

3 years agoMerge "Remove covers validator trait where it is not needed"
jenkins-bot [Sun, 19 May 2019 07:54:41 +0000 (07:54 +0000)]
Merge "Remove covers validator trait where it is not needed"

3 years agoMerge "Remove useless use of current and end"
jenkins-bot [Sun, 19 May 2019 06:46:42 +0000 (06:46 +0000)]
Merge "Remove useless use of current and end"

3 years agoMerge "Turn logout link into a POST API call with refresh"
jenkins-bot [Sat, 18 May 2019 20:03:13 +0000 (20:03 +0000)]
Merge "Turn logout link into a POST API call with refresh"

3 years agoTurn logout link into a POST API call with refresh
Amir Sarabadani [Thu, 25 Apr 2019 11:23:09 +0000 (13:23 +0200)]
Turn logout link into a POST API call with refresh

It's better to get rid of any GET request with csrf token

Bug: T25227
Change-Id: I76464c750945d07a283b99b449f137593c685f02

3 years agoRemove useless use of current and end
Florian [Sat, 18 May 2019 18:50:47 +0000 (20:50 +0200)]
Remove useless use of current and end

The ConfigRepository is not an Interable (any more), so these functions
don't have any useable effect.

Bug: T221045
Change-Id: I6e5bfd9d922d2838c65d52815590dcad1fe6d284

3 years agoEditPage: Migrate Title::userCan() calls to PermissionManager
Máté Szabó [Sat, 18 May 2019 16:31:55 +0000 (18:31 +0200)]
EditPage: Migrate Title::userCan() calls to PermissionManager

T208768 introduced the PermissionManager service that can now be used
for page specific permission checks. This change replaces calls to
Title::userCan() with the new service in the EditPage class.

Bug: T220191
Change-Id: I835d68d6c47785cf35386bca0431907fee87f0c1

3 years agoTypehint against IDatabase in special pages
Umherirrender [Sat, 18 May 2019 16:24:08 +0000 (18:24 +0200)]
Typehint against IDatabase in special pages

Change-Id: I1ec906cc7b284a3de02bb67fb41b5cf9e67ff3d2

3 years agoi18n: Rename 11 messages for case-compliance
James D. Forrester [Tue, 30 Apr 2019 20:41:50 +0000 (13:41 -0700)]
i18n: Rename 11 messages for case-compliance

Can't yet enforce due to the API.

* allmessagesnotsupportedDB
* rcfilters-filtergroup-userExpLevel
* rcfilters-filtergroup-lastRevision
* number_of_watching_users_RCview
* apihelp-query+allfileusages-example-B
* apihelp-query+allimages-example-B
* apihelp-query+alllinks-example-B
* apihelp-query+allpages-example-B
* apihelp-query+allredirects-example-B
* apihelp-query+alltransclusions-example-B
* apihelp-query+allusers-example-Y
* apiwarn-wgDebugAPI

Change-Id: I95961dfeb43e9cfadc867a48866af6335022572a

3 years agoMerge "i18n: Drop img-auth-nologinnWL, unused AFAICT"
jenkins-bot [Sat, 18 May 2019 14:37:06 +0000 (14:37 +0000)]
Merge "i18n: Drop img-auth-nologinnWL, unused AFAICT"

3 years agoMerge "i18n: Drop number_of_watching_users_pageview, unused since wgPageShowWatchingU...
jenkins-bot [Sat, 18 May 2019 14:36:59 +0000 (14:36 +0000)]
Merge "i18n: Drop number_of_watching_users_pageview, unused since wgPageShowWatchingUsers was dropped"

3 years agoUpdate wikimedia/at-ease from 1.2.0 to 2.0.0
Reedy [Tue, 12 Feb 2019 01:25:12 +0000 (01:25 +0000)]
Update wikimedia/at-ease from 1.2.0 to 2.0.0


Change-Id: Ia49a156e76d0a4e257e91cc6a51050848bcb9a5e
Depends-On: If40364e2590e3c23035838f8ed26c4f69e730602

3 years agoDrop wf(Suppress|Restore)Warnings, deprecated in 1.26
James D. Forrester [Tue, 19 Feb 2019 12:15:36 +0000 (12:15 +0000)]
Drop wf(Suppress|Restore)Warnings, deprecated in 1.26

Change-Id: Idcc9debd90e6ee12adf5ab7c4ec640db12828997

3 years agoHTMLForm: Add known MediaWiki version to wfDeprecated() call
Derick Alangi [Tue, 14 May 2019 13:29:40 +0000 (14:29 +0100)]
HTMLForm: Add known MediaWiki version to wfDeprecated() call

In 3706dcb, this method was soft deprecated and hard deprecated at
the same time (1.28) but during the call to wfDeprecated for hard
deprecation, the version number was missed, though this will default
to false, it's good to use the version number which is known in this
case (1.28).

Change-Id: I535ad07e79d14bac8ec42beaeb4b3762a494b28b

3 years agoMerge "jqueryMsg: Allow sneaking in non-qqx JavaScript messages in qqx mode"
jenkins-bot [Sat, 18 May 2019 09:01:37 +0000 (09:01 +0000)]
Merge "jqueryMsg: Allow sneaking in non-qqx JavaScript messages in qqx mode"

3 years agoMerge "IP: Remove unused deprecated ::isValidBlock() method"
jenkins-bot [Sat, 18 May 2019 08:02:09 +0000 (08:02 +0000)]
Merge "IP: Remove unused deprecated ::isValidBlock() method"

3 years agoMerge "Define date formats for Northern Sami"
jenkins-bot [Sat, 18 May 2019 07:44:59 +0000 (07:44 +0000)]
Merge "Define date formats for Northern Sami"

3 years agodocs: Fix UploadVerifyUpload/UploadStashFile hook docs
Thiemo Kreuz [Sat, 18 May 2019 06:30:16 +0000 (08:30 +0200)]
docs: Fix UploadVerifyUpload/UploadStashFile hook docs

1. FSFile::getPropsFromPath() is not used by any code any more.
The only remaining usage is in one test. We might as well remove the

2. The $props array is passed to the hook for convenience, in case all
the file properties are already available. Fetching them from a file on
disc can be an expensive operation, and should be avoided if the
information is already available. But the caller does not guarantee this
is set. Other callees already know this can be a falsy value, notably

Change-Id: I43724d18467b6fb68a963b2206332cf553c81b2c

3 years agoDefine date formats for Northern Sami
Lucas Werkmeister [Fri, 17 May 2019 12:09:31 +0000 (14:09 +0200)]
Define date formats for Northern Sami

Following instructions from User:Yupik (at Wikimedia Hackathon 2019),
consulting [1], pages 10, 42, 43.

[1]: http://sh.pedit.no/web/NettskoleRessurs.axd?id=feb75bf8-6f42-402b-b622-29ce644c88d4

Bug: T223588
Change-Id: Ia63ea6ef09e95534ea0213bf28b26dbff3f3a7c4

3 years agoMerge "SearchResultSet: MW version number should be a string in wfDeprecated call"
jenkins-bot [Fri, 17 May 2019 21:13:44 +0000 (21:13 +0000)]
Merge "SearchResultSet: MW version number should be a string in wfDeprecated call"

3 years agoIP: Remove unused deprecated ::isValidBlock() method
Derick Alangi [Wed, 15 May 2019 14:15:03 +0000 (15:15 +0100)]
IP: Remove unused deprecated ::isValidBlock() method

This method was deprecated in 1.30 and no longer used in our code



Change-Id: I26e11c0d88fe7c82c052c1cf8e0bbc33bd99de70

3 years agoMerge "Revert "Always validate uploads over api""
jenkins-bot [Fri, 17 May 2019 15:13:19 +0000 (15:13 +0000)]
Merge "Revert "Always validate uploads over api""

3 years agoMerge "Remove LegacyHookPreAuthenticationProvider class"
jenkins-bot [Fri, 17 May 2019 15:13:09 +0000 (15:13 +0000)]
Merge "Remove LegacyHookPreAuthenticationProvider class"

3 years agojobqueue: Remove duplicate property from DoubleRedirectJob
Thiemo Kreuz [Fri, 17 May 2019 15:08:36 +0000 (17:08 +0200)]
jobqueue: Remove duplicate property from DoubleRedirectJob

All the stuff that is passed as $params to the constructor is stored
in $this->params anyway.

Change-Id: Idec1c243de7cdbb1e55dd754555536ce0ec2024d

3 years agoSimplify a few binary checks for bit 1
Thiemo Kreuz [Fri, 17 May 2019 14:57:23 +0000 (16:57 +0200)]
Simplify a few binary checks for bit 1

( $var & 1 ) is either 0 or 1, which can be used as a boolean value.
The main advantage of this is that there is no confusion with the
operator precedence. In `$var & 1 !== 1` the `!==` is executed first,
effectively turning it into `$var & 0`. This always succeeds.

Change-Id: I53c81a3891d42b2660eefc311f1f0f2523104894

3 years agoSimplify a few list() that only care about the first element
Thiemo Kreuz [Fri, 17 May 2019 14:54:47 +0000 (16:54 +0200)]
Simplify a few list() that only care about the first element

The nice thing about explode() is that the resulting array is
guaranteed to contain at least one element. The array can not be

In some of these cases it might be possible to use strstr() instead,
but that returns an empty string when the needle character is not
found. explode() returns the original string in this case.

Change-Id: I6ad1f3273defeaf36e2305fd871eaaf9d3c1e134

3 years agoMerge "build: Upgrade mediawiki/mediawiki-phan-config from 0.5.0 to 0.6.0 and make...
jenkins-bot [Fri, 17 May 2019 14:52:23 +0000 (14:52 +0000)]
Merge "build: Upgrade mediawiki/mediawiki-phan-config from 0.5.0 to 0.6.0 and make pass"

3 years agoRemove covers validator trait where it is not needed
Thiemo Kreuz [Fri, 17 May 2019 14:48:35 +0000 (16:48 +0200)]
Remove covers validator trait where it is not needed

MediaWikiTestCase already contains this trait.

Change-Id: I08224ac12a58b41121697ab71d5c54ddbdd060ec

3 years agoRevert "Always validate uploads over api"
Hashar [Fri, 17 May 2019 14:42:21 +0000 (14:42 +0000)]
Revert "Always validate uploads over api"

The verification is broken with chunken uploads and ultimately
cause large files to no more be uploadable.

This reverts commit 38ec6d8a344d4eda0307dd3a72653dd2171305d6.

Bug: T223448
Change-Id: If414a8f751a3e1488a2ab099abd8b598c973c1f4

3 years agoRemove LegacyHookPreAuthenticationProvider class
Gergő Tisza [Wed, 10 Oct 2018 01:45:58 +0000 (18:45 -0700)]
Remove LegacyHookPreAuthenticationProvider class

Deprecated from birth, hard-deprecated since 1.33.

Change-Id: I03e94c02370ff0057e18274e9b409e162a0d7af0

3 years agoMerge "Fix typo: namesapce"
jenkins-bot [Fri, 17 May 2019 14:01:28 +0000 (14:01 +0000)]
Merge "Fix typo: namesapce"

3 years agoFix typo: namesapce
Niklas Laxström [Fri, 17 May 2019 13:25:21 +0000 (15:25 +0200)]
Fix typo: namesapce

Change-Id: Idb4e420c87b7043baf3289556b8ef8775126bf8e

3 years agoMerge "Use HTTPS instead of protocol relative for WMF links"
jenkins-bot [Fri, 17 May 2019 12:17:04 +0000 (12:17 +0000)]
Merge "Use HTTPS instead of protocol relative for WMF links"

3 years agoMerge "objectcache: restore a simple version of the apc.serializer check in APCUBagOS...
jenkins-bot [Fri, 17 May 2019 10:01:41 +0000 (10:01 +0000)]
Merge "objectcache: restore a simple version of the apc.serializer check in APCUBagOStuff"

3 years agoUse HTTPS instead of protocol relative for WMF links
Fomafix [Fri, 17 May 2019 05:16:16 +0000 (07:16 +0200)]
Use HTTPS instead of protocol relative for WMF links

The WMF websites redirect from HTTP to HTTPS.

Change-Id: I916c97697b4ffa9774eec9c8e6ab650a08bb6edd

3 years agoMerge "Unstub $wgLang for PageContentLanguage hook"
jenkins-bot [Thu, 16 May 2019 22:51:15 +0000 (22:51 +0000)]
Merge "Unstub $wgLang for PageContentLanguage hook"

3 years agoobjectcache: restore a simple version of the apc.serializer check in APCUBagOStuff
Aaron Schulz [Sat, 11 May 2019 12:39:22 +0000 (05:39 -0700)]
objectcache: restore a simple version of the apc.serializer check in APCUBagOStuff

Follow-up to 3192278eb21d

This seems to be about 30% faster on my local non-vm setup
when apc.serializer is set to "default".

Bug: T220470
Change-Id: If966187bd96a210915a72dc027544378c966a43c

3 years agoUnstub $wgLang for PageContentLanguage hook
Niklas Laxström [Thu, 7 Mar 2019 11:34:26 +0000 (12:34 +0100)]
Unstub $wgLang for PageContentLanguage hook

This is to avoid annoying fatal errors when someone annotated their
hook handler to only expect Language objects, but that expectation
is violated due to this code possibly passing StubUserLang to hooks,
some of which may also assign it to $pageLang.

Even with this in place, it is probably a good idea for hook handlers
to refrain from type hinting parameters that are passed by reference
because their types cannot be guaranteed.

Bug: T214358
Change-Id: I88405a8de4b13675eb5a9d11e9ddc87e20a85fb4

3 years agoMerge "for two-stage dumps make the location of MWScript.php alterable"
jenkins-bot [Thu, 16 May 2019 16:26:04 +0000 (16:26 +0000)]
Merge "for two-stage dumps make the location of MWScript.php alterable"

3 years agoFollow-up I2fef157c: Add missing getNamespaceInfo call to ContribsPager chain
Alex Monk [Thu, 16 May 2019 12:25:19 +0000 (13:25 +0100)]
Follow-up I2fef157c: Add missing getNamespaceInfo call to ContribsPager chain

Bug: T223440
Change-Id: I26e05a4312ba7f667b1b95cfbfdc24fae793c3b0

3 years agoAdd notice that FOR UPDATE is incompatible with aggregates
Lucas Werkmeister [Thu, 16 May 2019 09:46:23 +0000 (11:46 +0200)]
Add notice that FOR UPDATE is incompatible with aggregates

On some database types, combining locking reads with aggregate functions
is not allowed, and MediaWiki detects such cases and logs a deprecation
warning (on all database types), so we don’t really want people to use
this even if the target database type happens to support it. Add a
warning to the documentation.

Change-Id: Ib6fd2148aeb0c94c0a13b33aec08e3308c740b01

3 years agofor two-stage dumps make the location of MWScript.php alterable
Ariel T. Glenn [Thu, 20 Sep 2018 14:55:58 +0000 (17:55 +0300)]
for two-stage dumps make the location of MWScript.php alterable

Previously it was fixed to be in a certain location relative to
the MW instllation; this would allow the path to the script to
be passed in as an argument. If not, the script reverts to its
previous behavior.

Bug: T204962
Change-Id: Ib9fcf073332670149544d56e375541d014600371

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 16 May 2019 06:23:33 +0000 (08:23 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib8bf857616112887a5c758c00375fd1f14b2a164

3 years agoMerge "ApiLogin: Remove the first example of outdated flow"
jenkins-bot [Wed, 15 May 2019 21:09:28 +0000 (21:09 +0000)]
Merge "ApiLogin: Remove the first example of outdated flow"

3 years agoApiLogin: Remove the first example of outdated flow
Derk-Jan Hartman [Wed, 15 May 2019 20:30:48 +0000 (22:30 +0200)]
ApiLogin: Remove the first example of outdated flow

This first example demonstrates a deprecated flow that we should not
be encouraging and definetly shouldn't be before the example that we
want to promote

Change-Id: Ia1ec99a0fd88cee216fcb80aaebd0a00ce2942a4

3 years agoMerge "Don't allow completing a partial stash upload"
jenkins-bot [Wed, 15 May 2019 18:02:59 +0000 (18:02 +0000)]
Merge "Don't allow completing a partial stash upload"

3 years agoMerge "Bind retry callback with correct this argument"
jenkins-bot [Wed, 15 May 2019 18:02:50 +0000 (18:02 +0000)]
Merge "Bind retry callback with correct this argument"

3 years agoSearchResultSet: MW version number should be a string in wfDeprecated call
Derick Alangi [Wed, 15 May 2019 14:17:23 +0000 (15:17 +0100)]
SearchResultSet: MW version number should be a string in wfDeprecated call

Seems this was a typo and I think 1.32 which is a double/float will be
implicitly converted to true (bool) because it will resolve 1.32 to 1 as
integer and then 1 which maps to true (bool).

To avoid this, use '1.32' instead of the integer form of the version.

Change-Id: Ifaf6ab0d36bc02bd1707f8caf375f65a30eb1af5

3 years agoMerge "title: Convert binary regexp to use Unicode code points"
jenkins-bot [Wed, 15 May 2019 11:20:03 +0000 (11:20 +0000)]
Merge "title: Convert binary regexp to use Unicode code points"

3 years agoAllow the request ID to be passed in via the `X-Request-Id` header
Marko Obrovac [Mon, 22 Apr 2019 20:28:54 +0000 (13:28 -0700)]
Allow the request ID to be passed in via the `X-Request-Id` header

For tracing and logging purposes, we want to be able to see/generate the
list of all of the requests that happen in the environment for a given
external incoming request. To that end, allow Mediawiki to accept the
request ID provided by the incoming request as its own.

Since this may be problematic for set-ups that don't have an entity in
front of MW that sanitises the headers on the way in, introduce a new
global variable, `$wgAllowExternalReqID`, that can disable this
behaviour. By default, the feature is disabled.

Bug: T201409
Change-Id: I605471fb8b5bbc290baeecc7d80d9d715cb240c9

3 years agoDon't allow completing a partial stash upload
Matthias Mullie [Wed, 15 May 2019 07:13:15 +0000 (09:13 +0200)]
Don't allow completing a partial stash upload

finishUploadToStash could be called on an incomplete upload.
E.g. upload 1 chunk (that gets you the filekey) and then call
finishUploadToStash's finishUpload.

This adds another check for the stash result. The result will
only be 'Success' if all chunks have been submitted (or when
the file was uploaded as a whole, not chunked)
If we're still missing some chunks, result will be 'Continue'.

Bug: T190988
Change-Id: Ia0a4df0306b3e0cc0f2453f986b73bedd88241d3

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 14 May 2019 19:54:55 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibd264a8b5ec69c0fa68d24cea424f78a49646171

3 years agoMerge "localisation: Inject 'directory' option to LCStore classes"
jenkins-bot [Tue, 14 May 2019 18:47:26 +0000 (18:47 +0000)]
Merge "localisation: Inject 'directory' option to LCStore classes"

3 years agojqueryMsg: Allow sneaking in non-qqx JavaScript messages in qqx mode
Bartosz Dziewoński [Tue, 14 May 2019 05:41:17 +0000 (07:41 +0200)]
jqueryMsg: Allow sneaking in non-qqx JavaScript messages in qqx mode

In commit bb084a35739e3f3c54c8680f756ebebb90e13f28 I assumed that
with uselang=qqx, any messages defined in JavaScript would be just
the message key wrapped in parentheses.

It turns out that extensions (e.g. VisualEditor) have been sneaking
in messages in content language using the system we assumed to only
contain messages in user language. This trick stopped working.

Detect this and return the real message, if it's defined.

Bug: T222944
Change-Id: I3f2a6ceb249402ef76e788c494fd5bdc519faf65

3 years agoBind retry callback with correct this argument
Matthias Mullie [Tue, 14 May 2019 17:15:09 +0000 (19:15 +0200)]
Bind retry callback with correct this argument

Change-Id: I5db9e4e967d5569d4f90590333a7af2ddab1641f

3 years agolocalisation: Inject 'directory' option to LCStore classes
Timo Tijhof [Mon, 6 May 2019 21:52:52 +0000 (22:52 +0100)]
localisation: Inject 'directory' option to LCStore classes

Avoid globals for this, inject them from the factory function instead.

Bug: T218207
Change-Id: Ia961e8e08dcf1ca154d74ea6a3dadd2d59c1299c

3 years agoRemove FileRepoStatus
Reedy [Tue, 14 May 2019 15:55:59 +0000 (16:55 +0100)]
Remove FileRepoStatus

Change-Id: I4712d7cf8177dd3a7b8157d980dacb88a902262c

3 years agoMerge "Fix AbstractBlock param types in documentation"
jenkins-bot [Tue, 14 May 2019 14:51:56 +0000 (14:51 +0000)]
Merge "Fix AbstractBlock param types in documentation"

3 years agoFix AbstractBlock param types in documentation
Thalia [Tue, 14 May 2019 12:42:50 +0000 (13:42 +0100)]
Fix AbstractBlock param types in documentation

Change-Id: I503375485956d3c05da445542419fb62684ae34a

3 years agoSearchResult: MW version number should be a string in wfDeprecated call
Derick Alangi [Tue, 14 May 2019 11:28:35 +0000 (12:28 +0100)]
SearchResult: MW version number should be a string in wfDeprecated call

Seems this was a typo and I think 1.32 which is a double/float will be
implicitly converted to true (bool) because it will resolve 1.32 to 1 as
integer and then 1 which maps to true (bool).

To avoid this, use '1.32' instead of the integer form of the version.

Change-Id: I2420396e110284f582cd79820ffc6064e247b4b9

3 years agoMerge "watchlist: fix nonsensical timestamp/boolean comparisons in EnhancedRecentChanges"
jenkins-bot [Mon, 13 May 2019 20:46:22 +0000 (20:46 +0000)]
Merge "watchlist: fix nonsensical timestamp/boolean comparisons in EnhancedRecentChanges"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 13 May 2019 20:18:21 +0000 (22:18 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I2968beda4424a3eab0515fc1a8b597f2f8273e56

3 years agoMerge "Update release notes following the refactor of Block"
jenkins-bot [Mon, 13 May 2019 19:46:34 +0000 (19:46 +0000)]
Merge "Update release notes following the refactor of Block"

3 years agoUpdate release notes following the refactor of Block
Thalia [Mon, 13 May 2019 17:19:51 +0000 (18:19 +0100)]
Update release notes following the refactor of Block

This is a follow-up to I83bceb5.

Bug: T222737
Change-Id: Ic01a4bb196733a719860c21b7c9b8a41a2e1257a