lhc/web/wiklou.git
5 years agoAvoid fatal when finding no base revision for a null revision.
daniel [Thu, 4 Oct 2018 10:49:50 +0000 (12:49 +0200)]
Avoid fatal when finding no base revision for a null revision.

Bug: T205675
Change-Id: Iae67649a1be9597086033ad34d9d00556ba35730

5 years agoPhabricator: Use Tddddd instead of Bug ddddd in comments
Fomafix [Thu, 4 Oct 2018 07:06:00 +0000 (09:06 +0200)]
Phabricator: Use Tddddd instead of Bug ddddd in comments

Change-Id: Ic9fe03cab270bd6be738af346164ad5d31a0d780

5 years agoMerge "rdbms: clarfiy some comments about commitMasterChanges() methods"
jenkins-bot [Thu, 4 Oct 2018 02:46:25 +0000 (02:46 +0000)]
Merge "rdbms: clarfiy some comments about commitMasterChanges() methods"

5 years agoMerge "rdbms: clarify IDatabase::setTransactionListener() comment"
jenkins-bot [Thu, 4 Oct 2018 02:46:19 +0000 (02:46 +0000)]
Merge "rdbms: clarify IDatabase::setTransactionListener() comment"

5 years agoMerge "MessageCache: do not store the EXCESSIVE array as it is only needed for HASH"
jenkins-bot [Thu, 4 Oct 2018 02:43:09 +0000 (02:43 +0000)]
Merge "MessageCache: do not store the EXCESSIVE array as it is only needed for HASH"

5 years agordbms: clarfiy some comments about commitMasterChanges() methods
Aaron Schulz [Wed, 3 Oct 2018 22:39:55 +0000 (15:39 -0700)]
rdbms: clarfiy some comments about commitMasterChanges() methods

Change-Id: I2c9f3cb9b4dcd16f561e55d119849b526e9d402b

5 years agoMessageCache: do not store the EXCESSIVE array as it is only needed for HASH
Aaron Schulz [Wed, 3 Oct 2018 19:38:46 +0000 (12:38 -0700)]
MessageCache: do not store the EXCESSIVE array as it is only needed for HASH

This saves space as the number of entries becomes larger.

Bug: T193271
Change-Id: I32d7512d7f05ae7c9a69b88cd19df64d7a21b4a1

5 years agoMerge "Fix option name in maintenance/importDump.php"
jenkins-bot [Thu, 4 Oct 2018 01:29:14 +0000 (01:29 +0000)]
Merge "Fix option name in maintenance/importDump.php"

5 years agoSpecial:Preferences: Drop isOouiEnabled() before it gets released
James D. Forrester [Wed, 26 Sep 2018 23:12:23 +0000 (16:12 -0700)]
Special:Preferences: Drop isOouiEnabled() before it gets released

Depends-On: Ic1df4e965df61c2d164b2ffd2fa07ed68b028ddf
Depends-On: If0e83751089d010d026a736040d77b9a0851ef42
Depends-On: Id9c840e979b723806883bb3e63d7f2f691fea629
Depends-On: I9d5dbf449c624233cef2ccf0e3e4200d9eb2b7c3
Change-Id: If2a21a6a40802ab187b30de78fb521f016dd10cd

5 years agoMerge "Special:Preferences: Drop non-OOUI legacy form version"
jenkins-bot [Wed, 3 Oct 2018 23:57:26 +0000 (23:57 +0000)]
Merge "Special:Preferences: Drop non-OOUI legacy form version"

5 years agoMerge "Drop 'SpecialRecentChangesQuery' & 'SpecialWatchlistQuery' hooks, deprecated...
jenkins-bot [Wed, 3 Oct 2018 23:32:36 +0000 (23:32 +0000)]
Merge "Drop 'SpecialRecentChangesQuery' & 'SpecialWatchlistQuery' hooks, deprecated in 1.23"

5 years agoMerge "Database: close() should not commit transactions"
jenkins-bot [Wed, 3 Oct 2018 23:25:22 +0000 (23:25 +0000)]
Merge "Database: close() should not commit transactions"

5 years agoMake UID clock drift error have more details.
Aaron Schulz [Wed, 3 Oct 2018 22:01:29 +0000 (18:01 -0400)]
Make UID clock drift error have more details.

Change-Id: Ic682e48b06161c2a286f5da9016f4831ee72a31e

5 years agoMove test assertion to mirror parameter order
Kosta Harlan [Wed, 3 Oct 2018 20:42:55 +0000 (16:42 -0400)]
Move test assertion to mirror parameter order

Follow up from I2df0551c5837adc578b27082ab6ba2ac95d937f8

Bug: T206130
Change-Id: Ib669c77fdb709846d0182cb28796cf53914114c4

5 years agoMerge "SECURITY: Fix permissions check for patrol action"
jenkins-bot [Wed, 3 Oct 2018 19:50:32 +0000 (19:50 +0000)]
Merge "SECURITY: Fix permissions check for patrol action"

