lhc/web/wiklou.git
4 years agoExclude redirects from Special:Fewestrevisions
DannyS712 [Tue, 9 Jul 2019 14:16:56 +0000 (14:16 +0000)]
Exclude redirects from Special:Fewestrevisions

Bug: T11736
Change-Id: I9ad602b4597207562f398fe5e05307fa5f3c2fad

4 years agoMerge "installer: Avoid <doclink/> hack for 'config-sidebar' rendering"
jenkins-bot [Mon, 8 Jul 2019 23:53:10 +0000 (23:53 +0000)]
Merge "installer: Avoid <doclink/> hack for 'config-sidebar' rendering"

4 years agoMerge "installer: Convert <downloadlink/> hack to raw message param"
jenkins-bot [Mon, 8 Jul 2019 23:51:45 +0000 (23:51 +0000)]
Merge "installer: Convert <downloadlink/> hack to raw message param"

4 years agoMerge "installer: Call getInfoBox() with raw wikitext, not transformed text"
jenkins-bot [Mon, 8 Jul 2019 23:51:38 +0000 (23:51 +0000)]
Merge "installer: Call getInfoBox() with raw wikitext, not transformed text"

4 years agoMerge "installer: Fix Html::infoBox param docs and mark as internal"
jenkins-bot [Mon, 8 Jul 2019 23:49:14 +0000 (23:49 +0000)]
Merge "installer: Fix Html::infoBox param docs and mark as internal"

4 years agoMerge "build: Remove reference of non-existent "Fuzz" and "Stub" PHPUnit groups"
jenkins-bot [Mon, 8 Jul 2019 23:47:49 +0000 (23:47 +0000)]
Merge "build: Remove reference of non-existent "Fuzz" and "Stub" PHPUnit groups"

4 years agoMerge "build: Remove redundant 'vendor/bin' prefix from composer commands"
jenkins-bot [Mon, 8 Jul 2019 23:44:40 +0000 (23:44 +0000)]
Merge "build: Remove redundant 'vendor/bin' prefix from composer commands"

4 years agoMerge "mediawiki.util: Simplify test-only setOptions methods"
jenkins-bot [Mon, 8 Jul 2019 23:21:26 +0000 (23:21 +0000)]
Merge "mediawiki.util: Simplify test-only setOptions methods"

4 years agoMerge "lockmanager: tweak FSLockManager permission handling in doSingleLock()"
jenkins-bot [Mon, 8 Jul 2019 23:07:09 +0000 (23:07 +0000)]
Merge "lockmanager: tweak FSLockManager permission handling in doSingleLock()"

4 years agoMerge "objectcache: tweak SqlBagOStuff purging to happen on write only"
jenkins-bot [Mon, 8 Jul 2019 23:07:02 +0000 (23:07 +0000)]
Merge "objectcache: tweak SqlBagOStuff purging to happen on write only"

4 years agoMerge "objectcache: add IStoreKeyEncoder interface for key generation helper methods"
jenkins-bot [Mon, 8 Jul 2019 22:48:55 +0000 (22:48 +0000)]
Merge "objectcache: add IStoreKeyEncoder interface for key generation helper methods"

4 years agoMerge "Fix IDEA warnings in Xhprof class"
jenkins-bot [Mon, 8 Jul 2019 22:44:41 +0000 (22:44 +0000)]
Merge "Fix IDEA warnings in Xhprof class"

4 years agoobjectcache: add IStoreKeyEncoder interface for key generation helper methods
Aaron Schulz [Mon, 8 Jul 2019 19:12:16 +0000 (12:12 -0700)]
objectcache: add IStoreKeyEncoder interface for key generation helper methods

If a key is stored in both BagOStuff and WANObjectCache, it useful to have
one common method for generating the cache and storage keys.

Change-Id: I8b77651746a55e8a98a79db298226e334d15a494

4 years agoFix IDEA warnings in Xhprof class
Aaron Schulz [Mon, 8 Jul 2019 21:54:27 +0000 (14:54 -0700)]
Fix IDEA warnings in Xhprof class

Change-Id: Ie4bb1792e45380240f2507e3aca25dc94b78f57e

4 years agoMerge "Remove `@author Timo Tijhof` from various file headers"
jenkins-bot [Mon, 8 Jul 2019 22:10:41 +0000 (22:10 +0000)]
Merge "Remove `@author Timo Tijhof` from various file headers"

4 years agoMerge "entrypoint: Avoid random Doxygen block from api.php and opensearch_desc.php"
jenkins-bot [Mon, 8 Jul 2019 22:07:28 +0000 (22:07 +0000)]
Merge "entrypoint: Avoid random Doxygen block from api.php and opensearch_desc.php"

