lhc/web/wiklou.git
4 years agoMerge "Report more information about composite blocks in block error messages"
jenkins-bot [Wed, 17 Jul 2019 15:53:28 +0000 (15:53 +0000)]
Merge "Report more information about composite blocks in block error messages"

4 years agoReport more information about composite blocks in block error messages
Thalia [Wed, 3 Jul 2019 15:40:44 +0000 (16:40 +0100)]
Report more information about composite blocks in block error messages

For any messages that use CompositeBlock::getPermissionsError, include
details of the original blocks from which the composite block is made.

If there are any database blocks, give their IDs and also explain that
there may also be blocks due to IP blacklisting.

If there are no database blocks, then explain that the IP must be
blacklisted in multiple places.

Bug: T212326
Change-Id: Id6ad0019f8add4d5e000da5e872338e87cca485e

4 years agoMessagesKo.php: periodic updates
Yongmin Hong [Wed, 17 Jul 2019 09:53:02 +0000 (18:53 +0900)]
MessagesKo.php: periodic updates

Add Mute and sort BlockList alphabetically.

Change-Id: I8125979b61e489b2c99af258254c4bb83675b9c4
Signed-off-by: Yongmin Hong <revi@pobox.com>
4 years agoMerge "Add mechanism for temporary user rights"
jenkins-bot [Wed, 17 Jul 2019 02:06:04 +0000 (02:06 +0000)]
Merge "Add mechanism for temporary user rights"

4 years agoAdd mechanism for temporary user rights
Gergő Tisza [Thu, 11 Jul 2019 17:22:20 +0000 (19:22 +0200)]
Add mechanism for temporary user rights

Add a mechanism for adding temporary user rights that only exist
for the current request. This is occasionally needed to let normal
users act with a bot flag; traditionally the fact that User::$mRights
was public has been abused to do it, but I88992403 broke that.

Bug: T227772
Change-Id: Ife8f9d8affa750701e4e5d646ed8cd153c1d867b

4 years agoHard-deprecate wgProfileOnly, deprecated in 1.23
James D. Forrester [Fri, 12 Jul 2019 23:42:09 +0000 (16:42 -0700)]
Hard-deprecate wgProfileOnly, deprecated in 1.23

Change-Id: I1b66931ca0d3ae3e044b14f5b97dd98861ec5e23

4 years agoHard-deprecate wgLocalInterwiki, deprecated in 1.23
James D. Forrester [Fri, 12 Jul 2019 23:40:51 +0000 (16:40 -0700)]
Hard-deprecate wgLocalInterwiki, deprecated in 1.23

Change-Id: Ib18c3122c4d9b8a50d314f67004cc73b8c14d40e

4 years agoMerge "Hard-deprecate wgSkipSkin, deprecated in 1.23"
jenkins-bot [Wed, 17 Jul 2019 01:13:24 +0000 (01:13 +0000)]
Merge "Hard-deprecate wgSkipSkin, deprecated in 1.23"

4 years agoMerge "Update OOUI to v0.33.3"
jenkins-bot [Wed, 17 Jul 2019 00:00:37 +0000 (00:00 +0000)]
Merge "Update OOUI to v0.33.3"

4 years agoMerge "Fix OO.ui.infuse error on misc-authed-ooui module"
jenkins-bot [Tue, 16 Jul 2019 23:25:07 +0000 (23:25 +0000)]
Merge "Fix OO.ui.infuse error on misc-authed-ooui module"

4 years agoFix OO.ui.infuse error on misc-authed-ooui module
Dayllan Maza [Mon, 15 Jul 2019 20:04:38 +0000 (16:04 -0400)]
Fix OO.ui.infuse error on misc-authed-ooui module

Follows-up 419849211e3a63.

Change-Id: I1e22c70fa8c467212a02b508c68a17abf79a77e8

4 years agoMerge "Add mute preferences link to the tools menu"
jenkins-bot [Tue, 16 Jul 2019 22:43:22 +0000 (22:43 +0000)]
Merge "Add mute preferences link to the tools menu"

4 years agoMerge "Check namespace exists in HTMLNamespacesMultiselectField validation"
jenkins-bot [Tue, 16 Jul 2019 22:12:17 +0000 (22:12 +0000)]
Merge "Check namespace exists in HTMLNamespacesMultiselectField validation"

4 years agoUpdate OOUI to v0.33.3
Volker E [Tue, 16 Jul 2019 21:59:51 +0000 (14:59 -0700)]
Update OOUI to v0.33.3

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

