lhc/web/wiklou.git
4 years agoRefactor ApiTestCase to get token from ApiQueryTokens
Aryeh Gregor [Wed, 28 Mar 2018 12:32:19 +0000 (15:32 +0300)]
Refactor ApiTestCase to get token from ApiQueryTokens

Depends-On: I9375bc5f40268fd681a2d447c66a03f40b23390a
Change-Id: Ia21a974f2b463afc9324182137b95c80db86a6aa

4 years agoGet ~100% test coverage for ApiEditPage.php and fix a couple of bugs
Aryeh Gregor [Tue, 20 Mar 2018 13:25:26 +0000 (15:25 +0200)]
Get ~100% test coverage for ApiEditPage.php and fix a couple of bugs

Bugs fixed:

* The major one was that appendtext and prependtext seemingly didn't
  work at all on empty pages in the MediaWiki namespace, because
  $this->getTitle() was being used in place of $titleObj.
* Negative undo/undoafter were not rejected in a correct fashion.
* If a logged-in user who was not allowed to upload images tried to
  create an image redirect, the error message used a nonexistent key.

I also replaced assertEquals with assertSame.

I also removed a bit of clearly dead code.  This includes a "break"
following dieStatus().  If we actually want this break so that nobody
adds a case after the default and then removes the dieStatus() so the
switch incorrectly falls through, it could be re-added with
@codeCoverageIgnore.

I put the fixes in the same commit as the test changes because I like to
keep fixes together with the tests for those fixes.

All code now shows up as covered locally, except for one line that seems
to be a PHPUnit bug.

Change-Id: I9375bc5f40268fd681a2d447c66a03f40b23390a

4 years agoMerge "This patch reduces the edit summary length to 500 characters"
jenkins-bot [Tue, 27 Mar 2018 22:38:24 +0000 (22:38 +0000)]
Merge "This patch reduces the edit summary length to 500 characters"

4 years agoRevert "Localisation updates from https://translatewiki.net."
Raimond Spekking [Tue, 27 Mar 2018 19:56:36 +0000 (19:56 +0000)]
Revert "Localisation updates from https://translatewiki.net."

Overwrites new messages

This reverts commit a7c30ad5d91dee12958c2a29ff6ffdc06a65d6e3.

Change-Id: I40b6aae837f2d4c06e860d47a8255d6f7ab2cf59

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 27 Mar 2018 19:54:05 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Idf22ae14a5fb2d2a0e5615720e047c63f32cdfff

4 years agoMerge "Revert "Pass revision being reverted to edit code""
jenkins-bot [Tue, 27 Mar 2018 14:23:20 +0000 (14:23 +0000)]
Merge "Revert "Pass revision being reverted to edit code""

4 years agoMerge "mediawiki.user: Implement mw.user.stickyRandomId"
jenkins-bot [Tue, 27 Mar 2018 14:15:47 +0000 (14:15 +0000)]
Merge "mediawiki.user: Implement mw.user.stickyRandomId"

4 years agoMerge "Make WikiPage::doViewUpdates use a PRESEND deferred update"
jenkins-bot [Tue, 27 Mar 2018 00:25:42 +0000 (00:25 +0000)]
Merge "Make WikiPage::doViewUpdates use a PRESEND deferred update"

4 years agoMerge "Overhaul site_stats table"
jenkins-bot [Tue, 27 Mar 2018 00:02:58 +0000 (00:02 +0000)]
Merge "Overhaul site_stats table"

4 years agoOverhaul site_stats table
Eddie Greiner-Petter [Mon, 8 May 2017 19:31:54 +0000 (21:31 +0200)]
Overhaul site_stats table

The site stats table holds a bunch of metric fields, two of which are of
data type "bigint unsigned", 3 are "bigint" (signed) and one is int
(signed).  Also the default values differ widely: It is 0 on the
"unsigned" fields and the "int" field, but -1 on the three others. This
patch makes all of this more consistent:

Set all fields (except the ss_row_id, which isn't changed) data type to
"bigint unsigned". Also set NULL as the default value for all those
fields. Obviously -1 isn't a possible default value any more. Also, 0
can easily be mistaken for a real value (e.g. ss_active_users=0 -->
"there is nobody active on this wiki"). NULL, by it's definition, is the
value of choice for a value to insert into fields of which we don't know
a correct value.

The respective patch files were tested locally against MySql, Sqlite,
Postgres and SQL Server 2016. Neither oracle nor the upgrade with
update.php was tested.

Bug: T56888
Change-Id: I7d42aae434852a56b6f8dd559d8a5f3bce416021

4 years agoSync up with Parsoid parserTests.txt
Subramanya Sastry [Mon, 26 Mar 2018 23:42:20 +0000 (16:42 -0700)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit ad7c4322d4dd7903065f066d8d96ead875b5126b

Change-Id: Ica20c20ce8f40786f9b2b8ec4c3021f49843354f

4 years agoMerge "Fix whitespace trimming in headings"
jenkins-bot [Mon, 26 Mar 2018 23:12:31 +0000 (23:12 +0000)]
Merge "Fix whitespace trimming in headings"

4 years agoMerge "tests: Remove some unused stuff in phpunit tests"
jenkins-bot [Mon, 26 Mar 2018 22:59:06 +0000 (22:59 +0000)]
Merge "tests: Remove some unused stuff in phpunit tests"

4 years agotests: Remove some unused stuff in phpunit tests
Max Semenik [Sat, 17 Mar 2018 07:49:07 +0000 (00:49 -0700)]
tests: Remove some unused stuff in phpunit tests

Change-Id: Ica20e4f4ac0887b7cac12700ffcd15f587b3ba01

4 years agoMerge "Cleanup ProfilerOutputDb try/catch logic for DBErrors"
jenkins-bot [Mon, 26 Mar 2018 22:45:28 +0000 (22:45 +0000)]
Merge "Cleanup ProfilerOutputDb try/catch logic for DBErrors"

4 years agoMerge "mediawiki.api.upload: Fix test assumption about <iframe>"
jenkins-bot [Mon, 26 Mar 2018 22:40:46 +0000 (22:40 +0000)]
Merge "mediawiki.api.upload: Fix test assumption about <iframe>"

4 years agoRevert "Pass revision being reverted to edit code"
MaxSem [Mon, 26 Mar 2018 22:28:46 +0000 (22:28 +0000)]
Revert "Pass revision being reverted to edit code"

Too many regressions, doing it the different way.

This reverts commit b7737ebed1e8940df4dfd4c50c1224d0edc8639d.

Bug: T190374
Change-Id: I12cb7470aeb7852ddea319c7e499ca3a7b45c84c

4 years agoMerge "rdbms: ignore DBO_IGNORE if passed into Database::__construct()"
jenkins-bot [Mon, 26 Mar 2018 21:51:52 +0000 (21:51 +0000)]
Merge "rdbms: ignore DBO_IGNORE if passed into Database::__construct()"

4 years agoMerge "rdbms: add "use" statement for UnexpectedValueExcetion in Database"
jenkins-bot [Mon, 26 Mar 2018 21:51:50 +0000 (21:51 +0000)]
Merge "rdbms: add "use" statement for UnexpectedValueExcetion in Database"

4 years agoMerge "Create save/publish buttons labels with ellipses"
jenkins-bot [Mon, 26 Mar 2018 21:05:35 +0000 (21:05 +0000)]
Merge "Create save/publish buttons labels with ellipses"

4 years agoMerge "Bump required Postgres version to 9.2"
jenkins-bot [Mon, 26 Mar 2018 20:20:48 +0000 (20:20 +0000)]
Merge "Bump required Postgres version to 9.2"

4 years agoBump required Postgres version to 9.2
Max Semenik [Mon, 26 Mar 2018 18:47:02 +0000 (11:47 -0700)]
Bump required Postgres version to 9.2

This was approved by TechCom in the "PostgreSQL schema change for
consistency with MySQL" RfC (T164898).

Bug: T164898
Bug: T190539
Change-Id: I1b17c18c513e4edcd9219e36e873c55dd7f33034

4 years agoMerge "RCFilters: Hide 'reload watchlist automatically' setting if RCFilters is enabled"
jenkins-bot [Mon, 26 Mar 2018 19:59:46 +0000 (19:59 +0000)]
Merge "RCFilters: Hide 'reload watchlist automatically' setting if RCFilters is enabled"

4 years agoMake WikiPage::doViewUpdates use a PRESEND deferred update
Aaron Schulz [Mon, 26 Mar 2018 04:04:11 +0000 (21:04 -0700)]
Make WikiPage::doViewUpdates use a PRESEND deferred update

This is better than a dubious try/catch which had the off chance
of letting partial implicit transactions be committed.

Change-Id: Ied4870df166dc5a8224866284ea6e1958e65f499

4 years agoMerge "Added heartbeat for pingback."
jenkins-bot [Mon, 26 Mar 2018 18:21:13 +0000 (18:21 +0000)]
Merge "Added heartbeat for pingback."

4 years agoDrop the ProfileSection class, deprecated in 1.25 and unused
James D. Forrester [Tue, 6 Mar 2018 17:16:31 +0000 (17:16 +0000)]
Drop the ProfileSection class, deprecated in 1.25 and unused

Change-Id: I3979f193562bce8252fc8778baaf78bd0d2c1a40

4 years agoDrop HTMLForm & VFormHTMLForm::isVForm(), deprecated in 1.25
James D. Forrester [Tue, 6 Mar 2018 17:11:47 +0000 (17:11 +0000)]
Drop HTMLForm & VFormHTMLForm::isVForm(), deprecated in 1.25

Change-Id: If5f4e146071c17a9adabd36453ef68ff38405ed4

4 years agoDrop Title::getTitleInvalidRegex(), deprecated in 1.25
James D. Forrester [Tue, 6 Mar 2018 17:09:41 +0000 (17:09 +0000)]
Drop Title::getTitleInvalidRegex(), deprecated in 1.25

Change-Id: I8b8dd744c4c2ca5a13c89701b44013ddda785f3b

4 years agoMerge "Drop SpecialPageFactory::getList(), deprecated in 1.24"
jenkins-bot [Mon, 26 Mar 2018 17:54:21 +0000 (17:54 +0000)]
Merge "Drop SpecialPageFactory::getList(), deprecated in 1.24"

4 years agoMerge "resourceloader: Use getRawVal instead of slower getVal in StartupModule"
jenkins-bot [Mon, 26 Mar 2018 17:39:18 +0000 (17:39 +0000)]
Merge "resourceloader: Use getRawVal instead of slower getVal in StartupModule"

4 years agoMerge "Remove deprecated functions from ChangeTags class"
jenkins-bot [Mon, 26 Mar 2018 17:35:04 +0000 (17:35 +0000)]
Merge "Remove deprecated functions from ChangeTags class"

4 years agoMerge "Stop test from randomly failing"
jenkins-bot [Mon, 26 Mar 2018 17:25:13 +0000 (17:25 +0000)]
Merge "Stop test from randomly failing"

4 years agoRemove deprecated functions from ChangeTags class
Jayprakash12345 [Sat, 10 Mar 2018 04:02:03 +0000 (04:02 +0000)]
Remove deprecated functions from ChangeTags class

* listExtensionActivatedTags
* listExtensionDefinedTags

These were deprecated in MediaWiki 1.28, and have no uses in Wikimedia Git.

Change-Id: I88bdfc3ea3d9ba9845f7caac2430f815f1a9b5b0

4 years agoMerge "ParserTest: clear Language namespaces cache"
jenkins-bot [Mon, 26 Mar 2018 17:21:48 +0000 (17:21 +0000)]
Merge "ParserTest: clear Language namespaces cache"

4 years agoMerge "PostgresUpdater: Rename custom "dropIndex" to "dropPgIndex""
jenkins-bot [Mon, 26 Mar 2018 17:16:55 +0000 (17:16 +0000)]
Merge "PostgresUpdater: Rename custom "dropIndex" to "dropPgIndex""

4 years agoStop test from randomly failing
Aryeh Gregor [Mon, 26 Mar 2018 17:08:22 +0000 (20:08 +0300)]
Stop test from randomly failing

The difference between two integers is less than 1 only if it's 0, so
the test as-is will fail whenever the second changes between when '1
day' is evaluated when inserting the block, and when time() is called
for the assert.

Change-Id: Ic76ff05729129b74345696879a934253525213fa

4 years agomediawiki.user: Implement mw.user.stickyRandomId
Gilles Dubuc [Thu, 22 Mar 2018 13:06:56 +0000 (14:06 +0100)]
mediawiki.user: Implement mw.user.stickyRandomId

This is a sticky version of generateRandomSessionId,
useful to keep track of the pageview between extensions.

Bug: T187299
Change-Id: I0877c399c60d3fb2fdf8e844cad6acecf6f704c9

4 years agoMerge "Improve test coverage for ApiBlock.php to 100%"
jenkins-bot [Mon, 26 Mar 2018 16:42:04 +0000 (16:42 +0000)]
Merge "Improve test coverage for ApiBlock.php to 100%"

4 years agoPostgresUpdater: Rename custom "dropIndex" to "dropPgIndex"
Brad Jorsch [Mon, 26 Mar 2018 16:14:50 +0000 (12:14 -0400)]
PostgresUpdater: Rename custom "dropIndex" to "dropPgIndex"

There doesn't seem to be any reason this shouldn't follow the naming
conventions of other PG-specific schema change functions, and Ie9dbda329
shows that difference can be confusing.

Change-Id: Ie3e0d5b130486aa9ab5eebd879dca846dfa99584

4 years agoAdded heartbeat for pingback.
Cindy Cicalese [Wed, 14 Mar 2018 07:31:17 +0000 (07:31 +0000)]
Added heartbeat for pingback.

The current implementation of the pingback feature sends new data on
the first page load after running the update.php maintenance script if
no ping has yet been sent for the wiki's current MediaWiki version.
There is no way by observing the event log to determine if a given wiki
is still operational, since no further pings are sent unless the
MediaWiki version on the wiki changes. Wikis that are created for
testing purposes or that have been decommissioned will continue to live
on in the pingback data.

This patch adds a monthly heartbeat ping. The structure of the heartbeat
ping is identical to the original ping. The heartbeat ping serves not
only to indicate that the wiki is still alive; it will send updated
information, so it will be possible to find out if any of the data, such
as the PHP version or memory limit, has changed since the last ping even
if the MediaWiki version has stayed the same.

Bug: T189785
Change-Id: Ia3077ed02e36eb6ad6ef0ae4d085ecaeb1547a52

4 years agoRCFilters: Hide 'reload watchlist automatically' setting if RCFilters is enabled
Moriel Schottlender [Mon, 26 Mar 2018 08:04:40 +0000 (11:04 +0300)]
RCFilters: Hide 'reload watchlist automatically' setting if RCFilters is enabled

Bug: T186277
Change-Id: I78a2bae5f8d0e6f947276c69fa1806eeaad46197

4 years agoMerge "Improve test coverage for ApiDelete.php"
jenkins-bot [Mon, 26 Mar 2018 15:18:31 +0000 (15:18 +0000)]
Merge "Improve test coverage for ApiDelete.php"

4 years agoImprove test coverage for ApiBlock.php to 100%
Aryeh Gregor [Sun, 18 Mar 2018 18:48:51 +0000 (20:48 +0200)]
Improve test coverage for ApiBlock.php to 100%

The code coverage tool still reports that line 50 ("$status,") is not
covered, but this is just a parameter to a function that is in fact
called and does show up as covered, so I'm pretty sure it's a bug.

I replaced a couple of sanity checks that reported "incomplete" on
failure with actual assertions so that the test would fail properly if
the sanity check failed.

The testing could still probably be expanded considerably.

Change-Id: Ib6ba7227af23bcb50c7e3bafb0b51395e8acf03f

4 years agoImprove test coverage for ApiDelete.php
Aryeh Gregor [Sun, 18 Mar 2018 19:58:02 +0000 (21:58 +0200)]
Improve test coverage for ApiDelete.php

Still missing a test for file deletion, because I didn't figure out a
simple way to create a file page that I can test on.

Change-Id: I276e84b4f7777e5dd5be5520e572b9b9bb0c0633

4 years agoCleanup ProfilerOutputDb try/catch logic for DBErrors
Aaron Schulz [Mon, 26 Mar 2018 04:00:15 +0000 (21:00 -0700)]
Cleanup ProfilerOutputDb try/catch logic for DBErrors

Also make it avoid transactions for non-sqlite when DBO_TRX is set.
This was the intention before, but nothing made sure that flag was
not active when the upsert()s ran.

Change-Id: I9cb21b199aae4134d172352e66cf8d2841327f85

4 years agoParserTest: clear Language namespaces cache
Antoine Musso [Sun, 25 Mar 2018 13:34:05 +0000 (15:34 +0200)]
ParserTest: clear Language namespaces cache

The content language object has a cache for namespaces, it might then
not take in account $wgExtraNamespaces set by the parser test suite
which causes unknown namespaces errors.

Ensure the new language object has a clean cache.

Repro:
php phpunit.php --filter '(ParserMethodsTest::testValidCovers|T53680)'

Bug: T190554
Change-Id: I9c4104d7bb3a0c84b60d7e7b4154743cbe58348c

4 years agoMerge "Localisation updates from https://translatewiki.net."
L10n-bot [Sat, 24 Mar 2018 21:50:04 +0000 (21:50 +0000)]
Merge "Localisation updates from https://translatewiki.net."

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 24 Mar 2018 20:58:12 +0000 (21:58 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia630a3bdf2b4cffe2cf30f9c1342e39f03ecc8f2

4 years agoMerge "Fix typo in word visibility"
jenkins-bot [Sat, 24 Mar 2018 19:11:32 +0000 (19:11 +0000)]
Merge "Fix typo in word visibility"

4 years agoModify {{#language:ku}}: Kurdî should be written lower-case instead
Ghybu [Wed, 21 Mar 2018 22:22:09 +0000 (22:22 +0000)]
Modify {{#language:ku}}: Kurdî should be written lower-case instead

Bug: T190205
Change-Id: Ieacc885a99d825403c65a2caa36f9011125ad9ce

4 years agordbms: ignore DBO_IGNORE if passed into Database::__construct()
Aaron Schulz [Sat, 24 Mar 2018 12:17:12 +0000 (05:17 -0700)]
rdbms: ignore DBO_IGNORE if passed into Database::__construct()

Bug: T189999
Change-Id: I46369709a850acd85fe7d46da554514615f51300

4 years agordbms: add "use" statement for UnexpectedValueExcetion in Database
Aaron Schulz [Sat, 24 Mar 2018 12:16:29 +0000 (05:16 -0700)]
rdbms: add "use" statement for UnexpectedValueExcetion in Database

Change-Id: I90faa511b144f06b06f99828630792d3de21f262

4 years agomediawiki.api.upload: Fix test assumption about <iframe>
Timo Tijhof [Sat, 24 Mar 2018 04:17:42 +0000 (21:17 -0700)]
mediawiki.api.upload: Fix test assumption about <iframe>

This test failed when another iframe exists before the one added
during the test, because it uses $('iframe').prop() to access the
property, which, if matching multiple iframes, will use the first
one on the page.

Make it slightly less bad, by specifying that it should use the
last one instead, given we know that mediawiki/api/upload.js appends
to document.body.

Really, though, it should have a more reliable method of obtaining
the references to these nodes.

Change-Id: I0f0723668fa3366fb8228a7a3e8a4cb03ff87d27

4 years agoMerge "Update OOUI to v0.26.1"
jenkins-bot [Sat, 24 Mar 2018 00:22:10 +0000 (00:22 +0000)]
Merge "Update OOUI to v0.26.1"

4 years agoUpdate OOUI to v0.26.1
James D. Forrester [Fri, 23 Mar 2018 23:55:39 +0000 (16:55 -0700)]
Update OOUI to v0.26.1

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

Depends-On: Ia4bd9eb5c3909fd1fa8b7ee41a0401c328eaecaa
Change-Id: Ia4bd9eb5c3909fd1fa8b7ee41a0401c328eaecab

4 years agoMerge "Localisation updates from https://translatewiki.net."
L10n-bot [Fri, 23 Mar 2018 20:59:26 +0000 (20:59 +0000)]
Merge "Localisation updates from https://translatewiki.net."

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 23 Mar 2018 20:57:10 +0000 (21:57 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I8dece83a516a5d8a87144a2ffba23b0845ff6992

4 years agoFix typo in word visibility
Umherirrender [Fri, 23 Mar 2018 20:18:27 +0000 (21:18 +0100)]
Fix typo in word visibility

Change-Id: Ife02b0a790bc72de0e01ddf89de457ccdd9a7deb

4 years agoMerge "resourceloader: Document 'target' query param in StartupModule"
jenkins-bot [Fri, 23 Mar 2018 18:38:09 +0000 (18:38 +0000)]
Merge "resourceloader: Document 'target' query param in StartupModule"

4 years agoMerge "Improve test coverage for ApiLogin.php"
jenkins-bot [Fri, 23 Mar 2018 17:34:10 +0000 (17:34 +0000)]
Merge "Improve test coverage for ApiLogin.php"

4 years agoFix whitespace trimming in headings
Subramanya Sastry [Wed, 21 Mar 2018 01:01:55 +0000 (20:01 -0500)]
Fix whitespace trimming in headings

b3dd3881 was trimming whitespace in wikitext as well as HTML headings
  whereas the whitespace-trimming proposal was going to leave HTML tags
  untouched.

30495ea1 missed this because coincidentally, the test I added there
  for HTML headings had a typo and used <h2>...<h2> instead of
  <h2>...</h2> which caused the test to magically pass.

* This patch trims whitespace in
  doHeadings (which deals with wikitext headings) instead of
  formatHeadings (which deals with all headings).

* Updated parser tests to account for this.

Change-Id: I854f20b4c39a0a8e03d70155b269de77acf02cae

4 years agoMerge "SECURITY: Fix variable usage in ApiQueryUserContributions"
jenkins-bot [Fri, 23 Mar 2018 15:23:04 +0000 (15:23 +0000)]
Merge "SECURITY: Fix variable usage in ApiQueryUserContributions"

4 years agoSECURITY: Fix variable usage in ApiQueryUserContributions
Brad Jorsch [Fri, 23 Mar 2018 13:31:31 +0000 (09:31 -0400)]
SECURITY: Fix variable usage in ApiQueryUserContributions

$from was being used instead of $fromName in the handling for
ucuserprefix, causing broken SQL.

Bug: T190507
Change-Id: I0759637ea5f35853271167ca0aaaabd3b7ab69f9

4 years agoAdd missing ActorMigration use statement to MediaWikiServices
addshore [Thu, 22 Mar 2018 16:36:25 +0000 (16:36 +0000)]
Add missing ActorMigration use statement to MediaWikiServices

Change-Id: Iee26b383a56085b51455c79a829e75762b7ae78e

4 years agoMerge "Move most User::clearAllNotifications() logic to WatchedItemStore"
jenkins-bot [Fri, 23 Mar 2018 10:58:01 +0000 (10:58 +0000)]
Merge "Move most User::clearAllNotifications() logic to WatchedItemStore"

4 years agoMerge "Uncomment and fix a test"
jenkins-bot [Fri, 23 Mar 2018 10:51:03 +0000 (10:51 +0000)]
Merge "Uncomment and fix a test"

4 years agoMerge "rdbms: remove Database::ignoreErrors()"
jenkins-bot [Fri, 23 Mar 2018 10:34:37 +0000 (10:34 +0000)]
Merge "rdbms: remove Database::ignoreErrors()"

4 years agoMove most User::clearAllNotifications() logic to WatchedItemStore
Aaron Schulz [Fri, 2 Mar 2018 20:42:57 +0000 (12:42 -0800)]
Move most User::clearAllNotifications() logic to WatchedItemStore

Change-Id: Ib1b0c40e408f6fad6fc8257c5073fa1c3c264c3a

4 years agoMerge "mediawiki.language: Implement non-digit-grouping of four-digit numbers"
jenkins-bot [Fri, 23 Mar 2018 10:07:46 +0000 (10:07 +0000)]
Merge "mediawiki.language: Implement non-digit-grouping of four-digit numbers"

4 years agordbms: remove Database::ignoreErrors()
Aaron Schulz [Fri, 23 Mar 2018 10:07:27 +0000 (03:07 -0700)]
rdbms: remove Database::ignoreErrors()

The only caller was reportQueryError(), which did not use it
as a mutator. Make that method use getFlag() directly.

Change-Id: I8e7991f7bd41cdd33a925a55269ce87764c30742

4 years agoMerge "Add missing return types to User::getOption()"
jenkins-bot [Fri, 23 Mar 2018 01:41:28 +0000 (01:41 +0000)]
Merge "Add missing return types to User::getOption()"

4 years agoAdd missing return types to User::getOption()
Sam Wilson [Fri, 23 Mar 2018 01:14:41 +0000 (09:14 +0800)]
Add missing return types to User::getOption()

String zeros are converted to ints, and email-blacklist returns
an array of integers.

Change-Id: I2ac2a4e8effd4816e9c1e835b86241c7fe850605

4 years agoRemove 0.8em default overlay hack
Ed Sanders [Fri, 23 Mar 2018 00:42:46 +0000 (00:42 +0000)]
Remove 0.8em default overlay hack

This fixes the font size on Special:ApiSandbox when expanded.

Change-Id: I72d825f0da014383f5b82272a816f09f41c6027b

4 years agoMerge "rdbms: make getMasterPos() ignore GTIDs outside of gtid_domain_id"
jenkins-bot [Fri, 23 Mar 2018 00:03:20 +0000 (00:03 +0000)]
Merge "rdbms: make getMasterPos() ignore GTIDs outside of gtid_domain_id"

4 years agordbms: make getMasterPos() ignore GTIDs outside of gtid_domain_id
Aaron Schulz [Wed, 7 Feb 2018 10:15:54 +0000 (02:15 -0800)]
rdbms: make getMasterPos() ignore GTIDs outside of gtid_domain_id

* Filter out GTIDs with a domain that is not the one binlog
  events would be written to if the Database handle was given
  write queries. Likewise for the MariaDB server_id component.
* Also improve MySQL GTID support to better match that of MariaDB.
  This covers position retrieval, replication waiting, and ranges
  in GTIDs (which are almost always present).
* Make some MySQLMasterPos variables private by making use of
  accesors instead.
* Store the gtids array keyed by domain ID for convenience.
* Clean up dynamic call to static method.

Change-Id: Ic6ab517bc8f200c968ff892ade69ad1b9394ab21

4 years agoUse OOUI's checkAll instead of doubleCheck from Echo
Ed Sanders [Thu, 22 Mar 2018 22:34:50 +0000 (22:34 +0000)]
Use OOUI's checkAll instead of doubleCheck from Echo

Not least because Echo might not be installed.

Change-Id: I44a439c6b924b8d88585ea7a2e613d505e16724f

4 years agoMerge "User: Fully clear instance variables when loading not-blocked status"
jenkins-bot [Thu, 22 Mar 2018 21:40:07 +0000 (21:40 +0000)]
Merge "User: Fully clear instance variables when loading not-blocked status"

4 years agoMerge "rdbms: IDatabase interface cleanups"
jenkins-bot [Thu, 22 Mar 2018 21:27:08 +0000 (21:27 +0000)]
Merge "rdbms: IDatabase interface cleanups"

4 years agoMerge "mediawiki.ui: Update mw-ui-input padding/line-height to match OOUI"
jenkins-bot [Thu, 22 Mar 2018 21:16:12 +0000 (21:16 +0000)]
Merge "mediawiki.ui: Update mw-ui-input padding/line-height to match OOUI"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 22 Mar 2018 20:53:16 +0000 (21:53 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib6ba336283368bb086c8f1225ac2b7a94b2ec338

4 years agoMerge "rdbms: Add ATOMIC_CANCELABLE flag for micro-optimization"
jenkins-bot [Thu, 22 Mar 2018 19:34:02 +0000 (19:34 +0000)]
Merge "rdbms: Add ATOMIC_CANCELABLE flag for micro-optimization"

4 years agoUser: Fully clear instance variables when loading not-blocked status
Brad Jorsch [Thu, 22 Mar 2018 16:52:59 +0000 (12:52 -0400)]
User: Fully clear instance variables when loading not-blocked status

If a block is deleted and ->clearInstanceCache() is called to try to
make an existing User object reflect that fact, some methods are still
reflecting the old block.

To fix this, User::getBlockedStatus() needs to clear all the relevant
instance variables if the user is found not to be blocked.

Change-Id: I6ad8d5555a4c8519336aded3067e5034831dadf3

4 years agomediawiki.ui: Update mw-ui-input padding/line-height to match OOUI
Ed Sanders [Thu, 22 Mar 2018 18:50:27 +0000 (18:50 +0000)]
mediawiki.ui: Update mw-ui-input padding/line-height to match OOUI

Change-Id: Ic67973f994fd28b1e5f09ddf203a3217a705befb

4 years agordbms: IDatabase interface cleanups
Aaron Schulz [Thu, 22 Mar 2018 15:33:59 +0000 (08:33 -0700)]
rdbms: IDatabase interface cleanups

* Move schema-change related methods listTables(), indexUnique(),
  and fieldInfo() to IMaintainableDatabase
* Deprecate doneWrites()
* Remove reportQueryError() and reportConnectionError(),
  leaving them to Database

Bug: T190396
Change-Id: I96f298d5a6eca67f5a289f205406bf3135ece62d

4 years agoDo not assume rc_patrolled is binary in ChangesListSpecialPage
Amir Sarabadani [Thu, 22 Mar 2018 12:57:28 +0000 (13:57 +0100)]
Do not assume rc_patrolled is binary in ChangesListSpecialPage

Bug: T184791
Change-Id: Idd9fc4b37da2d862f84d3aacd9966872958bc9eb

4 years agordbms: Add ATOMIC_CANCELABLE flag for micro-optimization
Brad Jorsch [Tue, 20 Mar 2018 15:57:04 +0000 (11:57 -0400)]
rdbms: Add ATOMIC_CANCELABLE flag for micro-optimization

Aaron is concerned about the extra time added to atomic sections within
an outer transaction if we do a SAVEPOINT and RELEASE. He wants a flag
so callers have to specifically opt-in to use of savepoints.

Change-Id: I64cf5033ced464863d28dd49d9173856a9c1e1c0

4 years agoresourceloader: Use getRawVal instead of slower getVal in StartupModule
Timo Tijhof [Thu, 22 Mar 2018 03:35:16 +0000 (20:35 -0700)]
resourceloader: Use getRawVal instead of slower getVal in StartupModule

For the same reasons as in ResourceLoaderContext. The only valid values
here are known strings like "desktop" and "mobile". No Language/UTF
normalisation required.

Ensures that Language instance won't get initialised just for this.

Change-Id: If219463d80a66132786710184329388080fbe713

4 years agordbms: Add IDatabase::cancelAtomic()
Brad Jorsch [Sat, 17 Mar 2018 21:59:56 +0000 (17:59 -0400)]
rdbms: Add IDatabase::cancelAtomic()

Atomic sections are currently useful if you want to wrap some SQL
statements in a transaction when you might be called from inside someone
else's transaction, and you expect the caller to roll back everything if
you fail.

But there are some cases where you want to allow the caller to recover
from errors, in which case you need to roll back just the atomic
section. Savepoints are supported by all our databases and can be used
for this purpose, so let's do so.

Bug: T188660
Change-Id: Iee548619df89fd7fbd581b01106b8b41d3df71cc

4 years agoresourceloader: Document 'target' query param in StartupModule
Timo Tijhof [Thu, 22 Mar 2018 03:34:40 +0000 (20:34 -0700)]
resourceloader: Document 'target' query param in StartupModule

Bug: T127268
Change-Id: I38150b2d82420f5058137d611c63e07cbd9c2f96

4 years agoMerge "rdbms: clean up DBO_TRX behavior for onTransactionPreCommitOrIdle()"
jenkins-bot [Thu, 22 Mar 2018 01:07:06 +0000 (01:07 +0000)]
Merge "rdbms: clean up DBO_TRX behavior for onTransactionPreCommitOrIdle()"

4 years agoMerge "rdbms: cleanup runMasterPostTrxCallbacks() transaction check"
jenkins-bot [Thu, 22 Mar 2018 01:05:05 +0000 (01:05 +0000)]
Merge "rdbms: cleanup runMasterPostTrxCallbacks() transaction check"

4 years agoThis patch reduces the edit summary length to 500 characters
Niharika Kohli [Wed, 21 Mar 2018 23:28:11 +0000 (16:28 -0700)]
This patch reduces the edit summary length to 500 characters

Per discussion on ticket.

Bug:T188798
Change-Id: I621a98f4befd70d84f53e3c877314b64f749001c

4 years agoDrop SpecialPageFactory::getList(), deprecated in 1.24
James D. Forrester [Tue, 6 Mar 2018 17:07:47 +0000 (17:07 +0000)]
Drop SpecialPageFactory::getList(), deprecated in 1.24

Change-Id: I41da0683b1dc1e6cd81e1f4f41d1f8b4d8813f85

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 21 Mar 2018 21:16:38 +0000 (22:16 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Iaf3c46a2ead6b5cb3758c5c779b90c213aedfeee

4 years agoMerge "Convert OutputHandler functions to a class"
jenkins-bot [Wed, 21 Mar 2018 20:56:22 +0000 (20:56 +0000)]
Merge "Convert OutputHandler functions to a class"

4 years agoMerge "Clarify -{ => {{ transition"
jenkins-bot [Wed, 21 Mar 2018 20:37:20 +0000 (20:37 +0000)]
Merge "Clarify -{ => {{ transition"

4 years agoMerge "Update OOUI to v0.26.0"
jenkins-bot [Wed, 21 Mar 2018 19:55:47 +0000 (19:55 +0000)]
Merge "Update OOUI to v0.26.0"

4 years agoMerge "exception: Improve formatting of fatal error log messages"
jenkins-bot [Wed, 21 Mar 2018 19:52:37 +0000 (19:52 +0000)]
Merge "exception: Improve formatting of fatal error log messages"

4 years agoMerge "rdbms: fix bogus $fname parameter in LoadMonitorMySQL"
jenkins-bot [Wed, 21 Mar 2018 19:39:25 +0000 (19:39 +0000)]
Merge "rdbms: fix bogus $fname parameter in LoadMonitorMySQL"

4 years agoexception: Improve formatting of fatal error log messages
Gergő Tisza [Fri, 16 Mar 2018 02:40:07 +0000 (19:40 -0700)]
exception: Improve formatting of fatal error log messages

Use human-readable stack trace instead of array dump,
try to display the URL and the request ID, use the same
message format as exceptions,

Bug: T189851
Change-Id: I3edf2dbd5639ceecc668719c065ecdce33157ff5