lhc/web/wiklou.git
4 years agoresources: Also add jQuery Migrate to foreign-resources.yaml
James D. Forrester [Mon, 26 Aug 2019 19:41:08 +0000 (12:41 -0700)]
resources: Also add jQuery Migrate to foreign-resources.yaml

Change-Id: I218235fa3da0c64f111c7fe2afffeba6a30b6e21

4 years agoMerge "Use local variabe $services instead of MediaWikiServices::getInstance()"
jenkins-bot [Mon, 26 Aug 2019 19:05:14 +0000 (19:05 +0000)]
Merge "Use local variabe $services instead of MediaWikiServices::getInstance()"

4 years agoMerge "Disambiguate confusing $fromReplica variable in BlockManager"
jenkins-bot [Mon, 26 Aug 2019 18:45:00 +0000 (18:45 +0000)]
Merge "Disambiguate confusing $fromReplica variable in BlockManager"

4 years agoMerge "language: Move ConverterRule to includes/ and add test case"
jenkins-bot [Mon, 26 Aug 2019 15:09:13 +0000 (15:09 +0000)]
Merge "language: Move ConverterRule to includes/ and add test case"

4 years agoUse local variabe $services instead of MediaWikiServices::getInstance()
Fomafix [Mon, 26 Aug 2019 14:08:10 +0000 (16:08 +0200)]
Use local variabe $services instead of MediaWikiServices::getInstance()

Change-Id: Ieb6230231d9b916fd1366e7b473db00c87ac4428

4 years agolanguage: Move ConverterRule to includes/ and add test case
Timo Tijhof [Sun, 25 Aug 2019 17:55:34 +0000 (18:55 +0100)]
language: Move ConverterRule to includes/ and add test case

Add a very basic test that creates an instance, invokes it
with an empty string, and asserts the types and values returned
by the public methods used in LanguageConverter::applyManualConv.

Bug: T225756
Change-Id: I3600260e712f019243ba5f00890011e694444e43

4 years agoPass correct store to rebuildLocalisationCache.php
Aryeh Gregor [Mon, 26 Aug 2019 09:54:19 +0000 (12:54 +0300)]
Pass correct store to rebuildLocalisationCache.php

e4468a1d6b6 completely broke rebuildLocalisationCache.php by
unconditionally passing in LCStoreDB( [] ) instead of constructing the
correct object.

Bug: T231183
Change-Id: I0d52662e8745cf0e10091169b3b08eff48ef2b8f

4 years agoCorrectly register storeDirectory in l10n cache
Aryeh Gregor [Mon, 26 Aug 2019 09:41:56 +0000 (12:41 +0300)]
Correctly register storeDirectory in l10n cache

e4468a1d6b6 made LocalisationCache a service and refactored a bunch of
setup code. In doing so, when processing 'storeDirectory' from
$wgLocalisationCacheConf, it accidentally started treating empty
non-null values (such as the default "false") as storage paths instead
of meaning "fall back to $wgCacheDirectory". This would have broken all
config that used file store for LocalisationCache and did not specify
'storeDirectory'.