Bug: T212159
Bug: T225021
Bug: T226045
Bug: T226780
Bug: T226822
Bug: T227666
Bug: T227917
Depends-On: I7dde9d02f94c4e78ef480035d3887b68d0128233
Change-Id: I7800da87a6a10399f705b43e05c8592c766bae6f

4 years agoAdd mute preferences link to the tools menu
Dayllan Maza [Wed, 10 Jul 2019 17:47:07 +0000 (13:47 -0400)]
Add mute preferences link to the tools menu

A link to Special:Mute is added to the tools menu on the sidebar
if the user is logged in and a registered relevant-user* is found
Mute preferences link will not be shown if $wgEnableSpecialMute is false

* From Skin::getRelevantUser: Special pages like Special:Contributions mark
  the user which  they are relevant to so that things like the toolbox can
  display the information they usually are only able to display on a
  user's userpage and talkpage.

Bug: T218270
Change-Id: I89eb8373963d28d52a026b60aa42d1c64b31b7c6

4 years agoCheck namespace exists in HTMLNamespacesMultiselectField validation
Thalia [Tue, 16 Jul 2019 17:07:10 +0000 (18:07 +0100)]
Check namespace exists in HTMLNamespacesMultiselectField validation

Bug: T219882
Change-Id: I710d0abed6bd40dcea5bdd1c59c8d936565961eb

4 years agoMerge "Revert "RedirectSpecialPage: handle interwiki redirects.""
jenkins-bot [Tue, 16 Jul 2019 12:03:05 +0000 (12:03 +0000)]
Merge "Revert "RedirectSpecialPage: handle interwiki redirects.""

4 years agoRevert "RedirectSpecialPage: handle interwiki redirects."
Krinkle [Tue, 16 Jul 2019 11:50:30 +0000 (11:50 +0000)]
Revert "RedirectSpecialPage: handle interwiki redirects."

This reverts commit 41106688abbe6dfff61c5642924ced42af3f0d33.

The original case is changed by this commit from a MediaWiki fatal
exception with HTTP 500, to a blank 200 response due to silent
failure. Use of GoToInterwiki appears to be invalid at this point in
the code. Reverting to keep prod the same as last week, so as
to unblock the train.

Bug: T227700
Change-Id: Ieece956d2e2e4c21b5ed7a75890b9f11eaf07e66

4 years agoMerge "resourceloader: Replace some Xml::encodeJs calls with RL's own encodeJson"
jenkins-bot [Tue, 16 Jul 2019 06:26:42 +0000 (06:26 +0000)]
Merge "resourceloader: Replace some Xml::encodeJs calls with RL's own encodeJson"

4 years agoLinker: Force type Language for $lang in tocList and generateTOC
Fomafix [Tue, 5 Jun 2018 11:46:57 +0000 (13:46 +0200)]
Linker: Force type Language for $lang in tocList and generateTOC

The call of wfGetLangObj( $lang ) is not necessary anymore.

$lang still defaults to user interface language on unset parameter.

This change is a follow-up to I15b65fec987641885374dfef9e1229ea405f7c30.

Change-Id: I6f12097a0e6cf7d6035d1164092c8b87c58e2bee

4 years agoMerge "resourceloader: Remove support for 'object' in wgResourceModules"
jenkins-bot [Tue, 16 Jul 2019 00:29:27 +0000 (00:29 +0000)]
Merge "resourceloader: Remove support for 'object' in wgResourceModules"

4 years agoresourceloader: Replace some Xml::encodeJs calls with RL's own encodeJson
Timo Tijhof [Tue, 16 Jul 2019 00:15:32 +0000 (01:15 +0100)]
resourceloader: Replace some Xml::encodeJs calls with RL's own encodeJson

Bug: T32956
Change-Id: I614fe0e80ff308b857639a27d7772f969899b468

4 years agoMerge "Remove $purgeBlobs parameter from LocalisationCacheRecache hook"
jenkins-bot [Tue, 16 Jul 2019 00:13:53 +0000 (00:13 +0000)]
Merge "Remove $purgeBlobs parameter from LocalisationCacheRecache hook"

4 years agoMerge "Add ImgAuthModifyHeaders hook to img_auth.php to modify headers"
markahershberger [Tue, 16 Jul 2019 00:03:12 +0000 (00:03 +0000)]
Merge "Add ImgAuthModifyHeaders hook to img_auth.php to modify headers"

4 years agoresourceloader: Remove support for 'object' in wgResourceModules
Timo Tijhof [Thu, 11 Jul 2019 17:09:23 +0000 (18:09 +0100)]
resourceloader: Remove support for 'object' in wgResourceModules