5 years agoSECURITY: Fix permissions check for patrol action
Kosta Harlan [Wed, 3 Oct 2018 16:47:14 +0000 (12:47 -0400)]
SECURITY: Fix permissions check for patrol action

Return existing errors instead of empty array in checkUserConfigPermissions().
Returning an empty array wiped out previously-found errors.

Also add test coverage for patrol action.

Bug: T206130
Change-Id: I2df0551c5837adc578b27082ab6ba2ac95d937f8

5 years agoDatabase: close() should not commit transactions
Brad Jorsch [Wed, 3 Oct 2018 17:38:19 +0000 (13:38 -0400)]
Database: close() should not commit transactions

Transactional databases normally roll back when a connection is closed
with an open transaction rather than committing them, so MediaWiki
committing them is unexpected.

There are two cases being changed here: automatic transactions without
writes and manual transactions. For the former it shouldn't make a
difference if we commit or roll back since no writes were done anyway.
The latter has logged a message since MW 1.31 (I0992f9a8), and that
warning has not been logged in Wikimedia production in the past 60 days
so we should be ok there too.

Bug: T206147
Change-Id: Ieceef4deb49044db8f0622d38ee76c9d9f39704c

5 years agoFix option name in maintenance/importDump.php
Brad Jorsch [Mon, 23 Jul 2018 16:06:20 +0000 (12:06 -0400)]
Fix option name in maintenance/importDump.php

Bug: T200138
Change-Id: Icc5d9878bc3ebdf03efec9161b220ad0bf55dc9a

5 years agoMerge "Show copyright based on $output->hasCopyright()"
jenkins-bot [Wed, 3 Oct 2018 18:04:15 +0000 (18:04 +0000)]
Merge "Show copyright based on $output->hasCopyright()"

5 years agoMerge "Remove unused function: isStructuredFilterUiEnabledByDefault"
jenkins-bot [Wed, 3 Oct 2018 18:01:30 +0000 (18:01 +0000)]
Merge "Remove unused function: isStructuredFilterUiEnabledByDefault"

5 years agoShow copyright based on $output->hasCopyright()
Stephane Bisson [Wed, 3 Oct 2018 13:12:37 +0000 (09:12 -0400)]
Show copyright based on $output->hasCopyright()

Introducing setCopyright/hasCopyright in OutputPage to
make the showing of the copyright message controllable
by pages other than articles.

hasCopyright defaults to isArticle() to preserve the rule
that all article should show the copyright.

This is used by Flow to show the copyright
on various pages that contain user-generated
content.

