lhc/web/wiklou.git
4 years agoUpdate OOUI to v0.33.1
James D. Forrester [Wed, 3 Jul 2019 21:12:48 +0000 (14:12 -0700)]
Update OOUI to v0.33.1

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

Bug: T226819
Bug: T226822
Depends-On: Ibff36df9866dd0c8c6fbd2ca4ce0decc633976b0
Change-Id: Ibff36df9866dd0c8c6fbd2ca4ce0decc633976ba

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 3 Jul 2019 20:06:00 +0000 (22:06 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I2186b60bd72677933ee92b1b6f60a75d0adfbb5d

4 years agoMerge "mediawiki.action.edit.preview: Use CSS instead of jQuery for animation"
jenkins-bot [Wed, 3 Jul 2019 19:42:13 +0000 (19:42 +0000)]
Merge "mediawiki.action.edit.preview: Use CSS instead of jQuery for animation"

4 years agoMerge "LogFormatter::formatParameterValue: handle bad user names"
jenkins-bot [Wed, 3 Jul 2019 18:49:45 +0000 (18:49 +0000)]
Merge "LogFormatter::formatParameterValue: handle bad user names"

4 years agomediawiki.action.edit.preview: Use CSS instead of jQuery for animation
Fomafix [Wed, 3 Jul 2019 16:02:35 +0000 (18:02 +0200)]
mediawiki.action.edit.preview: Use CSS instead of jQuery for animation

Change-Id: I9f79ddf2cf4548dbf8b8553da030d6da4772187e

4 years agoMerge "Ensure canHaveTalkPage returns false when getTalkPage would fail."
jenkins-bot [Wed, 3 Jul 2019 16:55:34 +0000 (16:55 +0000)]
Merge "Ensure canHaveTalkPage returns false when getTalkPage would fail."

4 years agoLogFormatter::formatParameterValue: handle bad user names
daniel [Wed, 3 Jul 2019 16:49:58 +0000 (18:49 +0200)]
LogFormatter::formatParameterValue: handle bad user names

This makes LogFormatter more robust against bad user names coming from
broken log records.

Bug: T224368
Change-Id: Ifce9e86bddba274182253cd25338766e8093d6ad

4 years agoMerge "Revert "rdbms: codify DatabaseDomain table "_" prefix convention""
jenkins-bot [Wed, 3 Jul 2019 15:57:29 +0000 (15:57 +0000)]
Merge "Revert "rdbms: codify DatabaseDomain table "_" prefix convention""

4 years agoMerge "Improve documentation of getJoin() methods for static analysis"
jenkins-bot [Wed, 3 Jul 2019 15:22:12 +0000 (15:22 +0000)]
Merge "Improve documentation of getJoin() methods for static analysis"

4 years agoMerge "Fix API message maps for block errors"
jenkins-bot [Wed, 3 Jul 2019 14:49:05 +0000 (14:49 +0000)]
Merge "Fix API message maps for block errors"

4 years agoRevert "rdbms: codify DatabaseDomain table "_" prefix convention"
Gergő Tisza [Wed, 3 Jul 2019 11:26:02 +0000 (11:26 +0000)]
Revert "rdbms: codify DatabaseDomain table "_" prefix convention"

This partially reverts commit c4e284f1130cdc2a4811120594bdb8013d17eaaa
(adding _ to prefixes in tests and readbility / code style fixes are preserved).
It broke all installations which used a table prefix not ending in underscore.

Bug: T227147
Change-Id: I99fc0a2f0fc7b5b321d75fd885763688f92f6d04

4 years agoImprove documentation of getJoin() methods for static analysis
Gergő Tisza [Wed, 3 Jul 2019 13:45:01 +0000 (15:45 +0200)]
Improve documentation of getJoin() methods for static analysis

Change-Id: I3943b4b4a630777d06d1689714d8f36c4430cd24

4 years agoMerge "Assert that LocalSettings file exists"
jenkins-bot [Wed, 3 Jul 2019 12:35:00 +0000 (12:35 +0000)]
Merge "Assert that LocalSettings file exists"

4 years agordbms: make DatabaseSqlite try harder to make named locks work
Aaron Schulz [Fri, 28 Jun 2019 02:59:04 +0000 (19:59 -0700)]
rdbms: make DatabaseSqlite try harder to make named locks work

Also make unlock() calls to non-existing locks return false

Change-Id: I9f0cd63e85392d1fab1868638896492bbd8e6531

4 years agoRestore previous export behavior with respect to empty comment text
Ariel T. Glenn [Wed, 3 Jul 2019 08:44:33 +0000 (11:44 +0300)]
Restore previous export behavior with respect to empty comment text

Bug: T174031
Change-Id: I0df1be8cb832e94ecda3db57b5fee5922a866aea

4 years agoEnsure canHaveTalkPage returns false when getTalkPage would fail.
daniel [Mon, 3 Jun 2019 22:56:22 +0000 (00:56 +0200)]
Ensure canHaveTalkPage returns false when getTalkPage would fail.

This causes Title::getTalkPage and NamespaceInfo::getTitle() to throw
an MWException when called on a LinkTarget that is an interwiki link
or a relative section link. These methods were already throwing
MWException when called on a link to a Special page.

Bug: T224814
Change-Id: I525c186a5b8b8fc22bca195da48afead3bfbd402

4 years agoFix API message maps for block errors
Thalia [Wed, 3 Jul 2019 06:47:01 +0000 (07:47 +0100)]
Fix API message maps for block errors

* Add composite block error message key to ApiBase
* Fix partial block error message key to point to partial block API
  error message key
* Add partial and composite block message keys to ApiMessageTrait

Bug: T227167
Bug: T227168
Change-Id: I5c354d2f038c5b02837268584eb43750a9ebb712

4 years agoMerge "Add @var annotations to XmlTypeCheck class"
jenkins-bot [Wed, 3 Jul 2019 02:29:54 +0000 (02:29 +0000)]
Merge "Add @var annotations to XmlTypeCheck class"

4 years agoMerge "lockmanager: make NullLockManager do reference counting for consistency"
jenkins-bot [Tue, 2 Jul 2019 22:22:22 +0000 (22:22 +0000)]
Merge "lockmanager: make NullLockManager do reference counting for consistency"

4 years agoMerge "lockmanager: disable internal QuorumLockManager methods that should never...
jenkins-bot [Tue, 2 Jul 2019 22:20:39 +0000 (22:20 +0000)]
Merge "lockmanager: disable internal QuorumLockManager methods that should never be reached"

4 years agoMerge "filebackend: remove wfTimestamp() dependency from FileJournal"
jenkins-bot [Tue, 2 Jul 2019 22:20:01 +0000 (22:20 +0000)]
Merge "filebackend: remove wfTimestamp() dependency from FileJournal"

4 years agoMerge "filerepo: remove pointless "foreign" flag in ForeignDBRepo::getMasterDB()"
jenkins-bot [Tue, 2 Jul 2019 22:17:53 +0000 (22:17 +0000)]
Merge "filerepo: remove pointless "foreign" flag in ForeignDBRepo::getMasterDB()"

4 years agolockmanager: make NullLockManager do reference counting for consistency
Aaron Schulz [Fri, 28 Jun 2019 23:56:16 +0000 (16:56 -0700)]
lockmanager: make NullLockManager do reference counting for consistency

Change-Id: I9ebdad0544ffcf87e671f4aca81a91e377c2c7ed

4 years agoMerge "Make UserEditCountUpdate::doUpdate avoid comparing IDatabase instances"
jenkins-bot [Tue, 2 Jul 2019 21:57:10 +0000 (21:57 +0000)]
Merge "Make UserEditCountUpdate::doUpdate avoid comparing IDatabase instances"

4 years agoMerge "rdbms: add SHOW to isTransactableQuery() and add QUERY_IGNORE_DBO_TRX uses"
jenkins-bot [Tue, 2 Jul 2019 21:57:04 +0000 (21:57 +0000)]
Merge "rdbms: add SHOW to isTransactableQuery() and add QUERY_IGNORE_DBO_TRX uses"

4 years agoMake UserEditCountUpdate::doUpdate avoid comparing IDatabase instances
Aaron Schulz [Sat, 29 Jun 2019 02:11:43 +0000 (19:11 -0700)]
Make UserEditCountUpdate::doUpdate avoid comparing IDatabase instances

Also make User::initEditCountInternal take the specific DB handle that
was waited on for replication. This shouldn't make a difference but makes
things more explicit.

Change-Id: Ibb8e083406eb4f4453afce94a2b33450239fce94

4 years agoMerge "rdbms: fix comment for Database::runOnAtomicSectionCancelCallbacks()"
jenkins-bot [Tue, 2 Jul 2019 21:35:21 +0000 (21:35 +0000)]
Merge "rdbms: fix comment for Database::runOnAtomicSectionCancelCallbacks()"

4 years agoMerge "tests: Use a fancy generator provider in ReleaseNotesTest"
jenkins-bot [Tue, 2 Jul 2019 21:05:53 +0000 (21:05 +0000)]
Merge "tests: Use a fancy generator provider in ReleaseNotesTest"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 2 Jul 2019 20:00:50 +0000 (22:00 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I2bd83f45ca37191f255513b0def3a65dbdf08bc3

4 years agoMerge "LanguageConverter performance: Reuse the same string object for regexp"
jenkins-bot [Tue, 2 Jul 2019 19:41:49 +0000 (19:41 +0000)]
Merge "LanguageConverter performance: Reuse the same string object for regexp"

4 years agoMerge "Improve LanguageConverter performance on pages with many HTML tags"
jenkins-bot [Tue, 2 Jul 2019 19:20:32 +0000 (19:20 +0000)]
Merge "Improve LanguageConverter performance on pages with many HTML tags"

4 years agoMerge "objectcache: Hard deprecate ObjectCache::getMainStashInstance()"
jenkins-bot [Tue, 2 Jul 2019 19:19:46 +0000 (19:19 +0000)]
Merge "objectcache: Hard deprecate ObjectCache::getMainStashInstance()"

4 years agoMerge "when getting file (img) properties, suppress whines that it's not xml"
jenkins-bot [Tue, 2 Jul 2019 19:01:28 +0000 (19:01 +0000)]
Merge "when getting file (img) properties, suppress whines that it's not xml"

4 years agotests: Use a fancy generator provider in ReleaseNotesTest
Timo Tijhof [Tue, 2 Jul 2019 18:48:20 +0000 (19:48 +0100)]
tests: Use a fancy generator provider in ReleaseNotesTest

Follows-up ffc23ee333fffb.

Change-Id: I99bf0d7115f6d2a84eb499d104d9cd227331c20f

4 years agoMerge "Move trivial unit tests, round II"
jenkins-bot [Tue, 2 Jul 2019 18:47:38 +0000 (18:47 +0000)]
Merge "Move trivial unit tests, round II"

4 years agoLanguageConverter performance: Reuse the same string object for regexp
C. Scott Ananian [Tue, 2 Jul 2019 18:04:39 +0000 (14:04 -0400)]
LanguageConverter performance: Reuse the same string object for regexp

The regular expression used by LanguageConverter::autoConvert() is a
constant, but it is being created on-the-fly by every invocation.
This causes an expensive full-string comparison when the compiled
regular expression is fetched from the cache -- since the regex is 332
bytes long, the time taken for this comparison can add up quickly: on
page with a lot of tags, the regexp cache may spend more time looking
up the regexp than it takes to execute it.

Bug: T223969
Change-Id: I53c3e631e47a791cf3f0844dd79d4357605c59e3

4 years agoImprove LanguageConverter performance on pages with many HTML tags
C. Scott Ananian [Tue, 2 Jul 2019 18:02:33 +0000 (14:02 -0400)]
Improve LanguageConverter performance on pages with many HTML tags

We were concatenating a single character to the end of the wikitext
source (which copies the entire string) every time through an inner
loop; when the page was large and the loop count was large this took
an excessive amount of time.

Bug: T223969
Change-Id: Ib80306b0bc6c73b750d492764f0e2dfd3a7a5450

4 years agoMerge "test: refactor/speed up release note file test"
jenkins-bot [Tue, 2 Jul 2019 17:55:15 +0000 (17:55 +0000)]
Merge "test: refactor/speed up release note file test"

4 years agoMove trivial unit tests, round II
Amir Sarabadani [Tue, 2 Jul 2019 17:04:44 +0000 (19:04 +0200)]
Move trivial unit tests, round II

Change-Id: I18e5a1514d7372b34f7fb460adf506a1ac65001f

4 years agoobjectcache: Hard deprecate ObjectCache::getMainStashInstance()
Derick Alangi [Tue, 2 Jul 2019 16:58:13 +0000 (17:58 +0100)]
objectcache: Hard deprecate ObjectCache::getMainStashInstance()

This method was soft deprecated in 1.28 and usage is no longer in core
except for FlaggedRevs ext (here in removed in patch I3ada0b53e8b2a6f118f).

Usage
=====

https://codesearch.wmflabs.org/search/?q=getMainStashInstance&i=nope&files=&repos=

Depends-On: I3ada0b53e8b2a6f118fae37e7fc644b187bf95f8
Change-Id: I3f06b3732f67b703cdc12ec5849b67067475cdda

4 years agoMerge "Move MultiHttpClient.php to libs/http"
jenkins-bot [Tue, 2 Jul 2019 16:46:07 +0000 (16:46 +0000)]
Merge "Move MultiHttpClient.php to libs/http"

4 years agoMerge "s/Import Images/Importing Files/ in importImages.php"
jenkins-bot [Tue, 2 Jul 2019 16:45:23 +0000 (16:45 +0000)]
Merge "s/Import Images/Importing Files/ in importImages.php"

4 years agoMerge "Add 1.33.0 to HISTORY"
jenkins-bot [Tue, 2 Jul 2019 16:38:43 +0000 (16:38 +0000)]
Merge "Add 1.33.0 to HISTORY"

4 years agoMerge "Add 1.31.3/1.32.3 to HISTORY"
jenkins-bot [Tue, 2 Jul 2019 16:37:06 +0000 (16:37 +0000)]
Merge "Add 1.31.3/1.32.3 to HISTORY"

4 years agoMerge "API: Removed unused local variable `$p` from ApiQueryDeletedrevs"
jenkins-bot [Tue, 2 Jul 2019 16:23:36 +0000 (16:23 +0000)]
Merge "API: Removed unused local variable `$p` from ApiQueryDeletedrevs"

4 years agoAssert that LocalSettings file exists
Kosta Harlan [Mon, 1 Jul 2019 20:31:48 +0000 (16:31 -0400)]
Assert that LocalSettings file exists

This time, use $IP to get correct path to LocalSettings so that tests can be run
from outside MediaWiki root.

Change-Id: I0dd3dd281cff67b0d8acdc09b97328c44eca2bb6
Follows-Up: Ia36d22217f94e019bb5945705243bd0daace72e0
Bug: T226977

4 years agoAPI: Removed unused local variable `$p` from ApiQueryDeletedrevs
Derick Alangi [Tue, 2 Jul 2019 13:28:52 +0000 (14:28 +0100)]
API: Removed unused local variable `$p` from ApiQueryDeletedrevs

This local var was introduced in fdddf94 and usage of it removed in
4e6810e. This is no longer used so cleaned up.

Change-Id: I2acf28b3a027284adbda70f50bee3c4a6b4a68b2

4 years agoAdd 1.33.0 to HISTORY
Reedy [Tue, 2 Jul 2019 14:43:53 +0000 (15:43 +0100)]
Add 1.33.0 to HISTORY

Change-Id: I11cfe407745ef7a3f2b48dc78f62cd1657290522

4 years agoAdd 1.31.3/1.32.3 to HISTORY
Reedy [Tue, 2 Jul 2019 14:41:23 +0000 (15:41 +0100)]
Add 1.31.3/1.32.3 to HISTORY

Change-Id: Ie7ae1bda5ffc910954852eb412ed30cb56810cb5

4 years agospecials: Combine small miscellaneous 'mediawiki.special.*' modules
Timo Tijhof [Fri, 14 Jun 2019 17:30:28 +0000 (18:30 +0100)]
specials: Combine small miscellaneous 'mediawiki.special.*' modules

The format for this would be cleaner if T225842 were solved.

Bug: T193826
Bug: T219342
Change-Id: I9aaa52b567db254e1e79649b3b99260214da74b3

4 years agotest: refactor/speed up release note file test
Antoine Musso [Tue, 2 Jul 2019 10:07:50 +0000 (12:07 +0200)]
test: refactor/speed up release note file test

The test ReleaseNotesTest:testReleaseNotesFilesExistAndAreNotMalformed
takes 4 seconds on my machine. That is due to assertLessThanOrEqual
being invoked for each lines of various files at the root of the
repository. HISTORY has more than 20000 lines and assert functions are
rather slow.

Refactor the test:
* extract the logic to verify the file length of various files to a
  standalone test and with a dataprovider.
* flip the boolean logic ensuring whether the file exists. When it does
  not, PHP emit a warning which breaks the test anyway.
* Check the line lenght and collect errors in an array, then for each
  file run a single assertion to ensure the array of errors is empty.
  That effectively get rid of assertLessThanOrEqual overhead.
* Use assertSame() to show the full faulty line. assertEqual() shorten
  the arrays content.

Running tests went from 4 seconds to 700 ms on my machine.

Bug: T227067
Change-Id: I9bbbc6647ba9732b462e331e4b6d4acffe35e7cd

4 years agoType hint using interface
WMDE-Fisch [Tue, 2 Jul 2019 10:11:09 +0000 (12:11 +0200)]
Type hint using interface

Fixes phan errors in FileImporter

Change-Id: I4ea2d081062f5f509040c73ff5f59ee5ffd700ad

4 years agordbms: fix comment for Database::runOnAtomicSectionCancelCallbacks()
Aaron Schulz [Tue, 2 Jul 2019 07:33:27 +0000 (00:33 -0700)]
rdbms: fix comment for Database::runOnAtomicSectionCancelCallbacks()

Change-Id: I9ab830be69fdaa46629edb4d96c29aa99005f92f

4 years agowhen getting file (img) properties, suppress whines that it's not xml
Ariel T. Glenn [Thu, 13 Jun 2019 14:18:58 +0000 (17:18 +0300)]
when getting file (img) properties, suppress whines that it's not xml

Imports eventually succeed but the log fills up with stack traces
needlessly.

Bug: T206013
Change-Id: Icb004954272ea8fc6fbc4fd5090cd1310d66946c

4 years agoMerge "Type hint against interface for LoadBalancer in MediaWikiServices"
jenkins-bot [Tue, 2 Jul 2019 01:08:10 +0000 (01:08 +0000)]
Merge "Type hint against interface for LoadBalancer in MediaWikiServices"

4 years agoMerge "Unit tests: Support unit tests in extensions and skins"
jenkins-bot [Mon, 1 Jul 2019 23:25:12 +0000 (23:25 +0000)]
Merge "Unit tests: Support unit tests in extensions and skins"

4 years agoMerge "Remove group validator from UnitTestCase"
jenkins-bot [Mon, 1 Jul 2019 23:06:57 +0000 (23:06 +0000)]
Merge "Remove group validator from UnitTestCase"

4 years agoMerge "GlobalFunctions: Tighten version number type for wfDeprecated()"
jenkins-bot [Mon, 1 Jul 2019 21:42:10 +0000 (21:42 +0000)]
Merge "GlobalFunctions: Tighten version number type for wfDeprecated()"

4 years agoMerge "ApiBase: Drop get(Examples|(Param)?Description(Message)?)\(\), deprecated...
jenkins-bot [Mon, 1 Jul 2019 21:34:31 +0000 (21:34 +0000)]
Merge "ApiBase: Drop get(Examples|(Param)?Description(Message)?)\(\), deprecated since 1.25 and 1.30"

4 years agoGlobalFunctions: Tighten version number type for wfDeprecated()
Derick Alangi [Wed, 15 May 2019 14:24:46 +0000 (15:24 +0100)]
GlobalFunctions: Tighten version number type for wfDeprecated()

To avoid cases like: facddc4 and Ifaf6ab0d36bc02bd170, make sure the
value of the mediawiki version  must be a string (e.g. '1.33') or a
boolean (e.g. `false`).

For some reason, typos can slip through for this value to be a float.
Let's safe guard for future cases like this.

Change-Id: I52bdf94c957bda67548a937d51649e925195f926

4 years agoApiBase: Drop get(Examples|(Param)?Description(Message)?)\(\), deprecated since 1...
James D. Forrester [Mon, 24 Jun 2019 23:43:59 +0000 (16:43 -0700)]
ApiBase: Drop get(Examples|(Param)?Description(Message)?)\(\), deprecated since 1.25 and 1.30

Change-Id: Ie62436692f39825237d36002aa01bedf1caa1fa3

4 years agoMerge "Title: ensure getBaseTitle and getRootTitle return valid Titles"
jenkins-bot [Mon, 1 Jul 2019 21:02:45 +0000 (21:02 +0000)]
Merge "Title: ensure getBaseTitle and getRootTitle return valid Titles"

4 years agoMove MultiHttpClient.php to libs/http
Reedy [Mon, 1 Jul 2019 20:47:57 +0000 (21:47 +0100)]
Move MultiHttpClient.php to libs/http

Change-Id: I199e615fad363b1439604c9d01a9a475856d6128

4 years agoMerge "Pass column as string to IDatabase::selectField"
jenkins-bot [Mon, 1 Jul 2019 20:27:28 +0000 (20:27 +0000)]
Merge "Pass column as string to IDatabase::selectField"

4 years agoTitle: ensure getBaseTitle and getRootTitle return valid Titles
daniel [Fri, 14 Jun 2019 09:01:22 +0000 (11:01 +0200)]
Title: ensure getBaseTitle and getRootTitle return valid Titles

Since getBaseText() and getRootText() may return text with trailing
whitespace, getBaseTitle and getRootTitle must use makeTitleSafe instead
of makeTitle.

Bug: T225585
Change-Id: Id92df552f05e6a9ed7c9259a8779fa94c3587a3e

4 years agoUnit tests: Support unit tests in extensions and skins
Kosta Harlan [Mon, 1 Jul 2019 19:33:54 +0000 (15:33 -0400)]
Unit tests: Support unit tests in extensions and skins

For now only extensions with skin/extension.json which follow PSR-4 are
supported.

DefaultSettings is loaded in bootstrap to work around errors when unit tests are
run followed by integration tests (e.g. `vendor/bin/phpunit`)

Usage:

 - composer phpunit:unit will run all unit tests in core and any tests in
   `{extensions/skins}/tests/phpunit/unit` which also extend
   MediaWikiUnitTestCase, and which have an extension.json file
- Pass a specific directory to only run unit tests for a particular extension,
   e.g. `composer phpunit:unit -- extensions/GrowthExperiments`

Bug: T226911
Change-Id: I237a9f82e4d1b05cf2f08b3e4bb7ffcd8d47111c

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 1 Jul 2019 19:58:20 +0000 (21:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I4c609d902775f74131d2dc16ac0aef3bc418c140

4 years agoMerge "RCFilters: Reduce startup overhead from 'config.json' computation"
jenkins-bot [Mon, 1 Jul 2019 19:52:30 +0000 (19:52 +0000)]
Merge "RCFilters: Reduce startup overhead from 'config.json' computation"

4 years agoDrop APIEditBeforeSave hook
RazeSoldier [Sun, 30 Jun 2019 18:56:29 +0000 (02:56 +0800)]
Drop APIEditBeforeSave hook

Removed the source code and the test code.

Bug: T220656
Change-Id: I3674da6d9c33c08ec2f1774cb793b3a952480571

4 years agoMerge "htmlform: Reveal method getOOUI() is called from when spitting deprecation...
jenkins-bot [Mon, 1 Jul 2019 18:40:36 +0000 (18:40 +0000)]
Merge "htmlform: Reveal method getOOUI() is called from when spitting deprecation notice"

4 years agoRemove group validator from UnitTestCase
Kosta Harlan [Mon, 1 Jul 2019 15:42:21 +0000 (11:42 -0400)]
Remove group validator from UnitTestCase

Whether a unit test has `@group Database` is irrelevant, since it will simply
not work if it relies on database access.

Change-Id: Ibe01d4912160ae44ca86ef6f7c3946501a8c067e

4 years agoDrop the check for existences of LocalSettings.php in MediaWikiIntegrationTestCase
Amir Sarabadani [Mon, 1 Jul 2019 15:15:35 +0000 (17:15 +0200)]
Drop the check for existences of LocalSettings.php in MediaWikiIntegrationTestCase

This is not needed and we should let testers run integration tests without
the need to define LocalSettings.php

This reverts small part of Ie717b0ecf4fcfd089d46248f14853c80b7ef4a76

Bug: T226977
Change-Id: Ia36d22217f94e019bb5945705243bd0daace72e0

4 years agoMerge "Mention relevant tasks in comment (follow-up to c8733333)"
jenkins-bot [Mon, 1 Jul 2019 13:36:35 +0000 (13:36 +0000)]
Merge "Mention relevant tasks in comment (follow-up to c8733333)"

4 years agoMerge "Check for valid user info before calling Linker::userLink() in Linker::revUser...
jenkins-bot [Mon, 1 Jul 2019 13:04:04 +0000 (13:04 +0000)]
Merge "Check for valid user info before calling Linker::userLink() in Linker::revUserTools()"

4 years agoMention relevant tasks in comment (follow-up to c8733333)
Thalia [Mon, 1 Jul 2019 11:53:16 +0000 (12:53 +0100)]
Mention relevant tasks in comment (follow-up to c8733333)

Change-Id: I25a8c018c879dd13967cd67fd51eae9768e3aa4b

4 years agoMerge "Defer cookie block checks to resolve a circular dependency"
jenkins-bot [Mon, 1 Jul 2019 11:09:45 +0000 (11:09 +0000)]
Merge "Defer cookie block checks to resolve a circular dependency"

4 years agoMerge "Rest API: urldecode path parameters"
jenkins-bot [Mon, 1 Jul 2019 01:37:41 +0000 (01:37 +0000)]
Merge "Rest API: urldecode path parameters"

4 years agoMerge "Fix SQLite patch-(page|template)links-fix-pk.sql column order"
jenkins-bot [Sun, 30 Jun 2019 22:41:09 +0000 (22:41 +0000)]
Merge "Fix SQLite patch-(page|template)links-fix-pk.sql column order"

4 years agoMerge "Mail: Add visibility for some methods without method visibility"
jenkins-bot [Sun, 30 Jun 2019 20:42:47 +0000 (20:42 +0000)]
Merge "Mail: Add visibility for some methods without method visibility"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 30 Jun 2019 19:59:17 +0000 (21:59 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I4ac7bf4bbcd320d208b9cc576cd699fcbf2cc8a4

4 years agoFix SQLite patch-(page|template)links-fix-pk.sql column order
Reedy [Sun, 30 Jun 2019 16:47:53 +0000 (17:47 +0100)]
Fix SQLite patch-(page|template)links-fix-pk.sql column order

Bug: T202211
Change-Id: Ife673b88c23acdc1bfc04630715d18243471035f

4 years agoMerge "Avoid :checkbox Sizzle selector"
jenkins-bot [Sun, 30 Jun 2019 15:43:33 +0000 (15:43 +0000)]
Merge "Avoid :checkbox Sizzle selector"

4 years agoMail: Add visibility for some methods without method visibility
Derick Alangi [Wed, 26 Jun 2019 10:11:33 +0000 (11:11 +0100)]
Mail: Add visibility for some methods without method visibility

Carefully, I checked usage of these methods in our code bases and
added the best possible visibilities to them. Not sure if I missed
something but let me know if I did.

Used private & public where suitable for the various methods. As for
__toString(), this is a magic method, so should be public per PHP docs.

Change-Id: Ie0987f4a984cac2f5eb1d9e21a305ad9467a8eb2

4 years agoMove trivially compatible tests to the unit tests suite
Máté Szabó [Sun, 30 Jun 2019 13:23:53 +0000 (15:23 +0200)]
Move trivially compatible tests to the unit tests suite

This changeset resumes work on T89432 and related tickets
by porting an initial set of tests to the new unit test suite
separated out in I69b92db3e70093570e05cc0a64c7780a278b321a.
The tests were only ported if they worked immediately without
requiring any changes other than changing the test case class
to MediaWikiUnitTestCase and moving the test to the new suite.
If a test failed for any reason (even trivial misconfiguration),
it was NOT ported.

With this change, the unit tests suite now consits of a total
of 455 tests. As before, you can run these tests via the following
command:
$ composer phpunit:unit

Bug: T84948
Bug: T89432
Bug: T87781
Change-Id: Ibb8175981092d7f41864e641cc3c118af70a5c76

4 years agoAdd @var annotations to XmlTypeCheck class
Umherirrender [Sat, 29 Jun 2019 22:28:30 +0000 (00:28 +0200)]
Add @var annotations to XmlTypeCheck class

Also fix type of XmlTypeCheck::elementOpen argument

Change-Id: Ia54464e98440992b435eac89f14b7e60fe812f62

4 years agoPass column as string to IDatabase::selectField
Umherirrender [Sat, 29 Jun 2019 22:01:21 +0000 (00:01 +0200)]
Pass column as string to IDatabase::selectField

To match documentation

Change-Id: I7ee69fcd90ba1cba947ca2ef205f350dc456a2c7

4 years agoMerge "Hard deprecrate Language::viewPrevNext()"
jenkins-bot [Sat, 29 Jun 2019 21:38:00 +0000 (21:38 +0000)]
Merge "Hard deprecrate Language::viewPrevNext()"

4 years agoOmit argument when have no attributs on Xml::label
Umherirrender [Sat, 29 Jun 2019 15:26:03 +0000 (17:26 +0200)]
Omit argument when have no attributs on Xml::label

Change-Id: Ia5090985b619e872afd05eff09256c27ce3a01c9

4 years agoHard deprecrate Language::viewPrevNext()
Clara Andrew-Wani [Sat, 29 Jun 2019 15:09:46 +0000 (11:09 -0400)]
Hard deprecrate Language::viewPrevNext()

Bug: T207977
Change-Id: I800689b04868d144f086913df9cd6b27dd74aa81

4 years agoRCFilters: Reduce startup overhead from 'config.json' computation
Timo Tijhof [Thu, 13 Jun 2019 20:23:28 +0000 (21:23 +0100)]
RCFilters: Reduce startup overhead from 'config.json' computation

Follows-up 9ba1d8f526e1. Use the new 'versionCallback' to only perform
the minimum amount of work needed to detect changes, without fully
transforming the data for delivery.

Factor out message parsing into a separate step in the tag list code,
and use the messages' raw contents for the versionCallback.

Stop using WANCache for the tag list, since it's now cached by
ResourceLoader, and only regenerated when needed.

Also refactor the ChangeTags functions around tag description messages a
bit, so that we can more easily get the message keys that are going to
be used.

Bug: T201574
Bug: T223260
Change-Id: I02082aeb289ce4156170b14b8840f6d92cbadb57

4 years agordbms: add SHOW to isTransactableQuery() and add QUERY_IGNORE_DBO_TRX uses
Aaron Schulz [Sat, 29 Jun 2019 00:58:56 +0000 (17:58 -0700)]
rdbms: add SHOW to isTransactableQuery() and add QUERY_IGNORE_DBO_TRX uses

This assures that less pointless transactions are started

Change-Id: I61a52e989e1c9c20c58b1da773f5209ba283a83e

4 years agofilerepo: remove pointless "foreign" flag in ForeignDBRepo::getMasterDB()
Aaron Schulz [Sat, 29 Jun 2019 00:33:50 +0000 (17:33 -0700)]
filerepo: remove pointless "foreign" flag in ForeignDBRepo::getMasterDB()

This connection handle is not managed by any LoadBalancer, so nothing checks that

Change-Id: Ie60859aacbcccd8439bc58d816c6b94769a4331f

4 years agofilebackend: remove wfTimestamp() dependency from FileJournal
Aaron Schulz [Fri, 28 Jun 2019 16:32:00 +0000 (09:32 -0700)]
filebackend: remove wfTimestamp() dependency from FileJournal

Change-Id: Ia9b9e1d2d40d240566a37012fa01e5db0c276ec0

4 years agolockmanager: disable internal QuorumLockManager methods that should never be reached
Aaron Schulz [Fri, 28 Jun 2019 23:55:54 +0000 (16:55 -0700)]
lockmanager: disable internal QuorumLockManager methods that should never be reached

Change-Id: If19f48f8c2d3fe8a38068b09d8691bc8f4eb5d46

4 years agohtmlform: Reveal method getOOUI() is called from when spitting deprecation notice
Derick Alangi [Thu, 13 Jun 2019 10:59:01 +0000 (11:59 +0100)]
htmlform: Reveal method getOOUI() is called from when spitting deprecation notice

Bug: T225683
Change-Id: I654b2d165feeb77394c214ae29bfaa7a9694b46d

4 years agoMerge "Re-apply: Factors out permissions check from User into PermissionManager service"
jenkins-bot [Fri, 28 Jun 2019 23:44:38 +0000 (23:44 +0000)]
Merge "Re-apply: Factors out permissions check from User into PermissionManager service"

4 years agoMerge "Make ExternalStore wrap ExternalStoreFactory and create access class"
jenkins-bot [Fri, 28 Jun 2019 23:12:08 +0000 (23:12 +0000)]
Merge "Make ExternalStore wrap ExternalStoreFactory and create access class"

4 years agoMerge "revision: rename various $wikiId fields/parameters to $dbDomain"
jenkins-bot [Fri, 28 Jun 2019 23:10:36 +0000 (23:10 +0000)]
Merge "revision: rename various $wikiId fields/parameters to $dbDomain"

4 years agoMerge "filebackend: avoid bogus SwiftFileBackend log warnings due to HTTP 202 responses"
jenkins-bot [Fri, 28 Jun 2019 23:09:39 +0000 (23:09 +0000)]
Merge "filebackend: avoid bogus SwiftFileBackend log warnings due to HTTP 202 responses"

4 years agoMerge "rdbms: clean up LBFactory domain splitting code and remove redundant comments"
jenkins-bot [Fri, 28 Jun 2019 22:29:29 +0000 (22:29 +0000)]
Merge "rdbms: clean up LBFactory domain splitting code and remove redundant comments"