Obsolete since MediaWiki 1.17alpha, no known usage since.

Bug: T222637
Change-Id: Ie820b16022ced6767c32aee7f2497a99260b1641

4 years agoMerge "resourceloader: Add test coverage for WikiModule::getType"
jenkins-bot [Mon, 15 Jul 2019 22:55:49 +0000 (22:55 +0000)]
Merge "resourceloader: Add test coverage for WikiModule::getType"

4 years agoMerge "resourceloader: Clean up ResourceLoaderWikiModuleTest"
jenkins-bot [Mon, 15 Jul 2019 22:54:46 +0000 (22:54 +0000)]
Merge "resourceloader: Clean up ResourceLoaderWikiModuleTest"

4 years agoHard-deprecate wgSkipSkin, deprecated in 1.23
James D. Forrester [Fri, 12 Jul 2019 23:40:10 +0000 (16:40 -0700)]
Hard-deprecate wgSkipSkin, deprecated in 1.23

Change-Id: Ia1013bea7216603f3b6a8148e0194f1e2a8e9b41

4 years agoresourceloader: Add test coverage for WikiModule::getType
Timo Tijhof [Sat, 13 Jul 2019 18:32:17 +0000 (19:32 +0100)]
resourceloader: Add test coverage for WikiModule::getType

Change-Id: If004cc4ff3835091c01a4df84006be3f6fa173b2

4 years agoresourceloader: Clean up ResourceLoaderWikiModuleTest
Timo Tijhof [Sat, 13 Jul 2019 18:27:33 +0000 (19:27 +0100)]
resourceloader: Clean up ResourceLoaderWikiModuleTest

* Remove redundant any() calls.
* Use willReturn() instead of will(returnValue()).
* Use yield for providers and add missing test case descriptions.
* Use createMock() instead of wfGetDB() where the DB isn't needed.

* For provideIsKnownEmpty, re-order the cases and add a few extra
  cases, and document why they behave the way they do.

Change-Id: Iba42325a55bb3dfc50a8d2af46e1ddba8dda885a

4 years agoRemove $purgeBlobs parameter from LocalisationCacheRecache hook
Roan Kattouw [Mon, 15 Jul 2019 22:30:15 +0000 (15:30 -0700)]
Remove $purgeBlobs parameter from LocalisationCacheRecache hook

No longer allow hook functions to prevent message blobs from being
purged. Pass in an always-true variable for backwards compatibility,
which is then ignored.

Change-Id: I27ac9599711f2f0df2514a3934270af0ce03da7f

4 years agoMerge "resourceloader: Add unit tests for ResourceLoaderFilePath class methods"
jenkins-bot [Mon, 15 Jul 2019 21:58:57 +0000 (21:58 +0000)]
Merge "resourceloader: Add unit tests for ResourceLoaderFilePath class methods"

4 years agoAdd ImgAuthModifyHeaders hook to img_auth.php to modify headers
James Montalvo [Fri, 15 Mar 2019 04:03:29 +0000 (23:03 -0500)]
Add ImgAuthModifyHeaders hook to img_auth.php to modify headers

Change-Id: I3c6fd7b0c39d7fd52c484494233241093d152f88

4 years agoMerge "rdbms: set QUERY_IGNORE_DBO_TRX flag in more places in DatabaseSqlite"
jenkins-bot [Mon, 15 Jul 2019 21:29:31 +0000 (21:29 +0000)]
Merge "rdbms: set QUERY_IGNORE_DBO_TRX flag in more places in DatabaseSqlite"

4 years agoMerge "rdbms: fix IDatabase::setLBInfo() handling of null and allow clearing keys"
jenkins-bot [Mon, 15 Jul 2019 21:28:27 +0000 (21:28 +0000)]
Merge "rdbms: fix IDatabase::setLBInfo() handling of null and allow clearing keys"

4 years agoresourceloader: Add unit tests for ResourceLoaderFilePath class methods
Derick Alangi [Sun, 14 Jul 2019 22:16:07 +0000 (23:16 +0100)]
resourceloader: Add unit tests for ResourceLoaderFilePath class methods

~ testConstructor() - unit test for the constructor method.
~ testGetLocalPath() - unit test for the getLocalPath() method.
~ testGetRemotePath() - unit test for the getRemotePath() method.
~ testGetPath() - unit test for the getPath() method.

Change-Id: I0610938dd864931da7a7e1150ddb4d86ab9a2c5e