4 years agobuild: Remove reference of non-existent "Fuzz" and "Stub" PHPUnit groups
Timo Tijhof [Mon, 8 Jul 2019 22:03:13 +0000 (23:03 +0100)]
build: Remove reference of non-existent "Fuzz" and "Stub" PHPUnit groups

These were removed from the phpunit.xml file recently (after having
been unused for many years), but between the revert and resplit
of the recent MediaWikiTestCase refactor, that change was lost
and the group exclusion re-introduced.

This removes it again, following 214750d8d224fc7.

Change-Id: I9448854e5f1587b1083e78f61ef8b520722ad2b9

4 years agobuild: Remove redundant 'vendor/bin' prefix from composer commands
Timo Tijhof [Mon, 8 Jul 2019 21:59:19 +0000 (22:59 +0100)]
build: Remove redundant 'vendor/bin' prefix from composer commands

Follows 214750d8d224. This isn't needed because they run with
that directory already in their PATH.

Change-Id: I855bbe53c2b5c87afa425b7b6d3ec920c452cc99

4 years agoRemove `@author Timo Tijhof` from various file headers
Timo Tijhof [Mon, 8 Jul 2019 21:31:25 +0000 (22:31 +0100)]
Remove `@author Timo Tijhof` from various file headers

Also remove a few redundant file-level descriptions in favour
of their class entity describing the same already.

Change-Id: I1a43fc402b5bd106931062a399952ba1e48beb48

4 years agomediawiki.util: Simplify test-only setOptions methods
Timo Tijhof [Mon, 8 Jul 2019 21:54:53 +0000 (22:54 +0100)]
mediawiki.util: Simplify test-only setOptions methods

Follows-up 1c7c9bdf1f.

* Define the method only in test context, instead of
  a run-time check.

* Return the old value, and re-use function for restoring
  the result afterwards.

* Make the test define its options by default, so at to not
  rely on local-wiki defaults in any way.

Change-Id: I71e92d5b9ee789b594e6e64ca3e425583fc1ee1c

4 years agoresourceloader: Remove 'user.groups' module alias
Timo Tijhof [Mon, 8 Jul 2019 21:20:28 +0000 (22:20 +0100)]
resourceloader: Remove 'user.groups' module alias

Deprecated since MediaWiki 1.28. Follows 06ab9c0942f66.

Change-Id: Iedaa61d82b72ccf852975057d3d88f2bf7ddead6

4 years agoentrypoint: Avoid random Doxygen block from api.php and opensearch_desc.php
Timo Tijhof [Mon, 8 Jul 2019 20:24:45 +0000 (21:24 +0100)]
entrypoint: Avoid random Doxygen block from api.php and opensearch_desc.php

These two entry points have themselves partly indexed by Doxygen
in a very strange way where these two comments cause part of an
if-statement to be seen as the name of a local variable.
Probably due to some kind of bad interaction with the
maintenance/mwdoc-filter.php filter applied to the file before
it gets indexed.