Bug: T184960
Change-Id: I3a50dbcedc6b119b9262c50cb3a84b0dd230fb3d

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 3 Oct 2018 15:20:20 +0000 (17:20 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ic0af665f26aa1af0bd706ee26bb811d0a482ec2b

5 years agoDeprecate Language::setCode as public method
Fomafix [Sat, 7 Jul 2018 09:53:04 +0000 (11:53 +0200)]
Deprecate Language::setCode as public method

setCode changes the language code for the Language object but it also
replaces the whole language codes for all Language objects.

> $lang = Language::factory( 'fr' )

> $lang2 = Language::factory( 'fr' )

> $lang->setCode( 'it' )

> print $lang2->getCode()
it
> $lang3 = Language::factory( 'fr' )

> print $lang3->getCode()
it

Better assign a new Language object.

Also add more tests for Language::equals.

Depends-On: I61439bac82021344c3f9a6056cccd937b3450af2
Depends-On: I2d9e551d6eb33f28f42aeaf48160eba21b83881f
Change-Id: I201b479f58e63c9c40fb8a3ec9575a551fb35235

5 years agoMerge "API: Handle empty xxnamespace parameter in ApiQueryBacklinksprop"
jenkins-bot [Wed, 3 Oct 2018 06:42:17 +0000 (06:42 +0000)]
Merge "API: Handle empty xxnamespace parameter in ApiQueryBacklinksprop"

5 years agoMerge "AutoloadGenerator: Filter PSR4-compliant classes instead of ignoring directories"
jenkins-bot [Wed, 3 Oct 2018 06:41:03 +0000 (06:41 +0000)]
Merge "AutoloadGenerator: Filter PSR4-compliant classes instead of ignoring directories"

5 years agoMerge "Migrate image descriptions from image_comment_temp"
jenkins-bot [Wed, 3 Oct 2018 01:23:54 +0000 (01:23 +0000)]
Merge "Migrate image descriptions from image_comment_temp"

5 years agoMerge "RCFilters: better vertical alignment of checkbox and text in menus"
jenkins-bot [Wed, 3 Oct 2018 00:43:17 +0000 (00:43 +0000)]
Merge "RCFilters: better vertical alignment of checkbox and text in menus"

5 years agoRCFilters: better vertical alignment of checkbox and text in menus
Stephane Bisson [Tue, 2 Oct 2018 16:55:12 +0000 (12:55 -0400)]
RCFilters: better vertical alignment of checkbox and text in menus

- Remove min-height so menu items are a little smaller and
  their content is vertically-aligned.

- Force `vertical-align: middle;` for checkboxes by overriding
  OOUI with extreme specificity.

Bug: T200364
Change-Id: If0b2b5c1b749f913badbd0c02a85852ec0007020

5 years agoMerge "MessageCache: remove confusing and unused $isFullKey parameter from get()"
jenkins-bot [Tue, 2 Oct 2018 23:51:03 +0000 (23:51 +0000)]
Merge "MessageCache: remove confusing and unused $isFullKey parameter from get()"

5 years agoMessageCache: remove confusing and unused $isFullKey parameter from get()
Aaron Schulz [Tue, 2 Oct 2018 20:53:32 +0000 (13:53 -0700)]
MessageCache: remove confusing and unused $isFullKey parameter from get()

Follows-up cba0fb1c1576324e87b27, which removed the last caller.

Change-Id: I00c17fedff39b1b35519cff2a0f8eac3e4d6f2ab

5 years agoLanguage: Don't return aliases to namespaces that don't exist
Brad Jorsch [Tue, 2 Oct 2018 21:18:38 +0000 (17:18 -0400)]
Language: Don't return aliases to namespaces that don't exist

On a multi-wiki server using a l10n cache, the cache will probably
include aliases from all extensions enabled for any wiki while the
namespaces themselves will only be defined on the wikis where the
extension is loaded.

Bug: T206030
Change-Id: I985dfa3eb17944d5fc0c5be0979be21504fb1341

5 years agoMerge "rdbms: make * consistently act like in select/insertSelect methods"
jenkins-bot [Tue, 2 Oct 2018 16:44:54 +0000 (16:44 +0000)]
Merge "rdbms: make * consistently act like  in select/insertSelect methods"

5 years agoMerge "Add audience parameter to PoolWorkArticleView"
jenkins-bot [Tue, 2 Oct 2018 15:12:05 +0000 (15:12 +0000)]
Merge "Add audience parameter to PoolWorkArticleView"

5 years agoMigrate image descriptions from image_comment_temp
Brad Jorsch [Wed, 7 Mar 2018 16:40:56 +0000 (11:40 -0500)]
Migrate image descriptions from image_comment_temp

image_comment_temp was always intended to be temporary, until an
expensive schema change on Wikimedia Commons's image table could be
done. Now that that has been done, stop writing image_comment_temp and
add a migration script to copy existing data into img_description_id.

Ic8efeddc will remove the reads from image_comment_temp and drop the
image_comment_temp table.

Bug: T188132
Change-Id: Iab5f521577a415b2dc213b517ee8a0dca4fdd0aa

5 years agoMerge "Use pseudo elements to style changelist-separators on Contributions"
jenkins-bot [Tue, 2 Oct 2018 12:24:58 +0000 (12:24 +0000)]
Merge "Use pseudo elements to style changelist-separators on Contributions"

5 years agoAdd audience parameter to PoolWorkArticleView
Gergő Tisza [Tue, 2 Oct 2018 01:33:28 +0000 (18:33 -0700)]
Add audience parameter to PoolWorkArticleView

The old behavior was that the audience was RAW if the revision object
parameter got passed in, otherwise PUBLIC. This was undocumented and
not used outside core; this patch gets rid of it in favor of an
explicit argument.

Bug: T205578
Change-Id: Ic7cdb38f658f6d85c48ff13c7f84c64a45c9b1ee

5 years agoMerge "Add type hint to invalidateImageDescriptions()"
jenkins-bot [Tue, 2 Oct 2018 10:33:19 +0000 (10:33 +0000)]
Merge "Add type hint to invalidateImageDescriptions()"

5 years agoAdd type hint to invalidateImageDescriptions()
Aaron Schulz [Tue, 2 Oct 2018 06:20:10 +0000 (23:20 -0700)]
Add type hint to invalidateImageDescriptions()

Change-Id: Ie6322f25c959f5de4bbccd8f47d40f112817d00b

5 years agoMerge "Replace WikiExporter streaming (unbuffered) mode with batched queries"
jenkins-bot [Tue, 2 Oct 2018 05:16:07 +0000 (05:16 +0000)]
Merge "Replace WikiExporter streaming (unbuffered) mode with batched queries"

5 years agoDrop 'SpecialRecentChangesQuery' & 'SpecialWatchlistQuery' hooks, deprecated in 1.23
James D. Forrester [Tue, 2 Oct 2018 01:15:10 +0000 (18:15 -0700)]
Drop 'SpecialRecentChangesQuery' & 'SpecialWatchlistQuery' hooks, deprecated in 1.23

Depends-On: I9822bb2bc1bcc13eec7924208bf3819d3512ad26
Change-Id: I67c06bb99d9c9582a638f061f523661c821bca8d

5 years agoMerge "ApiOptions: fix resetting some preferences to default"
jenkins-bot [Tue, 2 Oct 2018 01:06:20 +0000 (01:06 +0000)]
Merge "ApiOptions: fix resetting some preferences to default"

5 years agoMerge "Use varargs in global functions"
jenkins-bot [Tue, 2 Oct 2018 01:04:11 +0000 (01:04 +0000)]
Merge "Use varargs in global functions"

5 years agoSpecial:Preferences: Drop non-OOUI legacy form version
James D. Forrester [Tue, 18 Sep 2018 18:46:46 +0000 (11:46 -0700)]
Special:Preferences: Drop non-OOUI legacy form version

Change-Id: I65b89385c3ec28ef01b86dd933dae3801e503631

5 years agoRemove unused function: isStructuredFilterUiEnabledByDefault
Stephane Bisson [Tue, 2 Oct 2018 00:34:55 +0000 (20:34 -0400)]
Remove unused function: isStructuredFilterUiEnabledByDefault

Follow up Id3799fefd21cd9bea0e089a5e12576ee9ea1085e

Bug: T196033
Change-Id: Ib2ad41be8648f7ff8b4a218fd66c328dee3924d9

5 years agoCategoryTagItemWidget: Drop backwards-compatibility "Capsule" name
James D. Forrester [Tue, 2 Oct 2018 00:32:31 +0000 (17:32 -0700)]
CategoryTagItemWidget: Drop backwards-compatibility "Capsule" name

Not used for months.

Change-Id: Ie85d2d0ef6ebc3e1e2502519a02b8fadd8d53b7a

5 years agoUse pseudo elements to style changelist-separators on Contributions
jdlrobson [Tue, 18 Sep 2018 21:11:08 +0000 (14:11 -0700)]
Use pseudo elements to style changelist-separators on Contributions

Currently, these separators are unnecessarily hardcoded in HTML.
This is problematic, as it limits the extent to which skins such
as Minerva and Timeless can skin these pages.

If the pseudo selector is not available (e.g. legacy browsers)
this degrades nicely to whitespace and the page is still useable.

Right now, these changes are scoped to pages uses the ContribsPager
(used by Special:Contributions)
but we can adopt them in other pages once we have this approach set in
stone (CSS)

Bug: T205581
Change-Id: Ia2c485e6058ebf4282ed2f7eb7b046b2deb03f57

5 years agoHard-deprecate password handling in User
Gergő Tisza [Thu, 14 Jan 2016 23:53:56 +0000 (15:53 -0800)]
Hard-deprecate password handling in User

Add wfDeprecated for User::checkPassword(), User::setPassword(),
User::setInternalPassword() and User::checkTemporaryPassword().
With AuthManager mediating between the caller and a set of
authentication providers in a potentially multi-step process,
a password check or change now cannot always be expressed
with a single-step succed-or-fail process. Callers should use
AuthManager::beginAuthentication() with a PasswordAuthenticationRequest
for password checks, and AuthManager::changeAuthenticationData()
for a password change.

Bug: T91699
Change-Id: Ib0ae8f1ff10ae6c2655d529db8b3a32e0cb489b0

5 years agoMerge "Remove temporary rcfilters variables"
jenkins-bot [Mon, 1 Oct 2018 23:09:28 +0000 (23:09 +0000)]
Merge "Remove temporary rcfilters variables"

5 years agoApiOptions: fix resetting some preferences to default
Max Semenik [Sat, 14 Jul 2018 03:14:06 +0000 (20:14 -0700)]
ApiOptions: fix resetting some preferences to default

For preferences like 'skin' that have a limited number of values, null
is not a valid value, thus attempts to reset them fail with
"Validation error for \"skin\": This value is required."

Bug: T65080

Change-Id: I86554a6d30c8ab970740d8682fb2261476de0677

5 years agordbms: make * consistently act like in select/insertSelect methods
Aaron Schulz [Mon, 1 Oct 2018 21:31:53 +0000 (14:31 -0700)]
rdbms: make * consistently act like  in select/insertSelect methods

This now matches the documentation of insertSelect()

Bug: T202553
Change-Id: Ie6602fdd3b48b9136de7c65289c85ced5f5f2f1d

5 years agoMerge "Remove __METHOD__ in ServiceWiring return array"
jenkins-bot [Mon, 1 Oct 2018 19:43:43 +0000 (19:43 +0000)]
Merge "Remove __METHOD__ in ServiceWiring return array"

5 years agordbms: clarify IDatabase::setTransactionListener() comment
Aaron Schulz [Mon, 1 Oct 2018 19:24:33 +0000 (12:24 -0700)]
rdbms: clarify IDatabase::setTransactionListener() comment

Change-Id: I6f494934b3602206943581c3c62f565bf42bd26f

5 years agoFix caller name in JobRunner::commitMasterChanges
Umherirrender [Sun, 30 Sep 2018 15:21:11 +0000 (17:21 +0200)]
Fix caller name in JobRunner::commitMasterChanges

Use the given fname for all places.
The __METHOD__ inside the unlock closure would be shown as {closure} in
logs

Change-Id: I87ef26e893af858f58d1a77dcb2d8ee192456f5c

5 years agoMerge "Preserve whitespace in search index text content"
jenkins-bot [Mon, 1 Oct 2018 18:22:48 +0000 (18:22 +0000)]
Merge "Preserve whitespace in search index text content"

5 years agoMerge "Fix [[MediaWiki:Config-install-success/en]] translation issues"
jenkins-bot [Mon, 1 Oct 2018 16:12:12 +0000 (16:12 +0000)]
Merge "Fix [[MediaWiki:Config-install-success/en]] translation issues"

5 years agoMerge "Make messages [[MediaWiki:Config-db-web-account-same/qqq]] and [[MediaWiki...
jenkins-bot [Mon, 1 Oct 2018 16:11:28 +0000 (16:11 +0000)]
Merge "Make messages [[MediaWiki:Config-db-web-account-same/qqq]] and [[MediaWiki:Config-db-web-create]] clearer"

5 years agoMerge "rdbms: Document a bunch of stuff about query verbs"
jenkins-bot [Mon, 1 Oct 2018 15:55:38 +0000 (15:55 +0000)]
Merge "rdbms: Document a bunch of stuff about query verbs"

5 years agoAPI: Handle empty xxnamespace parameter in ApiQueryBacklinksprop
Brad Jorsch [Mon, 1 Oct 2018 14:18:40 +0000 (10:18 -0400)]
API: Handle empty xxnamespace parameter in ApiQueryBacklinksprop

If the xxnamespace parameter is specified but empty, we don't need to do
anything because there will be no results.

Bug: T205810
Change-Id: Iae5d766a5408368cadd01583d18b745661304a7f

5 years agoMerge "Add waitForReplication in DeleteLocalPasswords"
jenkins-bot [Mon, 1 Oct 2018 14:13:15 +0000 (14:13 +0000)]
Merge "Add waitForReplication in DeleteLocalPasswords"

5 years agoAdd waitForReplication in DeleteLocalPasswords
Amir Sarabadani [Mon, 1 Oct 2018 13:09:22 +0000 (15:09 +0200)]
Add waitForReplication in DeleteLocalPasswords

It almost brought commonswiki down when it was run

Bug: T201009
Change-Id: Ia825f9572b8c71c5627eb627c58f51a689c2f8aa

5 years agoUse Unicode notation (U+XXXX) instead of HTML notation (&#xXXXX;) in comments
Fomafix [Mon, 1 Oct 2018 10:24:00 +0000 (12:24 +0200)]
Use Unicode notation (U+XXXX) instead of HTML notation (&#xXXXX;) in comments

Performed using:
sed -i 's/&#x\([0-9a-f]*\);/U+\U\1/gi' languages/messages/* languages/classes/*

Change-Id: Id489ae5ffb10bc5b047f72bc6834dd0488b5f940

5 years agoMerge "Change the Unicode numbers in the comments in MessagesPs"
jenkins-bot [Mon, 1 Oct 2018 06:24:38 +0000 (06:24 +0000)]
Merge "Change the Unicode numbers in the comments in MessagesPs"

5 years agoChange the Unicode numbers in the comments in MessagesPs
Amir Aharoni [Sun, 30 Sep 2018 21:48:23 +0000 (00:48 +0300)]
Change the Unicode numbers in the comments in MessagesPs

The numbers are supposed to be the same as in MessagesFa.php.

Change-Id: Icd3e8c8ac1d5beb194dcbce36100a373816bc506

5 years agoUpdate CoC file in Core
Alangi Derick [Sun, 30 Sep 2018 13:51:35 +0000 (14:51 +0100)]
Update CoC file in Core

Update CoC file in core to have the "Special:MyLanguage" so
it links to the user's preferred language CoC page.

Bug: T202047
Change-Id: Iacecf59c9f3b3df171233aeb7bdde1bc1e9444ae

5 years agoRemove __METHOD__ in ServiceWiring return array
Umherirrender [Sun, 30 Sep 2018 15:25:59 +0000 (17:25 +0200)]
Remove __METHOD__ in ServiceWiring return array

It is in a callback and would provide only {closures}.
It is logged to a channel, where the context is known.

Change-Id: I15ee43ff9383970fc6d5b5cc45678397d2096604

5 years agoMerge "HTMLInfoField: Support 'rawrow' in OOUI mode"
jenkins-bot [Sun, 30 Sep 2018 18:18:26 +0000 (18:18 +0000)]
Merge "HTMLInfoField: Support 'rawrow' in OOUI mode"

5 years agoMerge "Create UserGetRightsRemove hook"
jenkins-bot [Sun, 30 Sep 2018 18:12:50 +0000 (18:12 +0000)]
Merge "Create UserGetRightsRemove hook"

5 years agoFix logged method in LoadBalancer
Umherirrender [Sun, 30 Sep 2018 15:19:21 +0000 (17:19 +0200)]
Fix logged method in LoadBalancer

Seeing {closure} in the logs as caller is not helpful

Change-Id: I45d9be25acdcc70c7d9755c15f68f7bc6887e166

5 years agoFix caller name in DatabasePostgresTest
Umherirrender [Sun, 30 Sep 2018 15:14:16 +0000 (17:14 +0200)]
Fix caller name in DatabasePostgresTest

Seeing {closure} in the logs as caller is not helpful
Also add some missing caller name, which avoids Database::query as
caller in the logs
Change-Id: I3cab186cd63b295d1e4d1ca5232bc81925a85eb0

5 years agoFix caller name in DatabaseMysqlBase::getMasterServerInfo/getServerId
Umherirrender [Sun, 30 Sep 2018 15:09:58 +0000 (17:09 +0200)]
Fix caller name in DatabaseMysqlBase::getMasterServerInfo/getServerId

Seeing {closure} in the logs as caller is not helpful

Change-Id: I63adbfcf4944747670a3a30182f6bd5cb6d0e48b

5 years agoFix logged method in MessageCache::replace/loadCachedMessagePageEntry
Umherirrender [Sun, 30 Sep 2018 15:06:53 +0000 (17:06 +0200)]
Fix logged method in MessageCache::replace/loadCachedMessagePageEntry

Seeing {closure} in the logs as caller is not helpful

Change-Id: Iddfb6042bba2a59a9f21f533b748c96478a87b97

5 years agoFix logged method in NameTableStore::getName
Umherirrender [Sun, 30 Sep 2018 15:02:46 +0000 (17:02 +0200)]
Fix logged method in NameTableStore::getName

Seeing {closure} in the logs as caller is not helpful

Change-Id: I6a54ebf87024706b7890c7fe003b5380933fe861

5 years agoFix caller name in PurgeJobUtils::invalidatePages
Umherirrender [Sun, 30 Sep 2018 14:59:56 +0000 (16:59 +0200)]
Fix caller name in PurgeJobUtils::invalidatePages

Seeing {closure} in the logs as caller is not helpful

Change-Id: I252b23e46983b359cbad32323c3a063e7a7afcb5

5 years agoFix caller name in LocalFile::recordUpload2
Umherirrender [Sun, 30 Sep 2018 14:57:54 +0000 (16:57 +0200)]
Fix caller name in LocalFile::recordUpload2

Seeing {closure} in the logs as caller is not helpful

Change-Id: Idbf6ac9606d0f75cae452afffe133c5e3973f334

5 years agoFix caller name in File::getDescriptionText
Umherirrender [Sun, 30 Sep 2018 14:52:06 +0000 (16:52 +0200)]
Fix caller name in File::getDescriptionText

Seeing {closure} in the logs as caller is not helpful

Change-Id: I415e2bb691650bc34adfb750c7a70a5d29176849

5 years agoFix caller name in LocalPasswordPrimaryAuthenticationProvider
Umherirrender [Sun, 30 Sep 2018 14:17:27 +0000 (16:17 +0200)]
Fix caller name in LocalPasswordPrimaryAuthenticationProvider

Seeing {closure} in the logs as caller is not helpful

Change-Id: I8dc921feb13432ed636686f918d8747ae71cf62b

5 years agoFix caller name in ApiStashEdit::parseAndStash
Umherirrender [Sun, 30 Sep 2018 14:01:23 +0000 (16:01 +0200)]
Fix caller name in ApiStashEdit::parseAndStash

Seeing {closure} in the logs as caller is not helpful

Change-Id: Id77253bdd4b65b0673214e7bf6ca3cc26bd155fa

5 years agoFix caller name in SiteStats::numberingroup/pagesInNs
Umherirrender [Sun, 30 Sep 2018 13:41:19 +0000 (15:41 +0200)]
Fix caller name in SiteStats::numberingroup/pagesInNs

Seeing {closure} in the logs as caller is not helpful

Change-Id: I0102cddc447257319fe8db7f8cbd837838653e99

5 years agoFix caller name in PopulateArchiveRevId::checkMysqlAutoIncrementBug
Umherirrender [Sun, 30 Sep 2018 13:30:16 +0000 (15:30 +0200)]
Fix caller name in PopulateArchiveRevId::checkMysqlAutoIncrementBug

Seeing {closure} in the logs as caller is not helpful

Change-Id: Ie9091805bb4d9c05de93aef065cbbfef56c19e70

5 years agoFix caller name in User::addToDatabase
Umherirrender [Sun, 30 Sep 2018 13:22:29 +0000 (15:22 +0200)]
Fix caller name in User::addToDatabase

Seeing {closure} in the logs as caller is not helpful

Change-Id: I876877046ae4bd1756c13e04892c1381904566de

5 years agoFix caller name in WatchedItemStore::updateNotificationTimestamp
Umherirrender [Sun, 30 Sep 2018 13:06:08 +0000 (15:06 +0200)]
Fix caller name in WatchedItemStore::updateNotificationTimestamp

Seeing {closure} in the logs as caller is not helpful

Change-Id: I13a6632523d0e7e96adf3c9af89c71f38d5342f5

5 years agoFix caller name in ClassicInterwikiLookup::load
Umherirrender [Sun, 30 Sep 2018 11:09:46 +0000 (13:09 +0200)]
Fix caller name in ClassicInterwikiLookup::load

Seeing MediaWiki\Interwiki\{closure} in the logs as caller is not
helpful

Change-Id: I39af68a02d40667e428c7f30c88aacab8a02cd86

5 years agoFix [[MediaWiki:Config-install-success/en]] translation issues
Zoranzoki21 [Fri, 28 Sep 2018 22:37:09 +0000 (01:37 +0300)]
Fix [[MediaWiki:Config-install-success/en]] translation issues

The first sentence in this message should not be splited in two lines.
Too, content of page for FAQ, should be displayed on the user's language.

Bug: T205753
Change-Id: I7b75485411f6b6022bdc773521fbad1366dd8643

5 years agoDeprecate class LegacyFormatter
Max Semenik [Sat, 29 Sep 2018 00:50:10 +0000 (17:50 -0700)]
Deprecate class LegacyFormatter

No uses anywhere, was used by the now removed function wfErrorLog().

Change-Id: Ib4561157e776c64ab17f014fbd8603b0934acb2c

5 years agoMerge "skins: Remove 'usemsgcache' and deprecate getDynamicStylesheetQuery"
jenkins-bot [Sat, 29 Sep 2018 02:05:51 +0000 (02:05 +0000)]
Merge "skins: Remove 'usemsgcache' and deprecate getDynamicStylesheetQuery"

5 years agoMerge "Document some understanding of MessageCache in RawAction/EditPage"
jenkins-bot [Sat, 29 Sep 2018 02:02:04 +0000 (02:02 +0000)]
Merge "Document some understanding of MessageCache in RawAction/EditPage"

5 years agoMerge "Drop wfErrorLog, deprecated in 1.25"
jenkins-bot [Sat, 29 Sep 2018 01:56:53 +0000 (01:56 +0000)]
Merge "Drop wfErrorLog, deprecated in 1.25"

5 years agoMerge "user: Remove use of Message:text() from User::isUsableName()"
jenkins-bot [Sat, 29 Sep 2018 01:49:05 +0000 (01:49 +0000)]
Merge "user: Remove use of Message:text() from User::isUsableName()"

5 years agoDrop wfErrorLog, deprecated in 1.25
James D. Forrester [Thu, 13 Sep 2018 19:57:14 +0000 (12:57 -0700)]
Drop wfErrorLog, deprecated in 1.25

Change-Id: I29131f3c677ab5747ac0ae5121669af63a1d5bd8

5 years agoskins: Remove 'usemsgcache' and deprecate getDynamicStylesheetQuery
Timo Tijhof [Thu, 27 Sep 2018 21:23:48 +0000 (22:23 +0100)]
skins: Remove 'usemsgcache' and deprecate getDynamicStylesheetQuery

For several years now, action=raw urls are automatically purged
after edits, and receive the same cache allowance as page views.

The vast majority of action=raw requests come from the
importScript() function in wikibits.js, which only specififes
'title', 'action' and 'ctype'.

The 'usemsgcache' parameter is a relic (pre-2009) for optimising
something we haven't used in a very long time.  Nothing uses the
'usemsgcache' parameter, except for the one edge-case of
third-party wikis loading Filepage.css from Commons on local
file description pages. This commit removes the handling logic,
in favour of letting the normal Revision-logic happen instead,
which is compatible and produces the same response.

Before 2009, this probably made sense as an optimisation because
we didn't have Revision text cache in Memcached yet at that time,
to avoid DB-load from InstantCommons-based file page views.

The way FileRepo was using it needlessly allowed Filepage.css
to return stale responses (given non-canonical query parameters
variations are not purged on-edit). It also caused responses to
be cached longer or shorter than they should be, due to it being
based on the client wiki's configuration, instead of the repo's
configuration (e.g. Wikimedia Commons). By omitting these
'maxage' parameters, the $wgSquidMaxage config of the repo is
used instead, which makes more sense.

Bug: T193271
Change-Id: Ie52195b56b7f8fc17dec0cbedd6d77968e3bc040

5 years agoDocument some understanding of MessageCache in RawAction/EditPage
Timo Tijhof [Thu, 27 Sep 2018 20:34:39 +0000 (21:34 +0100)]
Document some understanding of MessageCache in RawAction/EditPage

Bug: T193271
Change-Id: I8d110dd7b84faf6b1b64553e8088185de5aac7f2

5 years agouser: Remove use of Message:text() from User::isUsableName()
Timo Tijhof [Sat, 29 Sep 2018 01:01:55 +0000 (02:01 +0100)]
user: Remove use of Message:text() from User::isUsableName()

None of the current translations use of "&", "{" or "[", which
presumably means they don't require tranformation. I'd also
very much prefer such dynamic constructs not be added into
this system which would make it rather unpredictable given these
reserved usernames shouldn't change from time to time.

The only match for the below command is qqq.json,

> $ git grep -E '"(double-redirect-fixer|usermessage-editor|\
> proxyblocker|sorbs|spambot.username|autochange-username)"\
> ' | grep -E '[{&[]'

This code was originally introduced with r37928 (5ad5cb4f0a64),
which used wfMsgForContent() and made no explicit mention of
transformation, it just happened to be the default. Later, when
that function was deprecated, it got batch-replaced by
->inContentLanguage()->text().

Bug: T189966
Change-Id: Ia4ddf215e83f15de552f8311b9e737559c72b49a

5 years agoDon't use deprecated function wfArrayFilterByKey()
Max Semenik [Sat, 29 Sep 2018 00:24:13 +0000 (17:24 -0700)]
Don't use deprecated function wfArrayFilterByKey()

Change-Id: Ifdc67f8b9b8617e6398aa0d2b6ff4bec1e7507ce

5 years agordbms: Document a bunch of stuff about query verbs
Timo Tijhof [Fri, 28 Sep 2018 23:42:43 +0000 (00:42 +0100)]
rdbms: Document a bunch of stuff about query verbs

The decision to treat COMMIT/BEGIN as a "read" in isWriteQuery()
for the benefit of ChronologyProtector was first introduced
in r47360 (8653947b, 2009).

* Re-order strings in isTransactableQuery() to match the regular
  expression in isWriteQuery() for quicker mental comparison

* Add missing visibility to DatabaseSqlite->isWriteQuery, matching
  the parent class implementation.

Bug: T201900
Change-Id: Ic90f6455a2e696ba9428ad5835d0f4be6a0d9a5c

5 years agoMerge "exception: Add FIXME about code duplication"
jenkins-bot [Fri, 28 Sep 2018 23:01:11 +0000 (23:01 +0000)]
Merge "exception: Add FIXME about code duplication"

5 years agoReplace deprecated use of $wgUseTidy in Special:ExpandTemplates
C. Scott Ananian [Thu, 27 Sep 2018 17:33:13 +0000 (13:33 -0400)]
Replace deprecated use of $wgUseTidy in Special:ExpandTemplates

This use managed to escape my notice in
I2e7d990da1da378eb6e828d4b3c0f5a41791dd92.  Note that $wgUseTidy
has actually been false in production since
Idf246d05d116f63a73105b50a1929a7721fbe7b9.

Bug: T175706
Change-Id: I684be210c6efde5b5eb4dca163d45b2701df7555

5 years agoexception: Add FIXME about code duplication
Timo Tijhof [Fri, 28 Sep 2018 21:44:36 +0000 (22:44 +0100)]
exception: Add FIXME about code duplication

These methods aren't identical, so consolidation isn't
immediately obvious, and creating dependencies is problematic
in error handling code given there is a lot of pressure on this
code to not by itself cause additional errors.

This means that maybe it's best to keep these inlined without
duplication, but at the very least we then need to remember
to keep these in sync. This duplication has been around for
a while now, but documentation can never come too late...

Change-Id: I60160f61c13c8e115d839acce222f110e30bc2f2

5 years agoMake messages [[MediaWiki:Config-db-web-account-same/qqq]] and [[MediaWiki:Config...
Zoranzoki21 [Fri, 28 Sep 2018 21:11:39 +0000 (00:11 +0300)]
Make messages [[MediaWiki:Config-db-web-account-same/qqq]] and [[MediaWiki:Config-db-web-create]] clearer

Bug: T205745
Bug: T205749
Change-Id: I511385b6bf64bb7326ac04a07592657a96af9bf3

5 years agoOnly strip newline in OrderedStreamingForkController
Erik Bernhardson [Fri, 28 Sep 2018 17:58:00 +0000 (10:58 -0700)]
Only strip newline in OrderedStreamingForkController

The controller should pass through lines of input exactly as
they were provided, only stripping the trailing newline that
delimits items. The trim was making `door` and `door ` equivilant
but for the use case in search the distinction is important.

Additionally check that the line is actually empty, don't throw
away inputs like '0' which are falsy.

Change-Id: Ifac910543fdb46a27da021e831e3e18befefcfc5

5 years agoMerge "Handle empty revision table in populateArchiveRevId.php"
jenkins-bot [Fri, 28 Sep 2018 15:58:05 +0000 (15:58 +0000)]
Merge "Handle empty revision table in populateArchiveRevId.php"