4 years agoFix JS error in MessagePoster when (optional) options param not given
Roan Kattouw [Mon, 15 Jul 2019 21:03:09 +0000 (14:03 -0700)]
Fix JS error in MessagePoster when (optional) options param not given

Change-Id: I77c53862431402d18ff995b410bba9eca9c3beff
Follows-Up: I80c401c56e231b34822791faffebc84d4933b922

4 years agoMerge "Drop NS_IMAGE and NS_IMAGE_TALK, deprecated in 1.14"
jenkins-bot [Mon, 15 Jul 2019 20:22:28 +0000 (20:22 +0000)]
Merge "Drop NS_IMAGE and NS_IMAGE_TALK, deprecated in 1.14"

4 years agoMerge "Allow skins/extensions to define custom OOUI themes"
jenkins-bot [Mon, 15 Jul 2019 20:21:01 +0000 (20:21 +0000)]
Merge "Allow skins/extensions to define custom OOUI themes"

4 years agoDrop NS_IMAGE and NS_IMAGE_TALK, deprecated in 1.14
James D. Forrester [Fri, 12 Jul 2019 23:20:57 +0000 (16:20 -0700)]
Drop NS_IMAGE and NS_IMAGE_TALK, deprecated in 1.14

Change-Id: Id980c3d9bbadae219181b07f22aa58cbc2efbdc6

4 years agoMerge "Drop remnants of wgHtml5/wgJsMimeType/wgXhtmlDefaultNamespace support, killed...
jenkins-bot [Mon, 15 Jul 2019 20:09:10 +0000 (20:09 +0000)]
Merge "Drop remnants of wgHtml5/wgJsMimeType/wgXhtmlDefaultNamespace support, killed in 1.22"

4 years agoDrop remnants of wgHtml5/wgJsMimeType/wgXhtmlDefaultNamespace support, killed in...
James D. Forrester [Fri, 12 Jul 2019 23:30:07 +0000 (16:30 -0700)]
Drop remnants of wgHtml5/wgJsMimeType/wgXhtmlDefaultNamespace support, killed in 1.22

Change-Id: I6bb849543fb3cfd50a4d99bb6a69e228913b9def

4 years agoMerge "Add change-tags to MessagePoster"
jenkins-bot [Mon, 15 Jul 2019 18:40:11 +0000 (18:40 +0000)]
Merge "Add change-tags to MessagePoster"

4 years agoMerge "Add success variables to message group and unify values"
jenkins-bot [Mon, 15 Jul 2019 17:33:32 +0000 (17:33 +0000)]
Merge "Add success variables to message group and unify values"

4 years agoMerge "objectcache: make getMultiWith(Union)SetCallback() usage easier"
jenkins-bot [Mon, 15 Jul 2019 17:26:45 +0000 (17:26 +0000)]
Merge "objectcache: make getMultiWith(Union)SetCallback() usage easier"

4 years agoMerge "objectcache: add regen_walltime metric to WANObjectCache::getWithSetCallback()"
jenkins-bot [Mon, 15 Jul 2019 15:48:04 +0000 (15:48 +0000)]
Merge "objectcache: add regen_walltime metric to WANObjectCache::getWithSetCallback()"

4 years agoMerge "Allow setting email even when blocked from sending emails"
jenkins-bot [Mon, 15 Jul 2019 14:07:50 +0000 (14:07 +0000)]
Merge "Allow setting email even when blocked from sending emails"

4 years agoAdd success variables to message group and unify values
Volker E [Mon, 15 Jul 2019 12:34:56 +0000 (05:34 -0700)]
Add success variables to message group and unify values

Adding `@*success` variables to “Message” variable group and
unifying values with Style Guide.
Also renaming `@colorErrorText` to @colorError` &
`@colorWarningText` to @colorWarning` to stay in naming
convention.

Bug: T226795
Change-Id: I49ca4b8f510888dff7a2487470174666143bcd76

4 years agordbms: set QUERY_IGNORE_DBO_TRX flag in more places in DatabaseSqlite
Aaron Schulz [Mon, 15 Jul 2019 03:42:47 +0000 (20:42 -0700)]
rdbms: set QUERY_IGNORE_DBO_TRX flag in more places in DatabaseSqlite

Change-Id: Id965d35a3feb331ded31ecb39f342ce23a061712

4 years agordbms: fix IDatabase::setLBInfo() handling of null and allow clearing keys
Aaron Schulz [Mon, 15 Jul 2019 02:54:47 +0000 (19:54 -0700)]
rdbms: fix IDatabase::setLBInfo() handling of null and allow clearing keys