Fix it for now by avoiding use of /** blocks for something that
isn't a class, function, class member or documented global var.

Change-Id: I4903069e704c3283e6ec7a39999a489d0117cc71

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

Change-Id: I608a6689cf784c6826bd45e9836d3ed00a2f1602

4 years agoMerge "rdbms: normalize Database/LBFactory logging and add snapshot flushing warnings"
jenkins-bot [Mon, 8 Jul 2019 18:53:38 +0000 (18:53 +0000)]
Merge "rdbms: normalize Database/LBFactory logging and add snapshot flushing warnings"

4 years agoMake MSCompoundFileReader::readFile platform-agnostic
Máté Szabó [Mon, 8 Jul 2019 16:05:22 +0000 (18:05 +0200)]
Make MSCompoundFileReader::readFile platform-agnostic

MSCompoundFileReader::readFile uses iconv to convert information
given in UTF-16 character set with little-endian byte order to
the UTF-8 character set. The input string has no BOM and the byte order
is not explicitly given, causing iconv to try to guess the byte order
based on the host operating system. This causes the method to return
different results for the same file in different environments.

This patch explicitly provides the byte order for the input to be
converted (UTF-16LE) to ensure portability and predictability.

As part of this, move MSCompoundFileReaderTest into the unit test tree.

Bug: T225019
Change-Id: I62154897d303b28c288c3a4f2f5456bedcc81852

4 years agoMerge "Selenium: replace UserLoginPage with BlankPage where possible"
jenkins-bot [Mon, 8 Jul 2019 17:00:13 +0000 (17:00 +0000)]
Merge "Selenium: replace UserLoginPage with BlankPage where possible"

4 years agoMerge "build: use the latest webdriverio 4.x related packages"
jenkins-bot [Mon, 8 Jul 2019 15:59:18 +0000 (15:59 +0000)]
Merge "build: use the latest webdriverio 4.x related packages"

4 years agoMerge "Improve specialmute-email-footer description"
jenkins-bot [Mon, 8 Jul 2019 15:50:44 +0000 (15:50 +0000)]
Merge "Improve specialmute-email-footer description"

4 years agobuild: use the latest webdriverio 4.x related packages
Željko Filipin [Mon, 8 Jul 2019 13:29:06 +0000 (15:29 +0200)]
build: use the latest webdriverio 4.x related packages

Updating packages removes dependency on cryptiles. We were using
version 3.1.4 that had a vulnerability.

Bug: T226586
Change-Id: Idccc7f418ed6fce7452a6f0d403477953448a541

4 years agoImprove specialmute-email-footer description
Dayllan Maza [Mon, 8 Jul 2019 14:25:11 +0000 (10:25 -0400)]
Improve specialmute-email-footer description

Change-Id: I058d3477b0707e2fbf09a94517a6005e0694dbae

4 years agoSelenium: replace UserLoginPage with BlankPage where possible
Željko Filipin [Fri, 10 May 2019 15:56:42 +0000 (17:56 +0200)]
Selenium: replace UserLoginPage with BlankPage where possible

When using local storage, any page has to be open. UserLoginPage is usually used.
BlankPage should be slightly faster to load. It also makes it more clear than
any page would do the job.

Change-Id: I50b23993065ad6b093a6cc951d00b0bf7a3d5e68

4 years agoMerge "Move unit tests FormatJsonTest.php to a dedicated file in unit tests"
jenkins-bot [Mon, 8 Jul 2019 12:49:17 +0000 (12:49 +0000)]
Merge "Move unit tests FormatJsonTest.php to a dedicated file in unit tests"

4 years agoMerge "Split SanitizerTest to unit and integration tests"
jenkins-bot [Mon, 8 Jul 2019 12:40:50 +0000 (12:40 +0000)]
Merge "Split SanitizerTest to unit and integration tests"

4 years agoSplit SanitizerTest to unit and integration tests
Amir Sarabadani [Mon, 8 Jul 2019 00:05:57 +0000 (02:05 +0200)]
Split SanitizerTest to unit and integration tests

Out of 150 tests of SanitizerTest.php, 100 of them are pure unit tests
they are moved to the new file in the new structure, the rest stay

Change-Id: I366d37607abff4bcd624a56fb8b2299729fbc088

4 years agoMerge "Reorganize testsuites"
jenkins-bot [Mon, 8 Jul 2019 07:47:41 +0000 (07:47 +0000)]
Merge "Reorganize testsuites"

4 years agoMerge "Change the autonym of Minangkabau from "Baso Minangkabau" to "Minangkabau""
jenkins-bot [Mon, 8 Jul 2019 06:31:42 +0000 (06:31 +0000)]
Merge "Change the autonym of Minangkabau from "Baso Minangkabau" to "Minangkabau""

4 years agoMerge "Tell users how they can force a maintenance script to run again."
jenkins-bot [Mon, 8 Jul 2019 05:44:07 +0000 (05:44 +0000)]
Merge "Tell users how they can force a maintenance script to run again."

4 years agoChange the autonym of Minangkabau from "Baso Minangkabau" to "Minangkabau"
Mahuton [Mon, 8 Jul 2019 05:04:17 +0000 (07:04 +0200)]
Change the autonym of Minangkabau from "Baso Minangkabau" to "Minangkabau"

Change requested on the Minangkabau Wikipedia village pump

Bug: T224806
Change-Id: I40ddc71f4f6ab73b6d4c4f19ec57bc9c9e221b14

4 years agoMove unit tests FormatJsonTest.php to a dedicated file in unit tests
Amir Sarabadani [Sun, 7 Jul 2019 22:23:30 +0000 (00:23 +0200)]
Move unit tests FormatJsonTest.php to a dedicated file in unit tests

Out of 140 tests of this file, 131 one of them are pure unit test
Let's keep the 9 in the original file and move the rest

Bug: T87781
Change-Id: I86dfe17f794c615048b3c20487b0e84d38d13b93

4 years agoReorganize testsuites
Kosta Harlan [Fri, 5 Jul 2019 15:33:08 +0000 (11:33 -0400)]
Reorganize testsuites

The idea is that `vendor/bin/phpunit` could run all of the tests contained in
core + extensions + skins with no overlap, but that we can also provide
granularity for CI which wants to run some testsuites (e.g. core:unit and
core:integration) before extensions/skins, as well as running unit before
integration tests.

Bug: T87781
Change-Id: I2fb57f4a9a58ec7a4042d9cc1821cc484661a6b9

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

Change-Id: I3f6364eed16e0f0479410147d289b4197c563643

4 years agordbms: normalize Database/LBFactory logging and add snapshot flushing warnings
Aaron Schulz [Sat, 29 Jun 2019 03:21:28 +0000 (20:21 -0700)]
rdbms: normalize Database/LBFactory logging and add snapshot flushing warnings

Make flushSnapshot() logging more detailed and check for explicit transaction
rounds. Also removing periods and trailing newlines from log/exception messages.

Change-Id: I0f6520f563680ab3a65b6338ced59ba25a2ec7b5

4 years agolockmanager: tweak FSLockManager permission handling in doSingleLock()
Aaron Schulz [Wed, 3 Jul 2019 10:38:48 +0000 (03:38 -0700)]
lockmanager: tweak FSLockManager permission handling in doSingleLock()

Change-Id: Ia0070cc727ca622e127456ddb0e39d007e19f169

4 years agoMerge "Don't process "all" option in Html::namespaceSelectorOptions"
jenkins-bot [Sat, 6 Jul 2019 15:17:54 +0000 (15:17 +0000)]
Merge "Don't process "all" option in Html::namespaceSelectorOptions"

4 years agoobjectcache: tweak SqlBagOStuff purging to happen on write only
Aaron Schulz [Sat, 6 Jul 2019 07:02:13 +0000 (00:02 -0700)]
objectcache: tweak SqlBagOStuff purging to happen on write only

Also adjust the frequency default and put in a 100 row limit for
randomized purges. This adds a $limit parameter to the BagOStuff
method deleteObjectsExpiringBefore().

Change-Id: I66bfcc67e8e118f8c659dbbee13d54bf2cd937f5

4 years agoMerge "OutputPage: Load html5shiv without indirection of load.php"
jenkins-bot [Sat, 6 Jul 2019 01:00:54 +0000 (01:00 +0000)]
Merge "OutputPage: Load html5shiv without indirection of load.php"

4 years agoOutputPage: Load html5shiv without indirection of load.php
Timo Tijhof [Thu, 4 Jul 2019 15:54:24 +0000 (16:54 +0100)]
OutputPage: Load html5shiv without indirection of load.php

This library was introduced in 3a30e03645f, to make sure Grade C
stylesheets that apply to HTML5 elements that older browsers might
not know yet, work as expected in old IE.

It originally committed a minified version and loaded it directly
as an HTML script tag in a conditional comment. This had minimal
impact on anything else, and was easy to maintain.

In 68237fb1a74, this was changed to commit the unminified version
instead because Debian maintainers don't like packaging software
that contain minified files, despite being a simple file,
unmodified from the original (upstream publishes it in minified
form, with license header), published under a compatible free
license, and embedded in a license-compliant manner. We then
registered it as an unused ResourceLoader module, to be minified
on-the-fly at run-time.

Support for "server-registered client-unregistered" modules was
removed last week in c554ee8e64e because nothing needed it
anymore (except html5shiv apparently), which resulted in this
module being registered client-side on all page views for all
users (in latest master). This doesn't break anything, but it
is a regression performance-wise.

Restore this by (mostly) going to how it was before: A simple static
file, committed to Git, served as-is. Not related to, served by,
pulled through, nor registered with, ResourceLoader in any way.

Only difference with the original approach is that it is no longer
minified, which means a few more bytes transferred on old IE page
views, which is considered an acceptable compromise.

Bug: T201483
Change-Id: Ib0020b6bd015679b61f63eaa8109ed9b83d8ad15

4 years agoMerge "Fix type hints in jobqueue related classes"
jenkins-bot [Fri, 5 Jul 2019 23:10:40 +0000 (23:10 +0000)]
Merge "Fix type hints in jobqueue related classes"

4 years agoMerge "Adjust type hints in file related classes"
jenkins-bot [Fri, 5 Jul 2019 23:10:34 +0000 (23:10 +0000)]
Merge "Adjust type hints in file related classes"

4 years agoMerge "rdbms: clean up $groups logic in LoadBalancer and expand comments"
jenkins-bot [Fri, 5 Jul 2019 22:00:09 +0000 (22:00 +0000)]
Merge "rdbms: clean up $groups logic in LoadBalancer and expand comments"

4 years agoMerge "Adjust type hints in htmlform related classes"
jenkins-bot [Fri, 5 Jul 2019 21:32:55 +0000 (21:32 +0000)]
Merge "Adjust type hints in htmlform related classes"

4 years agoMerge "build: Update eslint-config-wikimedia to 0.13.0"
jenkins-bot [Fri, 5 Jul 2019 21:18:30 +0000 (21:18 +0000)]
Merge "build: Update eslint-config-wikimedia to 0.13.0"

4 years agoMerge "Pass int for argument to ArchivedFile"
jenkins-bot [Fri, 5 Jul 2019 21:02:51 +0000 (21:02 +0000)]
Merge "Pass int for argument to ArchivedFile"

4 years agobuild: Update eslint-config-wikimedia to 0.13.0
Ed Sanders [Fri, 5 Jul 2019 19:38:29 +0000 (20:38 +0100)]
build: Update eslint-config-wikimedia to 0.13.0

Change-Id: I7df5840bc97f8bbcd8cfc875c2b48b3061ef2c9e

4 years agoFix type hints in jobqueue related classes
Umherirrender [Fri, 5 Jul 2019 20:20:56 +0000 (22:20 +0200)]
Fix type hints in jobqueue related classes

JobQueueGroup is giving RunnableJob on pop(), so it should take the same
type for ack() and deduplicateRootJob()
JobQueue::ack alsready accept the interface

Also change to RunnableJob in JobRunner to work with the type from the
job queue

Change-Id: I7b09586cff8affabe807ee16e80d04f5137dce45

4 years agoPass int for argument to ArchivedFile
Umherirrender [Fri, 5 Jul 2019 20:17:53 +0000 (22:17 +0200)]
Pass int for argument to ArchivedFile

ArchivedFile constructor is complex, but use the correct type for
unneeded arguments

Change-Id: I111daf7fb69d4448d8a362ba70735f3312869c7f

4 years agoMerge "Bidi isolate user names in block error paramters"
jenkins-bot [Fri, 5 Jul 2019 19:25:38 +0000 (19:25 +0000)]
Merge "Bidi isolate user names in block error paramters"

4 years agoinstaller: Avoid <doclink/> hack for 'config-sidebar' rendering
Timo Tijhof [Thu, 4 Jul 2019 22:00:48 +0000 (23:00 +0100)]
installer: Avoid <doclink/> hack for 'config-sidebar' rendering

Use separate messages for the link labels instead.

Bug: T227297
Change-Id: I2fda6ef98117781231a0d42c039d333ef829ea98

4 years agoinstaller: Convert <downloadlink/> hack to raw message param
Timo Tijhof [Thu, 4 Jul 2019 21:23:11 +0000 (22:23 +0100)]
installer: Convert <downloadlink/> hack to raw message param

Bug: T227297
Change-Id: I9a50342aa0c9525893085e1b8d428556f0262f5c

4 years agoinstaller: Call getInfoBox() with raw wikitext, not transformed text
Timo Tijhof [Thu, 4 Jul 2019 21:17:16 +0000 (22:17 +0100)]
installer: Call getInfoBox() with raw wikitext, not transformed text

This will be run through the parser by getInfoBox(), and is documented
as taking raw wikitext, such as from Message::plain(). Calling with
text() is needlessly slower and may product incorrect results due to
applying transformations twice.

Also fix indentation for a wfMessage() call that was confusing
previously, seemingly passing 5 parameters with $4 being '<downloadlink/>'
when actually it is $3 and the line above continues a previous parameter.

Bug: T227297
Change-Id: Ice432e08b1c5f52db097f7c9f4fe6d69e1b04c2d

4 years agoinstaller: Fix Html::infoBox param docs and mark as internal
Timo Tijhof [Thu, 4 Jul 2019 21:13:18 +0000 (22:13 +0100)]
installer: Fix Html::infoBox param docs and mark as internal

This method is very specific to the installer and is only used in one
place, in WebInstaller, and should probably be moved there.

For now, make its documentation less confusing, more correct, and
mark it as `@internal`, this is not a supported public interface.

Bug: T227297
Change-Id: I8902fe34b80c5152bfd37e9c24427ad48b5f4167

4 years agoAdjust type hints in file related classes
Umherirrender [Mon, 1 Jul 2019 20:30:14 +0000 (22:30 +0200)]
Adjust type hints in file related classes

Change-Id: I3811e0d9a3297293bc52c1a98f3e8fdb5a3d0e85

4 years agoAdjust type hints in htmlform related classes
Umherirrender [Tue, 18 Jun 2019 20:16:31 +0000 (22:16 +0200)]
Adjust type hints in htmlform related classes

The return type of HTMLFormField::loadDataFromRequest to mixed
Some sub classes returning arrays or bools, not everytime strings

HTMLCheckField is working with arrays, so also allow array on getTableRow

Change-Id: I076feea76d8e296f27c8a9fb4cbd9368584ba187

4 years agoMerge "PopulateContentTables: compute sha1 and length if needed."
jenkins-bot [Fri, 5 Jul 2019 15:40:45 +0000 (15:40 +0000)]
Merge "PopulateContentTables: compute sha1 and length if needed."

4 years agoMerge "Add "help" link to Special:Unblock"
jenkins-bot [Fri, 5 Jul 2019 15:40:38 +0000 (15:40 +0000)]
Merge "Add "help" link to Special:Unblock"

4 years agoMerge "Follow-up 9c9cfa2ec3d7: fix non-session entry point error"
jenkins-bot [Fri, 5 Jul 2019 15:02:57 +0000 (15:02 +0000)]
Merge "Follow-up 9c9cfa2ec3d7: fix non-session entry point error"

4 years agoBidi isolate user names in block error paramters
Thalia [Thu, 27 Jun 2019 18:24:52 +0000 (19:24 +0100)]
Bidi isolate user names in block error paramters

This fixes parameters returned by AbstractBlock::getBlockErrorParams,
but not those from ApiBlockInfoTrait.

Change-Id: I122017808766de1e9a9035f2f39a7b08607e56c1

4 years agoPopulateContentTables: compute sha1 and length if needed.
daniel [Thu, 4 Jul 2019 11:54:20 +0000 (13:54 +0200)]
PopulateContentTables: compute sha1 and length if needed.

PopulateContentTables tries to copy rev_sha1 to content_sha1 and rev_len
to content_size, but when updating directly from on old version of
MediaWiki, these fields may be empty or NULL. To ensure that the content
table gets the correct value, we have to compute them on the fly.

Note that PopulateRevisionSha1 runs *after* the normal database updates.
So even though it was introduced in 1.19, it will run after the schema
updates for 1.32, which include PopulateContentTables. This means that
PopulateContentTables can't rely on rev_sha1 to have been filled in
already. But per I0c22286a16d7b, it also means that PopulateRevisionSha1
can make use of the hash in content_sha1 instead of re-calculating.

Bug: T217831
Bug: T200653
Change-Id: I69e91a812ad5f038562220b02c3634589667cdb6

4 years agoTell users how they can force a maintenance script to run again.
daniel [Fri, 5 Jul 2019 13:20:02 +0000 (15:20 +0200)]
Tell users how they can force a maintenance script to run again.

Subclasses of LoggedUpdateMaintenance tell the user that "Update
'{$key}' already logged as completed". This adds "Use --force to
run it again."

Bug: T200653
Change-Id: I8cf3c5383c0fecdc92b58048138332855b5602a6

4 years agoMerge "Import the PSR logger classes in Message"
jenkins-bot [Fri, 5 Jul 2019 06:59:10 +0000 (06:59 +0000)]
Merge "Import the PSR logger classes in Message"

4 years agoMerge "Update populateRevisionSha1.php for MCR schema changes"
jenkins-bot [Fri, 5 Jul 2019 06:56:39 +0000 (06:56 +0000)]
Merge "Update populateRevisionSha1.php for MCR schema changes"

4 years agoMerge "SlotRecord:compute sha1 if empty."
jenkins-bot [Fri, 5 Jul 2019 06:56:31 +0000 (06:56 +0000)]
Merge "SlotRecord:compute sha1 if empty."

4 years agoMerge "resourceloader: Only output ResourceLoaderDynamicStyles when needed"
jenkins-bot [Fri, 5 Jul 2019 02:25:23 +0000 (02:25 +0000)]
Merge "resourceloader: Only output ResourceLoaderDynamicStyles when needed"

4 years agoMerge "Fix types around ILoadBalancer and IResultWrapper"
jenkins-bot [Thu, 4 Jul 2019 22:30:35 +0000 (22:30 +0000)]
Merge "Fix types around ILoadBalancer and IResultWrapper"

4 years agoMerge "rdbms: fix typo and clean up some cruft in MWLBFactory"
jenkins-bot [Thu, 4 Jul 2019 22:30:27 +0000 (22:30 +0000)]
Merge "rdbms: fix typo and clean up some cruft in MWLBFactory"

4 years agordbms: clean up $groups logic in LoadBalancer and expand comments
Aaron Schulz [Mon, 24 Jun 2019 23:36:42 +0000 (16:36 -0700)]
rdbms: clean up $groups logic in LoadBalancer and expand comments

Split out private resolveGroups() method for normalizing query
groups. Move some server index validation to getConnectionIndex()
and make it stricter.

Make getConnectionIndex() group fallback logic aware of the generic
group. The main use case for custom default groups is heavy scripts
or jobs that run in the background. It is probably better to have
good DB server redundancy for the query group and rely on it rather
than possibly fallback onto all of the main servers used for normal
requests. The later behavior could spread slowness or outages.

Also make getAnyOpenConnection() more robust and readable by
splitting out a private pickAnyOpenConnection() method that
checks IDatabase::trxLevel().

In addition, remove redundant is_int() check from isOpen()
method as it will return false in that case even without it.

Remove bogus getConnection() parameter in testCopyTestData().

Change-Id: Ica619c5487c761c724791d151db7388e4b41b0aa

4 years agoMerge "Fix `cursor` on TagItemWidgets"
jenkins-bot [Thu, 4 Jul 2019 20:00:22 +0000 (20:00 +0000)]
Merge "Fix `cursor` on TagItemWidgets"

4 years agoFix types around ILoadBalancer and IResultWrapper
Umherirrender [Thu, 4 Jul 2019 19:56:31 +0000 (21:56 +0200)]
Fix types around ILoadBalancer and IResultWrapper

Change-Id: I08531ccc6db046114f3535cfe6c108936dfff0d0

4 years agoImport the PSR logger classes in Message
Aaron Schulz [Thu, 4 Jul 2019 19:51:09 +0000 (12:51 -0700)]
Import the PSR logger classes in Message

Change-Id: If05db9b55275246174b6f1fd0ca8437f271f5eea

4 years agoMerge "Fix type hints in objectcache related classes"
jenkins-bot [Thu, 4 Jul 2019 19:47:40 +0000 (19:47 +0000)]
Merge "Fix type hints in objectcache related classes"

4 years agoMerge "Fix param documentation of ProtectionForm::show"
jenkins-bot [Thu, 4 Jul 2019 19:44:23 +0000 (19:44 +0000)]
Merge "Fix param documentation of ProtectionForm::show"

4 years agoMerge "PreferencesFormOOUI: Avoid Phan warning with weird signature of TabPanelLayout"
jenkins-bot [Thu, 4 Jul 2019 19:40:39 +0000 (19:40 +0000)]
Merge "PreferencesFormOOUI: Avoid Phan warning with weird signature of TabPanelLayout"

4 years agoMerge "resourceloader: Set value for getStoreKey in server-side"
jenkins-bot [Thu, 4 Jul 2019 19:25:12 +0000 (19:25 +0000)]
Merge "resourceloader: Set value for getStoreKey in server-side"

4 years agoMerge "resourceloader: Set value for getVary in server-side"
jenkins-bot [Thu, 4 Jul 2019 19:25:03 +0000 (19:25 +0000)]
Merge "resourceloader: Set value for getVary in server-side"

4 years agoresourceloader: Only output ResourceLoaderDynamicStyles when needed
Timo Tijhof [Wed, 26 Jun 2019 23:20:33 +0000 (00:20 +0100)]
resourceloader: Only output ResourceLoaderDynamicStyles when needed

In mediawiki.js, this marker has always been optional, falling back to
appending to <head>. When no stylesheets need to be after the marker
(e.g. no site styles on the wiki, and user is not logged-in), then
there is no need for the marker to exist.

In a previous refactor, I was going to do this and created an
"$append" variable in the function to do what this commit does,
but I forgot to actually use it for anything.

Test Plan:
* Local wiki, with no MediaWiki:Common/{Skinname}.css pages existing.
* When logged-out, before this change, there is a marker, now there is not.
* When creating "MediaWiki:Group-user.css" and logging in, there is still
  a marker, and it is still above the <link> for that user styles request
  in the <head>.

Bug: T219342
Change-Id: I2e9657f318088860916823efeb96ae4f1532974c

4 years agoAdd "help" link to Special:Unblock
DannyS712 [Thu, 4 Jul 2019 19:08:31 +0000 (19:08 +0000)]
Add "help" link to Special:Unblock

Bug: T227295
Change-Id: I53712b6f4fc071fecc413f41e8815b73417c205b

4 years agoMerge "Remove "successfully" from specialmute-success and add a link title"
jenkins-bot [Thu, 4 Jul 2019 19:04:26 +0000 (19:04 +0000)]
Merge "Remove "successfully" from specialmute-success and add a link title"

4 years agordbms: fix typo and clean up some cruft in MWLBFactory
Aaron Schulz [Thu, 4 Jul 2019 06:29:06 +0000 (23:29 -0700)]
rdbms: fix typo and clean up some cruft in MWLBFactory

Change-Id: Ib51dfee9ed06326a8b3acfed136e75b13fc4e234

4 years agoPreferencesFormOOUI: Avoid Phan warning with weird signature of TabPanelLayout
Bartosz Dziewoński [Thu, 4 Jul 2019 17:38:58 +0000 (19:38 +0200)]
PreferencesFormOOUI: Avoid Phan warning with weird signature of TabPanelLayout

TabPanelLayout is documented to take two parameters, $name and $config.
The $name position parameter can also be passed as a named config option
in the $config array, but doing so confuses Phan, since there's no good
way to document it. Just don't do it.

Bug: T227144
Change-Id: Ifbd776844d722d58bf9f13cacc490407320731c6

4 years agoresourceloader: Set value for getStoreKey in server-side
Fomafix [Sat, 29 Jun 2019 07:47:57 +0000 (09:47 +0200)]
resourceloader: Set value for getStoreKey in server-side

This change reduces the size of the JavaScript resources.

Change-Id: I850249f910f6275c1b963dc5421ba706ed6e9a56

4 years agoresourceloader: Set value for getVary in server-side
Fomafix [Fri, 28 Jun 2019 13:06:42 +0000 (15:06 +0200)]
resourceloader: Set value for getVary in server-side

This change makes ResourceLoaderStorageVersion a private variable.
The JavaScript global variable wgResourceLoaderStorageVersion is now
removed.

This change makes the JavaScript code smaller.

Change-Id: I8e31b95d4c44ba653bedb6be500011a39bc6abd8

4 years agoRemove "successfully" from specialmute-success and add a link title
Amir Aharoni [Tue, 2 Jul 2019 09:39:24 +0000 (12:39 +0300)]
Remove "successfully" from specialmute-success and add a link title

The word "successfully" is unnecessary, according to
https://www.mediawiki.org/wiki/Localisation#Avoid_jargon_and_slang

The link title will make the whole message more readable in English,
and easier to translate into all languages.

Change-Id: I840bd385f6918658b4a02df4c3ac0a60814abf5a

4 years agoresourceloader: Remove 'mw.legacy' placeholder object
Timo Tijhof [Thu, 4 Jul 2019 16:29:29 +0000 (17:29 +0100)]
resourceloader: Remove 'mw.legacy' placeholder object

This was very briefly used during the development cycle of
MediaWiki 1.16 in 2010. The idea was to port some pre-RL legacy
modules from global variables to mw.legacy.* (such as sajax,
wikibits and other such 'mediawiki.legacy.*' modules),
with a back-compat deprecate-warning alias from their old global
names to the mw.legacy.* namespace.

This was abandoned prior to stable release and never used again,
and properly deprecated after years of no use in MediaWiki 1.22.

Remove this now, finally.

Change-Id: I9ef0984da7a07d4778fbeb71f3d4a7ebba97f29f

4 years agoobjectcache: optimize lock() and unlock() methods in SqlBagOStuff
Aaron Schulz [Sat, 29 Jun 2019 08:36:01 +0000 (01:36 -0700)]
objectcache: optimize lock() and unlock() methods in SqlBagOStuff

Also clean up base method in BagOStuff.

Bug: T113916
Change-Id: I3a1c6afe531a8eae34608bc7fe0aa6f9f4d439fe

4 years agoMerge "Rename various $wikiId fields/parameters to $dbDomain in user classes"
jenkins-bot [Thu, 4 Jul 2019 13:58:54 +0000 (13:58 +0000)]
Merge "Rename various $wikiId fields/parameters to $dbDomain in user classes"

4 years agoMerge "rdbms: make implement IResultWrapper directly instead of via inheritence"
jenkins-bot [Thu, 4 Jul 2019 13:58:16 +0000 (13:58 +0000)]
Merge "rdbms: make implement IResultWrapper directly instead of via inheritence"

4 years agordbms: make implement IResultWrapper directly instead of via inheritence
Aaron Schulz [Thu, 20 Jun 2019 22:17:22 +0000 (23:17 +0100)]
rdbms: make implement IResultWrapper directly instead of via inheritence

Change-Id: If1b15c0c21d0ee336025fb99f47fc19ddf1d5435

4 years agordbms: make temp table tracking in Database more robust
Aaron Schulz [Sat, 8 Jun 2019 06:32:27 +0000 (07:32 +0100)]
rdbms: make temp table tracking in Database more robust

Do not register table changes until query success

Change-Id: I8c0eeb510d15e2f4cc014f62b7a0f146e31b6613

4 years agoUpdate populateRevisionSha1.php for MCR schema changes
Bill Pirkle [Thu, 13 Jun 2019 03:39:43 +0000 (22:39 -0500)]
Update populateRevisionSha1.php for MCR schema changes

Maintenance script populateRevisionSha1.php was using the deprecated
Revision class. Instead, use the new RevisionRecord class if
possible, and custom code otherwise.

Bug: T217829
Change-Id: I0c22286a16d7b243306447d8948428702269a4bd

4 years agoSlotRecord:compute sha1 if empty.
daniel [Thu, 4 Jul 2019 08:52:55 +0000 (10:52 +0200)]
SlotRecord:compute sha1 if empty.

The SHA1 should be computed automatically if empty, not just if it is
missing entirely. This is needed since rev_sha1 may contain an empty
string for old revisions.

Bug: T200653
Bug: T219816
Change-Id: Ia6870a828bc9661fb05085e36315a86483ec48c4