Bug: T231183
Change-Id: I9ff16be628996b202599e3bb2feed088af03775f

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 26 Aug 2019 06:32:31 +0000 (08:32 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I85f8b577290b04d60af1fa4f9151a6756a658aa8

4 years agoMerge "title: Fix flaky TitlePermissionTest::testUserBlock"
jenkins-bot [Mon, 26 Aug 2019 04:35:59 +0000 (04:35 +0000)]
Merge "title: Fix flaky TitlePermissionTest::testUserBlock"

4 years agoMerge "resourceloader: Add coverage for internal Context::getReqBase()"
jenkins-bot [Sun, 25 Aug 2019 22:15:02 +0000 (22:15 +0000)]
Merge "resourceloader: Add coverage for internal Context::getReqBase()"

4 years agoMerge "rdbms: refactor caching in LoadBalancer::getReadOnlyReason()"
jenkins-bot [Sun, 25 Aug 2019 22:12:00 +0000 (22:12 +0000)]
Merge "rdbms: refactor caching in LoadBalancer::getReadOnlyReason()"

4 years agordbms: refactor caching in LoadBalancer::getReadOnlyReason()
Aaron Schulz [Tue, 16 Jul 2019 06:06:13 +0000 (23:06 -0700)]
rdbms: refactor caching in LoadBalancer::getReadOnlyReason()

Avoid nesting of the same getWithSetCallback() cache updates.
Also favor accuracy over initial cache use for the case where
there is already a master connection. Add missing "lockTSE"
flag to protect against stampedes updating stale values.

Change serverIsReadOnly() to use SELECT in mysql instead of
SHOW to avoid internal temporary tables.

Bug: T227838
Change-Id: I2b0d680c9c3bdc7aaa1d1e1d6beb2dd203a815f1

4 years agordbms: make IDatabase comments more up-to-date and stylistically consistent
Aaron Schulz [Wed, 7 Aug 2019 21:43:21 +0000 (14:43 -0700)]
rdbms: make IDatabase comments more up-to-date and stylistically consistent

Keep the first comment line of methods short, mention "expected" exceptions,
and break long method signatures into separate lines.

Change-Id: I64b36210f2451d46f8f2412b48dc846b56989e82

4 years agoresourceloader: Add coverage for internal Context::getReqBase()
Timo Tijhof [Sun, 25 Aug 2019 18:01:48 +0000 (19:01 +0100)]
resourceloader: Add coverage for internal Context::getReqBase()

Change-Id: I068000f55f2100a6791470896d7f1050bdcb19a4

4 years agoRemove more Oracle and Mssql leftovers
Daimona Eaytoy [Thu, 15 Aug 2019 12:21:55 +0000 (14:21 +0200)]
Remove more Oracle and Mssql leftovers

Follows-up 4d10bb14e81 and 807d793ab9079.

According to codesearch [0], these were the last usages. Note that this
patch leaves two constants in places, IDatabase::DBO_SYSDBA and
DBO_DDLMODE. These are public constants used "mostly for oracle" according
to the docs, but maybe we could find other use cases in the future (?).

[0] - https://codesearch.wmflabs.org/core/?q=oracle%7Cmssql&i=fosho&files=%5C.%5B%5Ej%5Cd%5D%7Cen%5C.json&repos=

Bug: T230418
Change-Id: Ibfb748b4b23b885a77f4de161af4bf2ab9649a89

4 years agoMerge "Revert "rdbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX""
jenkins-bot [Sun, 25 Aug 2019 17:09:21 +0000 (17:09 +0000)]
Merge "Revert "rdbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX""

4 years agoMerge "objectcache: make MediumSpecificBagOStuff::mergeViaCas() handle negative TTLs"
jenkins-bot [Sun, 25 Aug 2019 16:57:41 +0000 (16:57 +0000)]
Merge "objectcache: make MediumSpecificBagOStuff::mergeViaCas() handle negative TTLs"

4 years agoRevert "rdbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX"
Urbanecm [Sun, 25 Aug 2019 16:30:30 +0000 (16:30 +0000)]
Revert "rdbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX"

This reverts commit 45831e619c5e667ae1201bcdacfb8d4dcce10b41.

Reason for revert: Caused beta not work at all.

Bug: T231162
Change-Id: Icc5c1fa0dc01082a622641ad96c22c939cd56d48

4 years agoMerge "Migrate BagOStuff::incr() calls to incrWithInit()"
jenkins-bot [Sun, 25 Aug 2019 15:11:49 +0000 (15:11 +0000)]
Merge "Migrate BagOStuff::incr() calls to incrWithInit()"

4 years agotitle: Fix flaky TitlePermissionTest::testUserBlock
Timo Tijhof [Sun, 25 Aug 2019 15:04:19 +0000 (16:04 +0100)]
title: Fix flaky TitlePermissionTest::testUserBlock

The mock timestamp is asserted via $prev, which is set a few lines
up.

The input timestamp is set as 0, which usually passes (if these two
lines execute in the same second), but when the two lines of code
are on opposite sides of a clock second boundary, the test would
fail.

Instead of fixing the setTimestamp() call, remove it in favour of
fixing the 'timestamp' option instead, which was needlessly
being set to one thing and then overwritten by setTimestamp.

Bug: T231166
Change-Id: If6a1e4ec7b91efee0a43e6dd86794f15c5a440b3

4 years agoMerge "rdbms: add setTempTablesOnlyMode() to suppress CONN_TRX_AUTOCOMMIT during...
jenkins-bot [Sun, 25 Aug 2019 15:02:48 +0000 (15:02 +0000)]
Merge "rdbms: add setTempTablesOnlyMode() to suppress CONN_TRX_AUTOCOMMIT during tests"

4 years agoMerge "Make the JobRunner flushReplicaSnapshots() call cover the first job"
jenkins-bot [Sun, 25 Aug 2019 14:54:19 +0000 (14:54 +0000)]
Merge "Make the JobRunner flushReplicaSnapshots() call cover the first job"

4 years agoMerge "Make NameTableStore use LoadBalancer::getConnectionRef()"
jenkins-bot [Sun, 25 Aug 2019 14:38:56 +0000 (14:38 +0000)]
Merge "Make NameTableStore use LoadBalancer::getConnectionRef()"

4 years agoMake the JobRunner flushReplicaSnapshots() call cover the first job
Aaron Schulz [Fri, 2 Aug 2019 19:28:18 +0000 (15:28 -0400)]
Make the JobRunner flushReplicaSnapshots() call cover the first job

If JobRunner is called when replica transactions exists, the first job
would previously use the stale REPEATABLE-READ snapshot data.

Also clear any master connection snapshots via commitMasterChanges().
This makes the code more similar to DeferredUpdates::attemptUpdate().

Change-Id: I2157a91fb01ea8c233f964b1f3164e8c3b1a07ca

4 years agoMerge "parsercache: use WRITE_ALLOW_SEGMENTS for cached ParserOutput values"
Krinkle [Sun, 25 Aug 2019 14:06:52 +0000 (14:06 +0000)]
Merge "parsercache: use WRITE_ALLOW_SEGMENTS for cached ParserOutput values"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 25 Aug 2019 07:50:55 +0000 (09:50 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I89aab65db771aaded5fb8a3517cea3545a6efa01

4 years agoMake NameTableStore use LoadBalancer::getConnectionRef()
Aaron Schulz [Sun, 4 Aug 2019 03:38:54 +0000 (23:38 -0400)]
Make NameTableStore use LoadBalancer::getConnectionRef()

This method handles reuseConnection() calls, disallows writes to
DB_REPLICA role handles, is more consistent with wfGetDB(), and
is more efficient with I540b08920997c5.

Change-Id: I8edaef0ea4718414e2004fad04afca8ec5797669

4 years agoMigrate BagOStuff::incr() calls to incrWithInit()
Aaron Schulz [Fri, 9 Aug 2019 22:56:18 +0000 (15:56 -0700)]
Migrate BagOStuff::incr() calls to incrWithInit()

Change-Id: I722d6fe3d50c594858e3e7960fb99ef2fc1664b3

4 years agoparsercache: use WRITE_ALLOW_SEGMENTS for cached ParserOutput values
Aaron Schulz [Tue, 18 Jun 2019 15:35:27 +0000 (16:35 +0100)]
parsercache: use WRITE_ALLOW_SEGMENTS for cached ParserOutput values

This lets large output entries fit into memcached via key segmentation.

Follows b09b3980f99 which applied the feature to PageEditStash.

Bug: T204742
Change-Id: I33a60f5d718cd9033ea12d1d16046d2bede87b5b

4 years agoMerge "rdbms: make LBFactory close/rollback dangling handles like LoadBalancer"
jenkins-bot [Sat, 24 Aug 2019 23:15:36 +0000 (23:15 +0000)]
Merge "rdbms: make LBFactory close/rollback dangling handles like LoadBalancer"

4 years agoobjectcache: make WANObjectCache::relayPurge() actually use $holdoff
Aaron Schulz [Sun, 21 Jul 2019 09:53:53 +0000 (02:53 -0700)]
objectcache: make WANObjectCache::relayPurge() actually use $holdoff

Fixes a regression introduced by 70547f3fa304 in 2016.

Change-Id: I5996b63c31ac3b382e838a6858b8585bdc8c585c

4 years agoMerge "resourceloader: Map group names to integers internally"
jenkins-bot [Sat, 24 Aug 2019 22:40:59 +0000 (22:40 +0000)]
Merge "resourceloader: Map group names to integers internally"

4 years agoMerge "resourceloader: Add tests for mw.loader not storing private/user response"
jenkins-bot [Sat, 24 Aug 2019 22:40:53 +0000 (22:40 +0000)]
Merge "resourceloader: Add tests for mw.loader not storing private/user response"

4 years agoMerge "resourceloader: Add tests for disallowing access to private modules"
jenkins-bot [Sat, 24 Aug 2019 22:20:32 +0000 (22:20 +0000)]
Merge "resourceloader: Add tests for disallowing access to private modules"

4 years agoMerge "objectcache: rename getDB() to getConnection() in SqlBagOStuff"
jenkins-bot [Sat, 24 Aug 2019 20:57:17 +0000 (20:57 +0000)]
Merge "objectcache: rename getDB() to getConnection() in SqlBagOStuff"

4 years agoMerge "rdbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX"
jenkins-bot [Sat, 24 Aug 2019 20:55:48 +0000 (20:55 +0000)]
Merge "rdbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX"

4 years agoMerge "filebackend: update code comments and break some long lines"
jenkins-bot [Sat, 24 Aug 2019 20:45:44 +0000 (20:45 +0000)]
Merge "filebackend: update code comments and break some long lines"

4 years agoMerge "objectcache: improve BagOStuff arithmetic method signatures"
jenkins-bot [Sat, 24 Aug 2019 20:45:19 +0000 (20:45 +0000)]
Merge "objectcache: improve BagOStuff arithmetic method signatures"

4 years agoMerge "maintenance: Cleanup db code and bogus RevisionRecord constants in NamespaceDupes"
jenkins-bot [Sat, 24 Aug 2019 20:39:07 +0000 (20:39 +0000)]
Merge "maintenance: Cleanup db code and bogus RevisionRecord constants in NamespaceDupes"

4 years agoMerge "maintenance: Fix bogus IDatabase method calls in sqlite.php"
jenkins-bot [Sat, 24 Aug 2019 20:34:18 +0000 (20:34 +0000)]
Merge "maintenance: Fix bogus IDatabase method calls in sqlite.php"

4 years agoMerge "maintenance: Fix bad method call in RebuildTextIndex"
jenkins-bot [Sat, 24 Aug 2019 20:30:20 +0000 (20:30 +0000)]
Merge "maintenance: Fix bad method call in RebuildTextIndex"

4 years agoMerge "maintenance: Sanity check that --replicadb isn't using the master in sql.php"
jenkins-bot [Sat, 24 Aug 2019 20:30:14 +0000 (20:30 +0000)]
Merge "maintenance: Sanity check that --replicadb isn't using the master in sql.php"

4 years agoobjectcache: rename getDB() to getConnection() in SqlBagOStuff
Aaron Schulz [Fri, 9 Aug 2019 06:23:05 +0000 (23:23 -0700)]
objectcache: rename getDB() to getConnection() in SqlBagOStuff

Change-Id: I7ec33e2622f5b418712d76bedcbb4be65376cf91

4 years agordbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX
Aaron Schulz [Sun, 14 Jul 2019 22:43:26 +0000 (15:43 -0700)]
rdbms: make LoadBalancer::reallyOpenConnection() handle setting DBO_TRX

Make LoadBalancer::reallyOpenConnection() handle initializing DBO_TRX
instead of Database::__construct().

Also:
* Avoid having the "catch" block appear like it returns a
  half-constructed Database.
* Use the variable name $conn instead of $db to be consistent
  throughout the class. Only send Database::__construct() parameters
  that it recognizes instead of mixing in setLBInfo() data.

Change-Id: Iffc3d1d0713051a164adb51a4c4ee12e4ac887c3

4 years agomaintenance: Cleanup db code and bogus RevisionRecord constants in NamespaceDupes
Aaron Schulz [Wed, 21 Aug 2019 23:54:34 +0000 (16:54 -0700)]
maintenance: Cleanup db code and bogus RevisionRecord constants in NamespaceDupes

Change-Id: Ie31beb183d32663b368a32e4926a3ed55456719c

4 years agomaintenance: Fix bogus IDatabase method calls in sqlite.php
Aaron Schulz [Wed, 21 Aug 2019 23:41:15 +0000 (16:41 -0700)]
maintenance: Fix bogus IDatabase method calls in sqlite.php

Use getConnection() to directly get a DatabaseSqlite instance.

Change-Id: Ic349d14614b6bf145ae2e3ccdac68319fa2bbf9c

4 years agomaintenance: Fix bad method call in RebuildTextIndex
Aaron Schulz [Wed, 21 Aug 2019 23:37:48 +0000 (16:37 -0700)]
maintenance: Fix bad method call in RebuildTextIndex

This method was removed earlier this month with 2eb5bdbac6b7.

SearchSqlite already checks if the proper searchindex tables was created.
Avoid call to bogus IDatabase::checkForEnabledSearch() method.

Also make use of Maintenance::getDB()

Change-Id: If662e17093c1aef71ee9841259ca76e2ac31a7a9

4 years agoobjectcache: improve BagOStuff arithmetic method signatures
Aaron Schulz [Wed, 17 Jul 2019 19:19:05 +0000 (12:19 -0700)]
objectcache: improve BagOStuff arithmetic method signatures

Make the default $init value for incrWithInit() be $value.
This is far less suprising and also makes the operation
easier to replicate without conflicts.

Make decr() definitions more explicit since various cache
drivers do not handle negative incr() values (e.g. memcached).

Change-Id: I2b8d642656cc91c841abbd7a55d97eba101b027a

4 years agomaintenance: Sanity check that --replicadb isn't using the master in sql.php
Aaron Schulz [Thu, 22 Aug 2019 00:35:02 +0000 (17:35 -0700)]
maintenance: Sanity check that --replicadb isn't using the master in sql.php

Change-Id: I0b7fd896c88b06cbc17b31b1ae2b9cb8e375da1b

4 years agoresourceloader: Map group names to integers internally
Amir Sarabadani [Wed, 14 Aug 2019 19:39:01 +0000 (21:39 +0200)]
resourceloader: Map group names to integers internally

This makes startup response smaller.

Change-Id: Id0ae3cd7cd22163f42b92b629c38b0a806d3ca50

4 years agoresourceloader: Add tests for mw.loader not storing private/user response
Timo Tijhof [Sat, 24 Aug 2019 18:58:40 +0000 (19:58 +0100)]
resourceloader: Add tests for mw.loader not storing private/user response

This is in preparation for changing the way group indexes are transmitted
between the server and client, to confirm that the behaviour doesn't break.

Change-Id: I1f84c4c407a4eb69b5b9659d768c643d4a83df0d

4 years agoresourceloader: Add tests for disallowing access to private modules
Timo Tijhof [Sat, 24 Aug 2019 18:45:27 +0000 (19:45 +0100)]
resourceloader: Add tests for disallowing access to private modules

* Add a test to confirm that the ResourceLoader::respond() logic
  works as intended.

* Remove the client code for preventing it from being loaded.
  This can never happen in production unless there is a bug.
  Instead of optimising to avoid a pointless request that only
  happens when the software is broken, instead optimise for when
  the software is not broken by just letting it happen. The server
  already handles it just fine.

  This was originally added in 2015 with 1dd73903726 to reduce
  logspam, but that was instead fixed in 6d6b037e122 by making the
  log message debug-only (because it's not a software problem,
  it's a client-error, e.g. a broken user script or a third
  party trying out different things on the load.php entry point).

  Removing this makes the client a bit smaller, too :)

Change-Id: Ic5420d9329a73514f4fc27baa46ae58d94addafb

4 years agofilebackend: update code comments and break some long lines
Aaron Schulz [Fri, 23 Aug 2019 15:45:54 +0000 (08:45 -0700)]
filebackend: update code comments and break some long lines

Change-Id: I072e15c7c51490888284561260958e405fb061ca

4 years agoMerge "API: Warn about POST without Content-Type"
jenkins-bot [Sat, 24 Aug 2019 08:00:11 +0000 (08:00 +0000)]
Merge "API: Warn about POST without Content-Type"

4 years agoMerge "filebackend: Remove private handleWarning in favour of local closure"
jenkins-bot [Sat, 24 Aug 2019 04:38:09 +0000 (04:38 +0000)]
Merge "filebackend: Remove private handleWarning in favour of local closure"

4 years agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Sat, 24 Aug 2019 02:14:05 +0000 (02:14 +0000)]
Merge "Localisation updates from https://translatewiki.net."