Change-Id: I20cb799b54cabb1172940f8ece93b7f45d7cf0ba

4 years agoMerge "resourceloader: Speed up dependency checks in structure/ResourcesTest"
jenkins-bot [Mon, 15 Jul 2019 02:30:01 +0000 (02:30 +0000)]
Merge "resourceloader: Speed up dependency checks in structure/ResourcesTest"

4 years agoAdd change-tags to MessagePoster
Sam Wilson [Thu, 11 Jul 2019 04:59:32 +0000 (12:59 +0800)]
Add change-tags to MessagePoster

Add the ability to add change tags to talk page messages submitted
via wikitext MessagePoster, via a new 'options' parameter to the post()
function.

Bug: T227161
Change-Id: I80c401c56e231b34822791faffebc84d4933b922

4 years agoresourceloader: Speed up dependency checks in structure/ResourcesTest
Timo Tijhof [Sun, 14 Jul 2019 23:49:30 +0000 (00:49 +0100)]
resourceloader: Speed up dependency checks in structure/ResourcesTest

Stats from wmf-quibble-core-vendor-mysql-php72-docker builds.
Before:
* testIllegalDependencies (+21ms)
* testMissingDependencies (+254ms)
After:
* testValidDependencies (+17ms)

Bug: T225730
Change-Id: Idf760a27c7ad16d4838ae82e7895b659934fbf93

4 years agoMerge "Load GlobalFunctions.php to tests/phpunit/bootstrap.php"
jenkins-bot [Mon, 15 Jul 2019 01:56:45 +0000 (01:56 +0000)]
Merge "Load GlobalFunctions.php to tests/phpunit/bootstrap.php"

4 years agoMerge "resourceloader: Remove register() 'object' use in OutputPageTest"
jenkins-bot [Mon, 15 Jul 2019 01:56:36 +0000 (01:56 +0000)]
Merge "resourceloader: Remove register() 'object' use in OutputPageTest"

4 years agoMerge "Split HttpTest and SessionTest to unit and integration"
jenkins-bot [Sun, 14 Jul 2019 23:40:17 +0000 (23:40 +0000)]
Merge "Split HttpTest and SessionTest to unit and integration"

4 years agoMerge "tests: Move unit/languages to unit/includes/language"
jenkins-bot [Sun, 14 Jul 2019 23:36:24 +0000 (23:36 +0000)]
Merge "tests: Move unit/languages to unit/includes/language"

4 years agotests: Move unit/languages to unit/includes/language
Timo Tijhof [Sun, 14 Jul 2019 19:57:00 +0000 (20:57 +0100)]
tests: Move unit/languages to unit/includes/language

These source classes they test were also moved from
languages/ to includes/languages/.

Bug: T225756
Change-Id: I6931d459bbfa243d2a28f391f92bce70f1e52256

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 14 Jul 2019 20:16:41 +0000 (22:16 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I530ffee4e3aa0dd4b1e38ca12f70d02ad5c5447e

4 years agoresourceloader: Remove register() 'object' use in OutputPageTest
Timo Tijhof [Fri, 12 Jul 2019 17:30:06 +0000 (18:30 +0100)]
resourceloader: Remove register() 'object' use in OutputPageTest

Follows-up d6dd6e4d7220a7b, missed one :)

Bug: T222637
Change-Id: I105772d655ce1b64e3eb1d6222b57adfb69ec51d

4 years agoMerge "Setup: Remove $wgDebugPrintHttpHeaders option"
jenkins-bot [Sun, 14 Jul 2019 17:18:35 +0000 (17:18 +0000)]
Merge "Setup: Remove $wgDebugPrintHttpHeaders option"

4 years agoobjectcache: add regen_walltime metric to WANObjectCache::getWithSetCallback()
Aaron Schulz [Fri, 12 Jul 2019 18:24:51 +0000 (11:24 -0700)]
objectcache: add regen_walltime metric to WANObjectCache::getWithSetCallback()

Change-Id: I7918a6ed7a5d3d845c640aeeb78c88f1345f5157

4 years agoMerge "Import PSR NullLogger instead of using absolute class references"
jenkins-bot [Sun, 14 Jul 2019 17:03:37 +0000 (17:03 +0000)]
Merge "Import PSR NullLogger instead of using absolute class references"

4 years agoobjectcache: make getMultiWith(Union)SetCallback() usage easier
Aaron Schulz [Fri, 12 Jul 2019 22:48:25 +0000 (15:48 -0700)]
objectcache: make getMultiWith(Union)SetCallback() usage easier

