lhc/web/wiklou.git
5 years agoRELEASE-NOTES: Make more consistent and useful for sysadmins
James D. Forrester [Fri, 15 Mar 2019 00:58:24 +0000 (17:58 -0700)]
RELEASE-NOTES: Make more consistent and useful for sysadmins

* Move the "upgrading" bit further up, and put the notes specific
  to upgrading inside it.
* Word all configuration changes to start with the $wg… – rubric
  so they're easy to spot.
* Be explicit when new configuration options are temporary.
* Split user and developer features. Sysadmin features are what
  the "Configuration changes" section is for, so spell that out.

Change-Id: Id12ced8bb764f2c3945c14799d63c17e2711c6f6

5 years agoCode style tweaks
Jack Phoenix [Fri, 15 Mar 2019 23:13:36 +0000 (01:13 +0200)]
Code style tweaks

Change-Id: I2c602ba642e5692e6c56817aac89be9058bf5bdb

5 years agoMerge "User: Remove redundant wgClockSkewFudge code"
jenkins-bot [Sat, 16 Mar 2019 03:03:28 +0000 (03:03 +0000)]
Merge "User: Remove redundant wgClockSkewFudge code"

5 years agoMerge "Remove wgSitesCacheFile and rebuildSitesCache.php (unused)"
jenkins-bot [Sat, 16 Mar 2019 03:01:28 +0000 (03:01 +0000)]
Merge "Remove wgSitesCacheFile and rebuildSitesCache.php (unused)"

5 years agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Fri, 15 Mar 2019 23:17:41 +0000 (23:17 +0000)]
Merge "Localisation updates from https://translatewiki.net."

5 years agoMerge "Make EditPage::getTemplates avoid page table query spam"
jenkins-bot [Fri, 15 Mar 2019 23:11:11 +0000 (23:11 +0000)]
Merge "Make EditPage::getTemplates avoid page table query spam"

5 years agoMerge "rdbms: lower the log channel severity of LoadMonitor::getServerStates"
jenkins-bot [Fri, 15 Mar 2019 22:57:31 +0000 (22:57 +0000)]
Merge "rdbms: lower the log channel severity of LoadMonitor::getServerStates"

5 years agoMerge "Remove empty and unnecessary /* @{{ … */ comments"
jenkins-bot [Fri, 15 Mar 2019 22:03:29 +0000 (22:03 +0000)]
Merge "Remove empty and unnecessary /* @{{ … */ comments"