4 years agoMerge "Skin: Add new hook, UndeletePageToolLinks, for Special:Undelete views"
jenkins-bot [Sat, 24 Aug 2019 02:03:13 +0000 (02:03 +0000)]
Merge "Skin: Add new hook, UndeletePageToolLinks, for Special:Undelete views"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 23 Aug 2019 07:07:55 +0000 (09:07 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ifdfe6ec25954eb7c61a85b6494bc0d2a18bae9a7

4 years agoMerge "rdbms: various field name and style cleanups to Database"
jenkins-bot [Fri, 23 Aug 2019 23:18:16 +0000 (23:18 +0000)]
Merge "rdbms: various field name and style cleanups to Database"

4 years agoMerge "Short-circuit WebRequest::getGPCVal() for printable ASCII strings"
jenkins-bot [Fri, 23 Aug 2019 22:31:36 +0000 (22:31 +0000)]
Merge "Short-circuit WebRequest::getGPCVal() for printable ASCII strings"

4 years agoSkin: Add new hook, UndeletePageToolLinks, for Special:Undelete views
Huji Lee [Thu, 22 Aug 2019 23:18:38 +0000 (19:18 -0400)]
Skin: Add new hook, UndeletePageToolLinks, for Special:Undelete views

This allows extensions to add further links; the particular use case
in mind is for the AbuseFilter extension, but others may want this
too.

Bug: T231055
Change-Id: I671a0479e877e6c37606b688064cb9c893717709

4 years agofilebackend: Remove private handleWarning in favour of local closure
Timo Tijhof [Fri, 23 Aug 2019 13:15:33 +0000 (14:15 +0100)]
filebackend: Remove private handleWarning in favour of local closure

This is a pattern from before PHP 5.3, which we no longer need.

Change-Id: I886d1ded25ffe1ee12b6a3f8d48c04aa7dd2ef51

4 years agordbms: various field name and style cleanups to Database
Aaron Schulz [Thu, 22 Aug 2019 00:45:43 +0000 (17:45 -0700)]
rdbms: various field name and style cleanups to Database

Rename Database::hasFlags() to sound less similar to getFlag()/setFlag().
The order of class fields is roughly:
* Objects and resources
* Configuration
* Mutable options that do not have to be kept in sync with the connection
* Session level state tracking (should be in sync with the connection)
* Transaction level state tracking (should be in sync with the connection)
* Results from or timestamp of the last time a certain event occurred

Change-Id: Ibdca2fefe7ed2c792344c5602b5191a950eed933

4 years agoMerge "objectcache: move lag waiting to SqlBagOStuff::doCas() instead of overriding...
jenkins-bot [Fri, 23 Aug 2019 19:19:51 +0000 (19:19 +0000)]
Merge "objectcache: move lag waiting to SqlBagOStuff::doCas() instead of overriding merge()"

4 years agoMerge "objectcache: add BagOStuff::fieldHasFlags() convenience method"
jenkins-bot [Fri, 23 Aug 2019 19:14:59 +0000 (19:14 +0000)]
Merge "objectcache: add BagOStuff::fieldHasFlags() convenience method"

4 years agoMerge "rdbms: remove reference to READ_LATEST in ChronologyProtector::shutdown()"
jenkins-bot [Fri, 23 Aug 2019 18:42:07 +0000 (18:42 +0000)]
Merge "rdbms: remove reference to READ_LATEST in ChronologyProtector::shutdown()"

4 years agoMerge "filebackend: use AtEase in FileBackend related classes"
jenkins-bot [Fri, 23 Aug 2019 18:41:26 +0000 (18:41 +0000)]
Merge "filebackend: use AtEase in FileBackend related classes"

4 years agoMerge "Deprecate skin functions that are not skin responsibilities"
jenkins-bot [Fri, 23 Aug 2019 18:40:25 +0000 (18:40 +0000)]
Merge "Deprecate skin functions that are not skin responsibilities"

4 years agoMerge "objectcache: make more SqlBagOStuff methods private and rename shard variables"
jenkins-bot [Fri, 23 Aug 2019 18:10:24 +0000 (18:10 +0000)]
Merge "objectcache: make more SqlBagOStuff methods private and rename shard variables"

4 years agoShort-circuit WebRequest::getGPCVal() for printable ASCII strings
Aaron Schulz [Wed, 31 Jul 2019 22:48:45 +0000 (18:48 -0400)]
Short-circuit WebRequest::getGPCVal() for printable ASCII strings

This avoids accessing the content Language instance in many cases

Change-Id: I82bd66496180f947c1af16c2728a1548df03dcf9

4 years agoMerge "objectcache: move MemcachedClient class to /utils subdir"
jenkins-bot [Fri, 23 Aug 2019 14:19:58 +0000 (14:19 +0000)]
Merge "objectcache: move MemcachedClient class to /utils subdir"

4 years agofilebackend: use AtEase in FileBackend related classes
Aaron Schulz [Tue, 20 Aug 2019 14:09:16 +0000 (10:09 -0400)]
filebackend: use AtEase in FileBackend related classes

Change-Id: I819e0e923dfd3ffa7299acd1d6103e3cdf2baa93

4 years agoDeprecate skin functions that are not skin responsibilities
Piotr Miazga [Wed, 21 Aug 2019 12:10:09 +0000 (14:10 +0200)]
Deprecate skin functions that are not skin responsibilities

Skin shouldn't be responsible for providing requested revisionId
nor if that revision is the current revision.
The OutputPage object has all required information (both the
currentRevisionID and the current Title object).

Change-Id: I2dbae4c6968a2b3b3cea3e09977e9579609b4cc5

4 years agoDisambiguate confusing $fromReplica variable in BlockManager
Thalia [Fri, 23 Aug 2019 12:29:24 +0000 (13:29 +0100)]
Disambiguate confusing $fromReplica variable in BlockManager

Change-Id: Ifd9bfbc40a52add5e8478c31a55a1c22e9d4693d

4 years agoMerge "Move getRestrictionLevels from NamespaceInfo to PermissionManager."
jenkins-bot [Fri, 23 Aug 2019 11:27:45 +0000 (11:27 +0000)]
Merge "Move getRestrictionLevels from NamespaceInfo to PermissionManager."

4 years agoMerge "Split some Language methods to LanguageNameUtils"
jenkins-bot [Fri, 23 Aug 2019 11:16:28 +0000 (11:16 +0000)]
Merge "Split some Language methods to LanguageNameUtils"

4 years agoMerge "Allow justifications in `Special:EditTags` to use full comment length"
jenkins-bot [Fri, 23 Aug 2019 10:49:02 +0000 (10:49 +0000)]
Merge "Allow justifications in `Special:EditTags` to use full comment length"

4 years agoSplit some Language methods to LanguageNameUtils
Aryeh Gregor [Thu, 2 May 2019 14:23:42 +0000 (17:23 +0300)]
Split some Language methods to LanguageNameUtils

These are static methods that have to do with processing language names
and codes. I didn't include fallback behavior, because that would mean a
circular dependency with LocalisationCache.

In the new class, I renamed AS_AUTONYMS to AUTONYMS, and added a class
constant DEFINED for 'mw' to match the existing SUPPORTED and ALL. I
also renamed fetchLanguageName(s) to getLanguageName(s).

There is 100% test coverage for the code in the new class.

Change-Id: I245ae94bfc1f62b6af75ea57525139adf2539fe6

4 years agoAdd ObjectFactory as a service
Brad Jorsch [Wed, 21 Aug 2019 16:10:30 +0000 (12:10 -0400)]
Add ObjectFactory as a service

ObjectFactory exists to handle lazy instantiation of objects based on
declarative specifications.

One drawback to the current use of static ObjectFactory::getObjectFromSpec()
is that it doesn't have a good way to handle dependency injection. The
best you could do is refer to a static 'factory' function in your
specification, and that function would access the global service
container. But DI would prefer not to have that "global service
container" being accessed.

The solution is to have a non-static ObjectFactory that can supply
the needed services based on the object definition. For example,

 [
     'class' => MyObject::class,
     'services' => [ 'FooFactory', 'BarFactory' ],
 ]

would get the FooFactory and BarFactory from a service container to pass
into MyObject's constructor.

But in order for that to be possible, you need to have an instance of
ObjectFactory that has reference to the service container from which to
fetch the services. And the most DI-correct way to get that is to have
it dependency-injected into your constructor, at which point the
ObjectFactory instance should itself be a service in the DI service
container.

Bug: T222409
Change-Id: I2a56059a9209abce0b22fb93c9f9c6a09a825c56

4 years agordbms: remove reference to READ_LATEST in ChronologyProtector::shutdown()
Aaron Schulz [Fri, 23 Aug 2019 00:58:47 +0000 (17:58 -0700)]
rdbms: remove reference to READ_LATEST in ChronologyProtector::shutdown()

Change-Id: I34b2fa940475d5e5e81130221f61d782818a6d17

4 years agoobjectcache: make more SqlBagOStuff methods private and rename shard variables
Aaron Schulz [Fri, 9 Aug 2019 06:09:45 +0000 (23:09 -0700)]
objectcache: make more SqlBagOStuff methods private and rename shard variables

Also optimize silenceTransactionProfiler() when LoadBalancer is not in use

Change-Id: I83fd5c17058ba082a13e957e4b4590e2d1d5b581

4 years agoPermissionManager::userHas{All,Any}Right: don't specify a variadic param.
Petr Pchelko [Thu, 22 Aug 2019 20:38:09 +0000 (13:38 -0700)]
PermissionManager::userHas{All,Any}Right: don't specify a variadic param.

Change-Id: Ife9d01be57a4926f4a5efa99661163a391564a6e

4 years agoobjectcache: move lag waiting to SqlBagOStuff::doCas() instead of overriding merge()
Aaron Schulz [Thu, 22 Aug 2019 04:10:35 +0000 (21:10 -0700)]
objectcache: move lag waiting to SqlBagOStuff::doCas() instead of overriding merge()

Change-Id: I61b49bc7b00ffa8308d93e76f4bb94cf09ba9936

4 years agoobjectcache: add BagOStuff::fieldHasFlags() convenience method
Aaron Schulz [Thu, 22 Aug 2019 04:23:30 +0000 (21:23 -0700)]
objectcache: add BagOStuff::fieldHasFlags() convenience method

Change-Id: Id2bf4ec0dd0999f988b70a895003c4b1aaae51a2

4 years agoMove getRestrictionLevels from NamespaceInfo to PermissionManager.
Petr Pchelko [Wed, 21 Aug 2019 19:49:59 +0000 (12:49 -0700)]
Move getRestrictionLevels from NamespaceInfo to PermissionManager.

Bug: T11977
Change-Id: I051be9148c98086fdf53a66a74bf7c28699016db

4 years agoAllow justifications in `Special:EditTags` to use full comment length
DannyS712 [Thu, 22 Aug 2019 18:19:23 +0000 (18:19 +0000)]
Allow justifications in `Special:EditTags` to use full comment length

Bug: T188460
Change-Id: Ib3d5207432b741b9382db0d963a42ed4c8a59a79

4 years agoMerge "Deprecate and replace usages of User:isAllowed{All,Any}"
Ppchelko [Thu, 22 Aug 2019 17:31:50 +0000 (17:31 +0000)]
Merge "Deprecate and replace usages of User:isAllowed{All,Any}"

4 years agoMerge "Make LocalisationCache a service"
jenkins-bot [Thu, 22 Aug 2019 16:46:41 +0000 (16:46 +0000)]
Merge "Make LocalisationCache a service"

4 years agoMerge "Some integration tests for LockManagerGroup"
jenkins-bot [Thu, 22 Aug 2019 16:36:47 +0000 (16:36 +0000)]
Merge "Some integration tests for LockManagerGroup"

4 years agoMerge "Update .mailmap for Aryeh Gregor"
jenkins-bot [Thu, 22 Aug 2019 16:31:33 +0000 (16:31 +0000)]
Merge "Update .mailmap for Aryeh Gregor"

4 years agoSome integration tests for LockManagerGroup
Aryeh Gregor [Thu, 22 Aug 2019 11:13:44 +0000 (14:13 +0300)]
Some integration tests for LockManagerGroup

Change-Id: Ide94a260e5f96c4cfcf76c1ee9b8dcf486976263

4 years agoMake LocalisationCache a service
Aryeh Gregor [Wed, 1 May 2019 13:56:41 +0000 (16:56 +0300)]
Make LocalisationCache a service

This removes Language::$dataCache without deprecation, because 1) I
don't know of a way to properly simulate it in the new paradigm, and 2)
I found no direct access to the member outside of the Language and
LanguageTest classes.