Add WANObjectCache::multiRemap() as an array_combine() wrapper for
easily working with IDs after getMultiWith(Union)SetCallback() calls.
Make the enforcement of uniqueness in makeMultiKeys() stricter and
discourage poor key design in comments. Add WANObjectCache::hash256()
method for getting good key component hashes.

Also avoid pointless use of ArrayIterator::getArrayCopy().

Change-Id: I61ffdbf4af4374864bac180df590b4dddc8da56b

4 years agoRaise default reqTimeout in MultiHttpClient
Martin Urbanec [Sun, 14 Jul 2019 13:02:19 +0000 (15:02 +0200)]
Raise default reqTimeout in MultiHttpClient

Bug: T226979
Change-Id: If55329ff561ab3facdba5a89fd429577d986c43e

4 years agoMerge "When title contains only slashes, Title::getRootText() shouldn't return false"
jenkins-bot [Sun, 14 Jul 2019 12:40:30 +0000 (12:40 +0000)]
Merge "When title contains only slashes, Title::getRootText() shouldn't return false"

4 years agoWhen title contains only slashes, Title::getRootText() shouldn't return false
Martin Urbanec [Sat, 13 Jul 2019 22:27:43 +0000 (00:27 +0200)]
When title contains only slashes, Title::getRootText() shouldn't return false

Otherwise, Title::makeTitleSafe() will return null, which
breaks the assumption that Title::makeTitleSafe() always
returns something meaningful for strings
returned by Title::getRootText().

Bug: T227816
Change-Id: If79a12bb8d23f1eafc10017d56c62566f39347ad

4 years agoImport PSR NullLogger instead of using absolute class references
Aaron Schulz [Fri, 28 Jun 2019 16:45:15 +0000 (09:45 -0700)]
Import PSR NullLogger instead of using absolute class references

Change-Id: Ie09170f51e203e0a4c9a780a53cc9f3829139c31

4 years agoRemove $wgSiteStatsAsyncFactor feature and related $wgMainStash use
Aaron Schulz [Sat, 6 Jul 2019 20:36:43 +0000 (13:36 -0700)]
Remove $wgSiteStatsAsyncFactor feature and related $wgMainStash use

Also include ss_row_id = 1 in the UPDATE query to avoid gap locks

Bug: T227376
Change-Id: I7b730bab05e6d8b6799b623e0aff089c1103c3c2

4 years agoMerge "objectcache: make BagOStuff::getMulti() preserve order and omit keys with...
jenkins-bot [Sun, 14 Jul 2019 00:44:37 +0000 (00:44 +0000)]
Merge "objectcache: make BagOStuff::getMulti() preserve order and omit keys with missing segments"

4 years agoobjectcache: make BagOStuff::getMulti() preserve order and omit keys with missing...
Aaron Schulz [Sat, 13 Jul 2019 20:16:44 +0000 (13:16 -0700)]
objectcache: make BagOStuff::getMulti() preserve order and omit keys with missing segments

A key missing segments should count as non-existing, meaning that it should
not appear in the return value at all

Change-Id: I0f08b3dba77e0d335ebb2d75061927ebd36570d2

4 years agoMerge "Removed deprecated WikiMap::getWikiIdFromDomain() method"
jenkins-bot [Sun, 14 Jul 2019 00:31:23 +0000 (00:31 +0000)]
Merge "Removed deprecated WikiMap::getWikiIdFromDomain() method"

4 years agoMerge "Switch various LoadBalancer::getConnection() callers to getConnectionRef()"
jenkins-bot [Sun, 14 Jul 2019 00:22:39 +0000 (00:22 +0000)]
Merge "Switch various LoadBalancer::getConnection() callers to getConnectionRef()"

4 years agoRemoved deprecated WikiMap::getWikiIdFromDomain() method
Aaron Schulz [Wed, 3 Jul 2019 16:51:23 +0000 (09:51 -0700)]
Removed deprecated WikiMap::getWikiIdFromDomain() method

Also simplify WikiMap::isCurrentWikiDbDomain() slightly

Change-Id: I21358c5e5ae1d229228fc416894f50b4ee444182

4 years agoMerge "objectcache: fix race conditions in RedisBagOStuff::incr()"
jenkins-bot [Sat, 13 Jul 2019 23:57:32 +0000 (23:57 +0000)]
Merge "objectcache: fix race conditions in RedisBagOStuff::incr()"