5 years agoMerge "Fix WatchedItemStore last-seen stashing logic"
jenkins-bot [Fri, 15 Mar 2019 21:46:07 +0000 (21:46 +0000)]
Merge "Fix WatchedItemStore last-seen stashing logic"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 15 Mar 2019 21:05:39 +0000 (22:05 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I910aa8cc077a12f2a7ef00f41087f5c3e08ab0d4

5 years agoUser: Remove redundant wgClockSkewFudge code
Timo Tijhof [Fri, 15 Mar 2019 00:05:52 +0000 (00:05 +0000)]
User: Remove redundant wgClockSkewFudge code

Ensuring the new value is at least as high as 1 second higher
than the current value is sufficient.

The main code paths using this are checkAndSetTouched (for user group
changes) and saveSettings(), both of which use makeUpdateConditions() which
ensures we bail out if something else already wrote to it in the mean time.
As such, there is no longer a need to make sure our time is higher than
something another server may have written, given that is no longer something
we support.

This variable was introduced in 2005 (MW 1.4) with r9403 (1d12276bcb3),
and factored out as newTouchedTimestamp() in 2007 (MW 1.8)
with r16772 (c1094ba9876).

Change-Id: I940fb0dd125286a4a348c11e2c8d197f9288a75d

5 years agoRemove wgSitesCacheFile and rebuildSitesCache.php (unused)
Timo Tijhof [Thu, 14 Mar 2019 19:46:19 +0000 (19:46 +0000)]
Remove wgSitesCacheFile and rebuildSitesCache.php (unused)

This seems to have been intended as optimization for SiteStore,
but was never used as far as I can tell. Instead, SiteStore is
already cached via LocalServerCache (APC).

Keep the FileBasedSiteLookup class for one release cycle in case
third parties not indexed by MediaWiki Codesearch are using it.

== History

* 2013: Report of high memcached usage by Wikibase via SiteStore.
* 2014: Lazy-load the data in Wikibase (d3f2e99cb6).
* 2014: Implement the file-based cache (via T47532 and 90f6efc360fd5).
* 2015: Use local-server cache (APC), per T58602.

The file-based code was never used. The related task marked
invalid (T47532).

Change-Id: I8e2d9edcf3880149f824cc3de37793ca57435b49

5 years agoMerge "deferred: Remove deprecated CdnCacheUpdate::newSimplePurge"
jenkins-bot [Fri, 15 Mar 2019 19:09:57 +0000 (19:09 +0000)]
Merge "deferred: Remove deprecated CdnCacheUpdate::newSimplePurge"

5 years agoSplit out new RefreshSecondaryDataUpdate class
Aaron Schulz [Fri, 12 Oct 2018 20:45:23 +0000 (13:45 -0700)]
Split out new RefreshSecondaryDataUpdate class

Make DerivedPageDataUpdater bundle all the related DataUpdate tasks
on page change with a RefreshSecondaryDataUpdate wrapper. If one of
the DataUpdate tasks fails, then the entire bundle of updates can be
re-run in the form of enqueueing a RefreshLinksJob instance (these
jobs are idempotent). If several of the bundled tasks fail, it is easy
for DeferredUpdates to know that only one RefreshLinksJob should be
enqueued.

The goal is to make DataUpdate tasks more reliable and resilient.
Most of these deferred update failures are due to ephemeral problems
like lock contention. Since the job queue is already able to reliably
store and retry jobs, and the time that a regular web request can spend
in post-send is more limited, it makes the most sense to just enqueue
tasks as jobs if they fail post-send.

Make LinkUpdate no longer defined as enqueueable as RefreshLinksJob
since they are not very congruent (LinksUpdate only does some of the
work that RefreshLinksJob does). Only the wrapper, with the bundle of
DataUpdate instances, is congruent to RefreshLinksJob.

This change does not itself implement the enqueue-on-failure logic
in DeferredUpdates, but is merely a prerequisite.

Bug: T206288
Change-Id: I191103c1aeff4c9fedbf524ee387dad9bdf5fab8

5 years agoRemove empty and unnecessary /* @{{ … */ comments
Thiemo Kreuz [Fri, 15 Mar 2019 13:53:12 +0000 (14:53 +0100)]
Remove empty and unnecessary /* @{{ … */ comments

This was the only comment I could find that uses two curly brackets
for some reason. There are a few more with one curly bracket.

Change-Id: Iaed631916064e6be4895edd4c7a3d7de491e16c2

5 years agoMerge "Add /** @var SplFileInfo $fileInfo */ docs where needed"
jenkins-bot [Fri, 15 Mar 2019 12:39:12 +0000 (12:39 +0000)]
Merge "Add /** @var SplFileInfo $fileInfo */ docs where needed"

5 years agoMerge "Fix ChangeTagsTest failing on Postgres"
jenkins-bot [Fri, 15 Mar 2019 10:53:42 +0000 (10:53 +0000)]
Merge "Fix ChangeTagsTest failing on Postgres"

5 years agoMake EditPage::getTemplates avoid page table query spam
Aaron Schulz [Fri, 15 Mar 2019 09:24:31 +0000 (02:24 -0700)]
Make EditPage::getTemplates avoid page table query spam

This changes TemplatesOnThisPageFormatter to use LinkBatch
and LinkBatch/LinkCache to manage the field.

Change-Id: I523158cdffc599d4d29bab91c98e55085130cee2

5 years agoFix ChangeTagsTest failing on Postgres
Thiemo Kreuz [Fri, 15 Mar 2019 09:10:33 +0000 (10:10 +0100)]
Fix ChangeTagsTest failing on Postgres

The order of elements returned by the SELECT is not guaranteed. But the
assertEquals() can't know this. It does not know how to identify the two
objects, other than by their array index.

Using assertArrayEquals() would fix this. But I honestly don't like this
helper method. It is expensive, for example. So I went for an ORDER BY.

An example for this failure can be seen here:
https://integration.wikimedia.org/ci/job/mediawiki-quibble-vendor-postgres-php70-docker/2484/console

Change-Id: I284d13d21b9bc34270307e78430180d94fc6665e

5 years agordbms: lower the log channel severity of LoadMonitor::getServerStates
Aaron Schulz [Fri, 15 Mar 2019 03:43:13 +0000 (20:43 -0700)]
rdbms: lower the log channel severity of LoadMonitor::getServerStates

Change-Id: If42e3973c3a4ce5baff628befd58d4b7b3a2909b

5 years agoMerge "rdbms: make Database::query() more readable and consistent"
Krinkle [Fri, 15 Mar 2019 01:16:53 +0000 (01:16 +0000)]
Merge "rdbms: make Database::query() more readable and consistent"

5 years agodeferred: Remove deprecated CdnCacheUpdate::newSimplePurge
Timo Tijhof [Fri, 15 Mar 2019 01:16:05 +0000 (01:16 +0000)]
deferred: Remove deprecated CdnCacheUpdate::newSimplePurge

Change-Id: I4ad7429b5253b5f2d38b9380d55acf42e34e21ba

5 years agoMerge "objectcache: make BagOStuff::add() abstract to discourage non-atomic versions"
Krinkle [Fri, 15 Mar 2019 01:00:26 +0000 (01:00 +0000)]
Merge "objectcache: make BagOStuff::add() abstract to discourage non-atomic versions"

5 years agoMerge "objectcache: make the BagOStuff::add() operation more atomic for WinCache"
Krinkle [Fri, 15 Mar 2019 00:56:31 +0000 (00:56 +0000)]
Merge "objectcache: make the BagOStuff::add() operation more atomic for WinCache"

5 years agoMerge "objectcache: make the BagOStuff::add() operation more atomic for APC"
Krinkle [Fri, 15 Mar 2019 00:56:02 +0000 (00:56 +0000)]
Merge "objectcache: make the BagOStuff::add() operation more atomic for APC"

5 years agoMerge "objectcache: add BagOStuff::deleteMulti() method for consistency"
jenkins-bot [Fri, 15 Mar 2019 00:51:19 +0000 (00:51 +0000)]
Merge "objectcache: add BagOStuff::deleteMulti() method for consistency"

5 years agoobjectcache: make BagOStuff::add() abstract to discourage non-atomic versions
Aaron Schulz [Tue, 12 Mar 2019 10:02:24 +0000 (03:02 -0700)]
objectcache: make BagOStuff::add() abstract to discourage non-atomic versions

Change-Id: If3c3fbf21207b0c74cad8a29fa5bbabe0af896e3

5 years agoobjectcache: make the BagOStuff::add() operation more atomic for WinCache
Aaron Schulz [Tue, 12 Mar 2019 10:01:37 +0000 (03:01 -0700)]
objectcache: make the BagOStuff::add() operation more atomic for WinCache

Change-Id: I285ed9a7d0894adfe29b0bdc106b7518f655ba45

5 years agoobjectcache: make the BagOStuff::add() operation more atomic for APC
Aaron Schulz [Tue, 12 Mar 2019 09:49:59 +0000 (02:49 -0700)]
objectcache: make the BagOStuff::add() operation more atomic for APC

Change-Id: Ifb72b1c17439c80e6d431d5fe2ec9ad9437e3ad7

5 years agoMerge "user: Avoid page_touched update in User::saveSettings"
jenkins-bot [Fri, 15 Mar 2019 00:33:22 +0000 (00:33 +0000)]
Merge "user: Avoid page_touched update in User::saveSettings"

5 years agoMerge "Deprecate Profiler::profileIn and Profiler::profileOut stubs"
jenkins-bot [Fri, 15 Mar 2019 00:15:57 +0000 (00:15 +0000)]
Merge "Deprecate Profiler::profileIn and Profiler::profileOut stubs"

5 years agoMerge "filebackend: change "profiler" parameter in FileBackend so it works again"
jenkins-bot [Fri, 15 Mar 2019 00:10:06 +0000 (00:10 +0000)]
Merge "filebackend: change "profiler" parameter in FileBackend so it works again"

5 years agoMerge "rdbms: change "profiler" argument in Database::factory so it works again"
jenkins-bot [Fri, 15 Mar 2019 00:02:35 +0000 (00:02 +0000)]
Merge "rdbms: change "profiler" argument in Database::factory so it works again"

5 years agouser: Avoid page_touched update in User::saveSettings
Aaron Schulz [Thu, 14 Mar 2019 23:46:44 +0000 (16:46 -0700)]
user: Avoid page_touched update in User::saveSettings

This was added in r42179 (65bbc147836aa) and only CDN and object caches
need purging.

Change-Id: I7ca40f8eda15ffeac3aa21aa4445b993d9fcc131

5 years agoobjectcache: add BagOStuff::deleteMulti() method for consistency
Aaron Schulz [Tue, 12 Mar 2019 07:38:56 +0000 (00:38 -0700)]
objectcache: add BagOStuff::deleteMulti() method for consistency

Also:
* Make the BagOStuff tests actually pass for memcached and sql
* Add more unit tests for BagOStuff
* Make SqlBagOStuff::add() more atomic

Change-Id: Ic1eec0990a66b595b57c646498c3bd229442230c

5 years agordbms: make Database::query() more readable and consistent
Aaron Schulz [Thu, 14 Mar 2019 01:56:26 +0000 (18:56 -0700)]
rdbms: make Database::query() more readable and consistent

Mainly:
* Stash trxLevel as the variable $priorTransaction since
  Database::replaceLostConnection might make it 0 when called.
* Factor out Database::beginIfImplied method and call it on
  each query attempt of query(), not just the first one.
* Do not bother setting STATUS_TRX_ERROR if a query fails due to
  connection issues and was recoverable since requiring ROLLBACK
  in order to continue has no real advantage.
* Do not bother setting trxDoneWrites/lastWriteTime for temporary
  table operations.
* Make Database::handleTransactionLoss() keep TransactionProfiler
  cleaner by calling Database::transactionWritingOut().

Also:
* Make sure Database::wasKnownStatementRollbackError() calls are
  right after the corresponding queries so it is easy to follow.
  Having connection attempts in between seems fragile.
* Rename Database::doProfiledQuery => Database::attemptQuery and
  move more logic to that method.
* Factor out Database::assertNeitherReplicaNorReadOnly method.
* Rename Database::assertOpen => Database::assertHasConnectionHandle.
* Fix wording of Database::wasKnownStatementRollbackError comments.
* Use $isEffectiveWrite variable name instead of $isNonTempWrite
  and $isWrite in some places.

Bug: T218226
Change-Id: I2063e4080b41d5fc504f9207a56312ce92130ed7

5 years agoDeprecate Profiler::profileIn and Profiler::profileOut stubs
Aaron Schulz [Wed, 13 Mar 2019 18:18:22 +0000 (11:18 -0700)]
Deprecate Profiler::profileIn and Profiler::profileOut stubs

Change-Id: I2a8764d2464883e9fe66048e97b688c5a76d595a

5 years agofilebackend: change "profiler" parameter in FileBackend so it works again
Aaron Schulz [Wed, 13 Mar 2019 18:14:19 +0000 (11:14 -0700)]
filebackend: change "profiler" parameter in FileBackend so it works again

The Profiler::profileIn and Profiler::profileOut methods are just stubs.
Use a callback to the Profile::scopedProfileIn method instead.

Change-Id: I7b493c145357994f61faebfbe3f65d38d2e6da42

5 years agordbms: change "profiler" argument in Database::factory so it works again
Aaron Schulz [Wed, 13 Mar 2019 18:11:18 +0000 (11:11 -0700)]
rdbms: change "profiler" argument in Database::factory so it works again

The Profiler::profileIn and Profiler::profileOut methods are just stubs.
Use a callback to the Profiler::scopedProfileIn method instead.

Change-Id: I16068bce583bb880250fe91235f2283453be5e4c

5 years agoMerge "Avoid using outdated $casToken field for BagOStuff calls"
jenkins-bot [Thu, 14 Mar 2019 22:14:23 +0000 (22:14 +0000)]
Merge "Avoid using outdated $casToken field for BagOStuff calls"

5 years agoMerge "Avoid sending duplicate ProfilerOutputText comments/html"
jenkins-bot [Thu, 14 Mar 2019 22:14:18 +0000 (22:14 +0000)]
Merge "Avoid sending duplicate ProfilerOutputText comments/html"

5 years agoMerge "rdbms: make query exceptions include the backtrace when logged"
jenkins-bot [Thu, 14 Mar 2019 21:58:58 +0000 (21:58 +0000)]
Merge "rdbms: make query exceptions include the backtrace when logged"

5 years agoMerge "rdbms: clarify $uniqueIndexes argument to replace()/upsert()"
jenkins-bot [Thu, 14 Mar 2019 21:58:53 +0000 (21:58 +0000)]
Merge "rdbms: clarify $uniqueIndexes argument to replace()/upsert()"

5 years agoFix WatchedItemStore last-seen stashing logic
Aaron Schulz [Thu, 14 Mar 2019 19:50:52 +0000 (12:50 -0700)]
Fix WatchedItemStore last-seen stashing logic

This should be the "last revision seen" timestamp, which is
different than the "first revision not seen" timestamp in the DB.

Also make sure that SpecialWatchlist accounts for the stash values.

Relatedly, better document the callback usage in BagOStuff::merge().

Change-Id: I98b03a5cd40fec5b4a2633d499ff77079d264e3c

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 14 Mar 2019 21:37:35 +0000 (22:37 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I2157943a62f159425a99eb7a577658b813681678

5 years agoMerge "Fix assertArrayEquals() calls with bogus 3rd parameter"
jenkins-bot [Thu, 14 Mar 2019 18:58:23 +0000 (18:58 +0000)]
Merge "Fix assertArrayEquals() calls with bogus 3rd parameter"

5 years agoMerge "objectcache: make the $flags argument appear more consistently in BagOStuff"
jenkins-bot [Thu, 14 Mar 2019 18:42:17 +0000 (18:42 +0000)]
Merge "objectcache: make the $flags argument appear more consistently in BagOStuff"

5 years agoMerge "SpecialContributions: Conditionally hide the namespace checkboxes"
jenkins-bot [Thu, 14 Mar 2019 17:39:24 +0000 (17:39 +0000)]
Merge "SpecialContributions: Conditionally hide the namespace checkboxes"

5 years agoMerge "SpecialWatchlist: Conditionally hide the namespace checkboxes"
jenkins-bot [Thu, 14 Mar 2019 17:39:18 +0000 (17:39 +0000)]
Merge "SpecialWatchlist: Conditionally hide the namespace checkboxes"

5 years agoFix assertArrayEquals() calls with bogus 3rd parameter
Thiemo Kreuz [Thu, 14 Mar 2019 13:53:41 +0000 (14:53 +0100)]
Fix assertArrayEquals() calls with bogus 3rd parameter

This issue came up in I8a49143, see
https://integration.wikimedia.org/ci/job/mediawiki-quibble-vendor-postgres-php70-docker/2453/console
The third parameter of assertArrayEquals() is called $ordered and is
meant to take the order of elements into account. Providing a string sets
this to true. The SQL query in ChangesListSpecialPageTest seems to behave
a bit random in Postgres and does not always return the elements in the
same order. This is fine. It's just the assertion that was to strict, by
accident.

I found a few more instances of the same issue with a regular expression.
In most cases I intentionally changed it to assertSame() because the order
of elements is actually guaranteed by the code, and needs to be (e.g.
mixing width and height of an image would be fatal).

Change-Id: Ice66cab873a7271d55809a486ce28cf637e43e33

5 years agoMerge "Throw exception on wrong type in Language::isValidCode( $code )"
jenkins-bot [Thu, 14 Mar 2019 16:09:11 +0000 (16:09 +0000)]
Merge "Throw exception on wrong type in Language::isValidCode( $code )"

5 years agoMerge "Site: Explicit allow setLanguageCode( null )"
jenkins-bot [Thu, 14 Mar 2019 16:09:05 +0000 (16:09 +0000)]
Merge "Site: Explicit allow setLanguageCode( null )"

5 years agoMerge "Make copyTestData work on postgres"
jenkins-bot [Thu, 14 Mar 2019 14:44:11 +0000 (14:44 +0000)]
Merge "Make copyTestData work on postgres"

5 years agoAdd /** @var SplFileInfo $fileInfo */ docs where needed
Thiemo Kreuz [Thu, 14 Mar 2019 14:04:05 +0000 (15:04 +0100)]
Add /** @var SplFileInfo $fileInfo */ docs where needed

Change-Id: Ia844af3347db52f9f004892578ba4aefac7dd875

5 years agoMerge "Add a user preference to opt in or out of a confirmation prompt for rollbacks."
jenkins-bot [Thu, 14 Mar 2019 13:17:47 +0000 (13:17 +0000)]
Merge "Add a user preference to opt in or out of a confirmation prompt for rollbacks."

5 years agoMerge "Add MessagesNqo.php"
jenkins-bot [Thu, 14 Mar 2019 12:41:22 +0000 (12:41 +0000)]
Merge "Add MessagesNqo.php"

5 years agoMerge "Update OOUI to v0.31.0"
jenkins-bot [Thu, 14 Mar 2019 11:07:39 +0000 (11:07 +0000)]
Merge "Update OOUI to v0.31.0"

5 years agoMerge "Language: Use Assert::parameterType for type checks"
jenkins-bot [Thu, 14 Mar 2019 10:07:38 +0000 (10:07 +0000)]
Merge "Language: Use Assert::parameterType for type checks"

5 years agoAdd MessagesNqo.php
Amir Aharoni [Mon, 4 Mar 2019 12:52:08 +0000 (14:52 +0200)]
Add MessagesNqo.php

The export from translatewiki was not done yet,
but there is good localization activity,
and having this file will allow correct RTL layout.

Bug: T152908
Change-Id: I8cfc718af5e96ce9d902d1bf5400a3bb2971acde

5 years agoMerge "Avoid page table query spam in HistoryPager due to lastLink()"
MaxSem [Thu, 14 Mar 2019 05:41:52 +0000 (05:41 +0000)]
Merge "Avoid page table query spam in HistoryPager due to lastLink()"

5 years agoUpdate OOUI to v0.31.0
James D. Forrester [Thu, 14 Mar 2019 01:03:02 +0000 (18:03 -0700)]
Update OOUI to v0.31.0

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

Bug: T215645
Bug: T217471
Bug: T217584
Bug: T217952
Bug: T218271
Depends-On: Icc14a3662039080f1a65d098004640366351f0bb
Change-Id: Icc14a3662039080f1a65d098004640366351f0ba

5 years agoMerge "Remove references to Html5Depurate"
jenkins-bot [Wed, 13 Mar 2019 23:31:02 +0000 (23:31 +0000)]
Merge "Remove references to Html5Depurate"

5 years agoMerge "Avoid a few overly complicated is_null() checks"
jenkins-bot [Wed, 13 Mar 2019 22:23:50 +0000 (22:23 +0000)]
Merge "Avoid a few overly complicated is_null() checks"

5 years agoRemove references to Html5Depurate
Subramanya Sastry [Wed, 13 Mar 2019 21:33:37 +0000 (16:33 -0500)]
Remove references to Html5Depurate

Change-Id: I4f07c5ae606f5c86242bb7d299f4f30a044860b4

5 years agoMake copyTestData work on postgres
daniel [Mon, 4 Mar 2019 22:01:38 +0000 (23:01 +0100)]
Make copyTestData work on postgres

The issue with SQLite mentioned in the ticket remains unresolved
for now. To make this less confusing, copyTestData() will throw
for sqlite with an explanation instead of failing later. The test
for copyTestData is skipped on sqlite as well.

Bug: T217607
Change-Id: Ib9baa15cb6feff6c06959359f846b94ae6efab07

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 13 Mar 2019 20:58:23 +0000 (21:58 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I0b3266b3300731491affb838bb287496fe942d3a

5 years agordbms: make query exceptions include the backtrace when logged
Aaron Schulz [Wed, 13 Mar 2019 16:12:47 +0000 (09:12 -0700)]
rdbms: make query exceptions include the backtrace when logged

Previously, the corresponding Exception channel entry was relied on for
the backtrace, though there might not always be one.

Change-Id: I4a3b0fec0beaec1ebfe71be3850aa353cd37d562

5 years agoAvoid page table query spam in HistoryPager due to lastLink()
Aaron Schulz [Wed, 13 Mar 2019 18:31:58 +0000 (11:31 -0700)]
Avoid page table query spam in HistoryPager due to lastLink()

Pass in the Title so there is not an extra query for each revision.

Change-Id: I0d36422a304c31c4bda0a408ef4a6fcd52ad57f1

5 years agoMerge "resourceloader: Remove redundant var-freeing in addScript()"
jenkins-bot [Wed, 13 Mar 2019 18:11:21 +0000 (18:11 +0000)]
Merge "resourceloader: Remove redundant var-freeing in addScript()"

5 years agoMerge "resourceloader: Reduce size of ES5 StringSet fallback"
jenkins-bot [Wed, 13 Mar 2019 17:59:14 +0000 (17:59 +0000)]
Merge "resourceloader: Reduce size of ES5 StringSet fallback"

5 years agoMerge "resourceloader: Minor optimisation in variable declarations"
jenkins-bot [Wed, 13 Mar 2019 17:59:08 +0000 (17:59 +0000)]
Merge "resourceloader: Minor optimisation in variable declarations"

5 years agoAvoid sending duplicate ProfilerOutputText comments/html
Aaron Schulz [Wed, 13 Mar 2019 17:27:38 +0000 (10:27 -0700)]
Avoid sending duplicate ProfilerOutputText comments/html

Change-Id: I4130845cdb7208b8456740e5dbaf8bf96e175f49

5 years agoparser: closeParagraph already resets the lastSection
Arlo Breault [Wed, 6 Mar 2019 21:49:07 +0000 (16:49 -0500)]
parser: closeParagraph already resets the lastSection

Change-Id: Ic24c9aa25852cc786a5ca438c2c1e9031f9e7c17

5 years agordbms: clarify $uniqueIndexes argument to replace()/upsert()
Aaron Schulz [Wed, 13 Mar 2019 03:09:21 +0000 (20:09 -0700)]
rdbms: clarify $uniqueIndexes argument to replace()/upsert()

Also make upsert() match replace() for consistency.

Change-Id: I208f3ab810a61c6949ac0050436767675f99a60b

5 years agoMerge "Replace sorting classes with better naming convention"
jenkins-bot [Wed, 13 Mar 2019 00:27:11 +0000 (00:27 +0000)]
Merge "Replace sorting classes with better naming convention"

5 years agoobjectcache: make the $flags argument appear more consistently in BagOStuff
Aaron Schulz [Tue, 12 Mar 2019 07:30:34 +0000 (00:30 -0700)]
objectcache: make the $flags argument appear more consistently in BagOStuff

Change-Id: I08879ede5e9f0ab227497bb1dab89ea61b65abce

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 12 Mar 2019 21:09:11 +0000 (22:09 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I2887536cb78f5b4780550b67a2fde8aaf7530a97

5 years agoMerge "LogEntry: Restore logic to add change tags on udp-only publish"
jenkins-bot [Tue, 12 Mar 2019 17:55:18 +0000 (17:55 +0000)]
Merge "LogEntry: Restore logic to add change tags on udp-only publish"

5 years agoMerge "ApiMain.php api/request logging event changes"
Ottomata [Tue, 12 Mar 2019 17:23:12 +0000 (17:23 +0000)]
Merge "ApiMain.php api/request logging event changes"

5 years agoMerge "Add password policy setting `suggestChangeOnLogin`"
jenkins-bot [Tue, 12 Mar 2019 16:35:00 +0000 (16:35 +0000)]
Merge "Add password policy setting `suggestChangeOnLogin`"

5 years agoApiMain.php api/request logging event changes
Andrew Otto [Fri, 8 Mar 2019 21:50:34 +0000 (16:50 -0500)]
ApiMain.php api/request logging event changes

- Use 'Z' UTC timezone on dt
- Don't provide empty arrays if no data entries
- No need to set X-Request-Id in http.request_headers, it is meta.request_id

Bug: T214080
Bug: T212529
Change-Id: I37aa41a46ce74b372070e88a2f4da746fcbe2449

5 years agoThrow exception on wrong type in Language::isValidCode( $code )
Fomafix [Wed, 27 Jun 2018 10:16:26 +0000 (12:16 +0200)]
Throw exception on wrong type in Language::isValidCode( $code )

This prevents that Language::isValidCode( null ) returns true.

Depends-On: I38d8358469903afb15331212206635283cedcd46
Change-Id: I5dc5bd45d648a548dfd27aaa1b3c29a2e99f0e8b

5 years agoLogEntry: Restore logic to add change tags on udp-only publish
Brad Jorsch [Tue, 12 Mar 2019 14:55:27 +0000 (10:55 -0400)]
LogEntry: Restore logic to add change tags on udp-only publish

This was unintentionally removed in I8df2fd98.

Bug: T218110
Change-Id: Ie8678b4207032d6eb877d596eb8f115798c80a1e

5 years agoSite: Explicit allow setLanguageCode( null )
Fomafix [Tue, 26 Jun 2018 07:30:39 +0000 (09:30 +0200)]
Site: Explicit allow setLanguageCode( null )

$site->setLanguageCode( null ) is already used in
DBSiteStore::loadSites and this worked because
Language::isValidCode( null ) === true.

This change explicit check for null and allow to set null without
depending on Language::isValidCode( null ) === true.

Change-Id: I0c9fe03cbf1434b0340e61e96360c0aaeb0fe89d

5 years agoLanguage: Use Assert::parameterType for type checks
Fomafix [Tue, 12 Mar 2019 08:53:49 +0000 (09:53 +0100)]
Language: Use Assert::parameterType for type checks

Depends-On: Ib0cb388958cf720052ca6df73d5145b7ab3f9529
Change-Id: I8287118cf8ec01326ead9c90a38f7b4134c3eba9

5 years agoMerge "Remove deprecated ParserOutput::legacyOptions"
jenkins-bot [Tue, 12 Mar 2019 08:35:09 +0000 (08:35 +0000)]
Merge "Remove deprecated ParserOutput::legacyOptions"

5 years agoMerge "Improve documentation of the PageContentLanguage hook"
jenkins-bot [Tue, 12 Mar 2019 07:33:57 +0000 (07:33 +0000)]
Merge "Improve documentation of the PageContentLanguage hook"

5 years agoReplace sorting classes with better naming convention
Volker E [Sat, 19 Jan 2019 02:24:21 +0000 (18:24 -0800)]
Replace sorting classes with better naming convention

Improving CSS structure by removing code duplications.

Bug: T214218
Change-Id: I0501e1ab934aef3af289fee618b99578a1f0285c

5 years agoImprove documentation of the PageContentLanguage hook
Niklas Laxström [Wed, 6 Mar 2019 12:23:06 +0000 (13:23 +0100)]
Improve documentation of the PageContentLanguage hook

Clarify that the type of second parameter that is being passed
to the hooks can be anything because one hook can change it and
then it is passed to another hook without the hook caller having
possibility to check or modify the value.

Clarify that hooks should only return Language objects.

Rename $wgLang to $userLang in the hook parameter documentation to
avoid false posivite matches for the global.

Fix some typos, use Title::inNamespace and add a test assertion.

Also, the $content parameter is unused by all implementations of
this method, and on quick look never passed by any caller. I kept
it for now, however.

Bug: T214358
Change-Id: Iae49d2998c2b762565d232c0337d84d43a4a900c

5 years agoAvoid using outdated $casToken field for BagOStuff calls
Aaron Schulz [Tue, 12 Mar 2019 06:39:29 +0000 (23:39 -0700)]
Avoid using outdated $casToken field for BagOStuff calls

Change-Id: Ic9bcb388e4f50e2ae16ae57aa16113e79b43350b

5 years agoRemove deprecated ParserOutput::legacyOptions
Aaron Schulz [Fri, 8 Mar 2019 22:31:01 +0000 (14:31 -0800)]
Remove deprecated ParserOutput::legacyOptions

Change-Id: I5f32dd741f3ee795ec599aacb687d5cee2c52835

5 years agoMerge "jobqueue: allow direct server configuration arrays to JobQueueDB"
jenkins-bot [Tue, 12 Mar 2019 04:25:50 +0000 (04:25 +0000)]
Merge "jobqueue: allow direct server configuration arrays to JobQueueDB"

5 years agoMerge "Add sanity check to notifyUpdatesForRevision() for $oldRev"
jenkins-bot [Tue, 12 Mar 2019 04:22:19 +0000 (04:22 +0000)]
Merge "Add sanity check to notifyUpdatesForRevision() for $oldRev"

5 years agoMerge "resourceloader: Reword and expand doc comment about FileModule "packageFiles""
jenkins-bot [Tue, 12 Mar 2019 04:20:02 +0000 (04:20 +0000)]
Merge "resourceloader: Reword and expand doc comment about FileModule "packageFiles""

5 years agoresourceloader: Reword and expand doc comment about FileModule "packageFiles"
Aaron Schulz [Sun, 10 Mar 2019 19:56:34 +0000 (12:56 -0700)]
resourceloader: Reword and expand doc comment about FileModule "packageFiles"

Change-Id: Id9d68205504ecbddea6ca248e108f368fdcac2d2

5 years agoMerge "logging: Start using LinkTarget & UserIdentity in ManualLogEntry"
jenkins-bot [Tue, 12 Mar 2019 02:14:39 +0000 (02:14 +0000)]
Merge "logging: Start using LinkTarget & UserIdentity in ManualLogEntry"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 11 Mar 2019 20:55:59 +0000 (21:55 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I7ee423c084fbe33d4731e43ce5506f6a6f0c40be

5 years agoMerge "Fix the order of the parameters for htmlform-title-badnamespace"
jenkins-bot [Mon, 11 Mar 2019 20:28:07 +0000 (20:28 +0000)]
Merge "Fix the order of the parameters for htmlform-title-badnamespace"

5 years agoMerge "Bump minimum SQLite version to 3.8.0"
jenkins-bot [Mon, 11 Mar 2019 20:27:59 +0000 (20:27 +0000)]
Merge "Bump minimum SQLite version to 3.8.0"

5 years agoMerge "Fix small typos"
jenkins-bot [Mon, 11 Mar 2019 18:34:01 +0000 (18:34 +0000)]
Merge "Fix small typos"