Change-Id: Iaa86c48e7434f081a53f5bae8723c37c5a34f503

4 years agoMerge "Remove deprecated User groups/permission static calls."
jenkins-bot [Thu, 22 Aug 2019 10:58:05 +0000 (10:58 +0000)]
Merge "Remove deprecated User groups/permission static calls."

4 years agoUpdate .mailmap for Aryeh Gregor
Aryeh Gregor [Thu, 22 Aug 2019 10:30:35 +0000 (13:30 +0300)]
Update .mailmap for Aryeh Gregor

Whoever made the mailmap for old SVN contributions mapped my account to
the e-mail address I think I used on Bugzilla etc. at the time,
simetrical+mw@gmail.com. (I was inactive then, so I wasn't consulted.)
When I started committing under the git regime, I used ayg@aryeh.name,
so that should be the address used for my old commits as well so that
they link up with my new ones.

Change-Id: If03abd0e8fc11c20e7b37948f7d10f770cd43343

4 years agoMerge "BadFileLookup to replace wfIsBadImage"
jenkins-bot [Thu, 22 Aug 2019 08:16:51 +0000 (08:16 +0000)]
Merge "BadFileLookup to replace wfIsBadImage"

4 years agoMerge "Rewrite integration test for wfIsBadImage()"
jenkins-bot [Thu, 22 Aug 2019 08:16:45 +0000 (08:16 +0000)]
Merge "Rewrite integration test for wfIsBadImage()"

4 years agoMerge "Increase maximum length of automatic deletion summaries"
jenkins-bot [Thu, 22 Aug 2019 08:16:38 +0000 (08:16 +0000)]
Merge "Increase maximum length of automatic deletion summaries"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 22 Aug 2019 07:32:19 +0000 (09:32 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I2858a9ae9b37a430ea70dea57b9fbc56291b64ff

4 years agoRemove deprecated User groups/permission static calls.
Petr Pchelko [Thu, 22 Aug 2019 02:22:26 +0000 (19:22 -0700)]
Remove deprecated User groups/permission static calls.

Bug: T220191
Change-Id: Ifa8afa90c432723b0bba0033a46b6a499c77e6fc