4 years agoobjectcache: fix race conditions in RedisBagOStuff::incr()
Aaron Schulz [Fri, 12 Jul 2019 15:29:10 +0000 (08:29 -0700)]
objectcache: fix race conditions in RedisBagOStuff::incr()

The exist() check was not atomic, so a non-expiring TTL could be
make by mistake on race conditions. Use the redis WATCH command
for CAS-style atomicity of the exists()/incrBy() cycle.

Also optimized RedisBagOStuff::incrWithInit().

Change-Id: Ia003e054a41d4b4bbe73508e39d6606d8cc47291

4 years agoMerge "jobqueue: migrate root job deduplication to the WAN cache"
jenkins-bot [Sat, 13 Jul 2019 23:30:56 +0000 (23:30 +0000)]
Merge "jobqueue: migrate root job deduplication to the WAN cache"

4 years agoLoad GlobalFunctions.php to tests/phpunit/bootstrap.php
Amir Sarabadani [Sat, 13 Jul 2019 20:50:28 +0000 (22:50 +0200)]
Load GlobalFunctions.php to tests/phpunit/bootstrap.php

That mostly enables testing global functions

Bug: T87781
Change-Id: Ib42c56a67926ebcdba53f4c6c54a5bff98cb77a3

4 years agoMerge "rdbms: fix some phpstorm warnings database classes"
jenkins-bot [Sat, 13 Jul 2019 23:22:51 +0000 (23:22 +0000)]
Merge "rdbms: fix some phpstorm warnings database classes"

4 years agojobqueue: migrate root job deduplication to the WAN cache
Aaron Schulz [Sat, 6 Jul 2019 05:43:45 +0000 (22:43 -0700)]
jobqueue: migrate root job deduplication to the WAN cache

If the root job timestamp keys are lost or otherwise unknown, they
will now be deductively recached with the best known values as jobs
are popped and executed. This means the running any of many child
jobs of a root job can restore the root timestamp if it was lost.
This does not need to use the main stash given this fact.

Bug: T227376
Change-Id: Iae0f3af15803af048ff49f3bf281b2bde18c87f2

4 years agoobjectcache: only process cache non-LB connections in SqlBagOStuff
Aaron Schulz [Sat, 13 Jul 2019 21:52:15 +0000 (14:52 -0700)]
objectcache: only process cache non-LB connections in SqlBagOStuff

LB should manage any such process caching otherwise as it owns the handles

Change-Id: Ic9cd84c7c3cba790eb127e70f6506270e5bec2a1

4 years agordbms: fix some phpstorm warnings database classes
Aaron Schulz [Fri, 3 May 2019 19:19:18 +0000 (12:19 -0700)]
rdbms: fix some phpstorm warnings database classes

Change-Id: Ib3b8aaadda8101ed82158b1260f10f6d7be16783

4 years agoMove the showMissingArticle() cache from $wgMainStash to "db-replicated"
Aaron Schulz [Sat, 6 Jul 2019 07:08:39 +0000 (00:08 -0700)]
Move the showMissingArticle() cache from $wgMainStash to "db-replicated"

Bug: T227376
Change-Id: Ice3b3b1bc8a09f66c4f02bb233a1992ed6d46ab7

4 years agoMerge "upload: move UploadBase status store from $wgMainStash to "db-replicated""
jenkins-bot [Sat, 13 Jul 2019 21:34:34 +0000 (21:34 +0000)]
Merge "upload: move UploadBase status store from $wgMainStash to "db-replicated""

4 years agoMerge "objectcache: Hard deprecate `ObjectCache::getMainWANInstance()`"
jenkins-bot [Sat, 13 Jul 2019 21:34:28 +0000 (21:34 +0000)]
Merge "objectcache: Hard deprecate `ObjectCache::getMainWANInstance()`"

4 years agoSetup: Remove $wgDebugPrintHttpHeaders option
Timo Tijhof [Sat, 13 Jul 2019 01:08:30 +0000 (02:08 +0100)]
Setup: Remove $wgDebugPrintHttpHeaders option

This is always true and has been for years. I don't know of any
reason why someone would want to disable it, as the information
is only ever logged when the debug log is enabled, at which point
why not?

Bug: T189966
Change-Id: I17b9f564a61a0f76f2fc8c0006dc13997857829a

4 years agoupload: move UploadBase status store from $wgMainStash to "db-replicated"
Aaron Schulz [Sat, 6 Jul 2019 06:00:53 +0000 (23:00 -0700)]
upload: move UploadBase status store from $wgMainStash to "db-replicated"

This is only triggered for chunked uploads and does not need anything
more special the local objectcache table.

Also add comments and fix numerous IDEA warnings.

Bug: T227376
Change-Id: Ia61855293a265306c5a27a9dfc0139c4d0b04c4f

4 years agoSplit HttpTest and SessionTest to unit and integration
Amir Sarabadani [Thu, 11 Jul 2019 18:56:41 +0000 (20:56 +0200)]
Split HttpTest and SessionTest to unit and integration

This way it moves 73 more tests to unit tests

Bug: T87781
Change-Id: I963488450bb355573d71ae31b57d71683ce51683

4 years agoMerge "Chinese Conversion Table Update 2019-2"
jenkins-bot [Sat, 13 Jul 2019 18:33:04 +0000 (18:33 +0000)]
Merge "Chinese Conversion Table Update 2019-2"

4 years agoMerge "Title: Title::getSubpage should not lose the interwiki prefix"
jenkins-bot [Sat, 13 Jul 2019 18:02:27 +0000 (18:02 +0000)]
Merge "Title: Title::getSubpage should not lose the interwiki prefix"

4 years agoTitle: Title::getSubpage should not lose the interwiki prefix
daniel [Fri, 12 Jul 2019 10:21:44 +0000 (12:21 +0200)]
Title: Title::getSubpage should not lose the interwiki prefix

This issue was discovered while investigating T227700, and added some
confusion. This patch is necessary for Special:MyLanguage to behave
correctly in all cases, but it's not necessary for fixing the primary
critical problem.

Bug: T227700
Change-Id: Ib4cbeec47a877c473cbd501cc964cc66d169b99e

4 years agostorage: remove wfWikiId() call from RevisionStore::checkDatabaseDomain()
Aaron Schulz [Thu, 4 Jul 2019 07:46:39 +0000 (00:46 -0700)]
storage: remove wfWikiId() call from RevisionStore::checkDatabaseDomain()

This should only already be comparing DB domains

Change-Id: If2d40fe1ce4698d71d8a29f8a43b40a8fbb746e8

4 years agoMerge "Setup: Make wfMemoryLimit() internal and simplify"
jenkins-bot [Sat, 13 Jul 2019 02:27:43 +0000 (02:27 +0000)]
Merge "Setup: Make wfMemoryLimit() internal and simplify"

4 years agoMerge "Setup: Move mb_internal_encoding() call earlier"
jenkins-bot [Sat, 13 Jul 2019 02:25:54 +0000 (02:25 +0000)]
Merge "Setup: Move mb_internal_encoding() call earlier"

4 years agoMerge "rdbms: switch to AtEast warning suppression in Database classes"
jenkins-bot [Sat, 13 Jul 2019 02:06:55 +0000 (02:06 +0000)]
Merge "rdbms: switch to AtEast warning suppression in Database classes"

4 years agordbms: switch to AtEast warning suppression in Database classes
Aaron Schulz [Thu, 11 Jul 2019 09:32:27 +0000 (02:32 -0700)]
rdbms: switch to AtEast warning suppression in Database classes

Change-Id: Ia32f1ba048a540438f78b11a1e94f80acfc7bf50

4 years agoSetup: Make wfMemoryLimit() internal and simplify
Timo Tijhof [Sat, 13 Jul 2019 01:05:54 +0000 (02:05 +0100)]
Setup: Make wfMemoryLimit() internal and simplify

Bug: T189966
Change-Id: I4fa3d66dbf2e2d05a0d1868329a16dfb1959498f

4 years agoMerge "objectcache: Document WANObjectCache statsd metrics"
Krinkle [Sat, 13 Jul 2019 00:48:56 +0000 (00:48 +0000)]
Merge "objectcache: Document WANObjectCache statsd metrics"

4 years agoSetup: Move mb_internal_encoding() call earlier
Timo Tijhof [Sat, 13 Jul 2019 00:46:56 +0000 (01:46 +0100)]
Setup: Move mb_internal_encoding() call earlier

This is an unconditional and unconfigurable changes to PHP behaviour.
The earlier the better so that there is less code that can run
without it.

Also improve some documentation of other setup logic bits being
documented by the referenced task.

Bug: T189966
Change-Id: Ia8e1478cf0841d80b1c61c266f2ece75be2303e1

4 years agoMerge "Drop ChangePasswordForm hook, deprecated in 1.27"
jenkins-bot [Sat, 13 Jul 2019 00:32:46 +0000 (00:32 +0000)]
Merge "Drop ChangePasswordForm hook, deprecated in 1.27"