lhc/web/wiklou.git
4 years agoMerge "Add semantic tags to license info text"
jenkins-bot [Fri, 5 Jan 2018 23:57:59 +0000 (23:57 +0000)]
Merge "Add semantic tags to license info text"

4 years agoMake FormatMetadata::flattenArrayReal() work for an associative array
Mark A. Hershberger [Fri, 5 Jan 2018 00:55:40 +0000 (19:55 -0500)]
Make FormatMetadata::flattenArrayReal() work for an associative array

Bug: T87572
Change-Id: I19490ebbbdc3613ae2116c6890ca470bb9f332db

4 years agoMerge "RCLFilters: reword target placeholder"
jenkins-bot [Fri, 5 Jan 2018 17:18:46 +0000 (17:18 +0000)]
Merge "RCLFilters: reword target placeholder"

4 years agoMerge "Introduce DB schema overrides for unit tests."
jenkins-bot [Fri, 5 Jan 2018 16:43:30 +0000 (16:43 +0000)]
Merge "Introduce DB schema overrides for unit tests."

4 years agoMerge "Set a default delimiter in Database::sourceStream"
jenkins-bot [Fri, 5 Jan 2018 16:42:44 +0000 (16:42 +0000)]
Merge "Set a default delimiter in Database::sourceStream"

4 years agoIntroduce DB schema overrides for unit tests.
daniel [Thu, 16 Nov 2017 16:48:25 +0000 (17:48 +0100)]
Introduce DB schema overrides for unit tests.

This introduces MediaWikiTestCase::getSchemaOverrides,  which can be overwritten
to return information about which tables are going to be altered, and which SQL
files should be used to set up the target schema. This allows tests for a class
that interacts with the database can have a subclass for each supported database
schema.

NOTE: this has only been tested with MySQL.

Bug: T180705
Change-Id: I7a4071072d802a82ecf7d16fbf8882ff8c79287f

4 years agoSet a default delimiter in Database::sourceStream
addshore [Fri, 5 Jan 2018 15:37:30 +0000 (15:37 +0000)]
Set a default delimiter in Database::sourceStream

Discovered while debugging I7a4071072d802a82ecf7d16fbf8882ff8c79287f

DatabaseIntegration test alters the delimiter for the database instance
and it never gets set back.
Simply set the delimiter back to a default value at the start of
sourceSteam (for each new file pointer) which could have a new
delimiter.

Change-Id: Ib829b1c8d87271526fa6826910d40c304c778b32

4 years agoMerge "Remove duplicate names from CREDITS"
jenkins-bot [Fri, 5 Jan 2018 12:45:35 +0000 (12:45 +0000)]
Merge "Remove duplicate names from CREDITS"

4 years agoRCLFilters: reword target placeholder
Stephane Bisson [Fri, 5 Jan 2018 11:29:18 +0000 (06:29 -0500)]
RCLFilters: reword target placeholder

Bug: T172161
Change-Id: I8af648794cf7972efdbb1543665295d8f1368a4b

4 years agoMerge "[MCR] Tests for WikiPage::doUpdateRestrictions"
jenkins-bot [Fri, 5 Jan 2018 10:24:19 +0000 (10:24 +0000)]
Merge "[MCR] Tests for WikiPage::doUpdateRestrictions"

4 years agoMerge "Localisation updates from https://translatewiki.net."
L10n-bot [Fri, 5 Jan 2018 07:35:08 +0000 (07:35 +0000)]
Merge "Localisation updates from https://translatewiki.net."

4 years agoMerge "Localisation updates from https://translatewiki.net."
L10n-bot [Fri, 5 Jan 2018 07:34:59 +0000 (07:34 +0000)]
Merge "Localisation updates from https://translatewiki.net."

4 years agoUpdate nikic/php-parser to 3.1.3
Kunal Mehta [Thu, 4 Jan 2018 08:18:30 +0000 (00:18 -0800)]
Update nikic/php-parser to 3.1.3

And fix the only incompatibility in findDeprecated.php. It's OK to throw
exceptions on invalid files since we lint all PHP files so there
should be no invalid ones.

Change-Id: Ie5913c2aae4b521a4b6f805e911e4e2764386b45

4 years agoMerge "Added Tests for ListToggle"
jenkins-bot [Fri, 5 Jan 2018 00:53:45 +0000 (00:53 +0000)]
Merge "Added Tests for ListToggle"

4 years agoMerge "rdbms: Remove unused setServerInfo/getServerInfo methods from LoadBalancer"
jenkins-bot [Thu, 4 Jan 2018 23:49:41 +0000 (23:49 +0000)]
Merge "rdbms: Remove unused setServerInfo/getServerInfo methods from LoadBalancer"

4 years agordbms: Remove unused setServerInfo/getServerInfo methods from LoadBalancer
Aaron Schulz [Thu, 4 Jan 2018 18:28:31 +0000 (10:28 -0800)]
rdbms: Remove unused setServerInfo/getServerInfo methods from LoadBalancer

Change-Id: Iffb99c96ca77957a81f1cb8d1e6ae5b1c198e3f5

4 years agoMerge "Fix Maintenance::output when called very early"
jenkins-bot [Thu, 4 Jan 2018 23:35:55 +0000 (23:35 +0000)]
Merge "Fix Maintenance::output when called very early"

4 years agoFix Maintenance::output when called very early
Marius Hoch [Thu, 4 Jan 2018 23:19:55 +0000 (00:19 +0100)]
Fix Maintenance::output when called very early

If a maintenance script is called with --help (or without
required args), this is currently failing, as MediaWikiServices
is only loaded after Maintenance::setup is initially called.
Follows 336454104d1249439e3ff97746de69c5e7b4a5f9.

Change-Id: Ied283d362675b6b98bd3144132a240b432998991

4 years agoAdded Tests for ListToggle
ryan10145 [Thu, 4 Jan 2018 02:41:02 +0000 (21:41 -0500)]
Added Tests for ListToggle

Bug: T183898
Change-Id: I1c6cd8ea21127db56701cc6073fa880b2180d846

4 years agoUse namespaced version of IDatabase
Umherirrender [Thu, 4 Jan 2018 22:18:55 +0000 (23:18 +0100)]
Use namespaced version of IDatabase

Change-Id: I49c9b462d316763f90ebf5a95caa388716d6a278

4 years agoMerge "Moved textbox1 building into TextConflictHelper on edit conflicts"
jenkins-bot [Thu, 4 Jan 2018 21:56:45 +0000 (21:56 +0000)]
Merge "Moved textbox1 building into TextConflictHelper on edit conflicts"

4 years agoFollow-up 6f07389ef2eb: fix variable name
Roan Kattouw [Thu, 4 Jan 2018 20:27:11 +0000 (21:27 +0100)]
Follow-up 6f07389ef2eb: fix variable name

Caused Notice: Undefined variable: text

Bug: T184123
Change-Id: I950a02134b145a2928af33995ca37a6965f265e4

4 years agoMerge "Cleanup live update feature flag and FilterWrapperWidget"
jenkins-bot [Thu, 4 Jan 2018 21:31:20 +0000 (21:31 +0000)]
Merge "Cleanup live update feature flag and FilterWrapperWidget"

4 years agoMerge "Remove deprecated back-compat HtmlFormatter class"
jenkins-bot [Thu, 4 Jan 2018 21:14:12 +0000 (21:14 +0000)]
Merge "Remove deprecated back-compat HtmlFormatter class"

4 years agoMerge "Add tests for ApiFormatRaw"
jenkins-bot [Thu, 4 Jan 2018 21:05:29 +0000 (21:05 +0000)]
Merge "Add tests for ApiFormatRaw"

4 years agoMerge "Add tests for ApiFormatBase"
jenkins-bot [Thu, 4 Jan 2018 21:01:12 +0000 (21:01 +0000)]
Merge "Add tests for ApiFormatBase"

4 years agoMerge "Add some @noinspection flags to doPostOutputShutdown()"
jenkins-bot [Thu, 4 Jan 2018 19:45:52 +0000 (19:45 +0000)]
Merge "Add some @noinspection flags to doPostOutputShutdown()"

4 years agoMoved textbox1 building into TextConflictHelper on edit conflicts
WMDE-Fisch [Wed, 6 Dec 2017 14:25:39 +0000 (15:25 +0100)]
Moved textbox1 building into TextConflictHelper on edit conflicts

Factored out some minor parts about building editor CSS classes.

getEditConflictMainTextBox() mainly mirrors showTextbox1 parts not
included were moved to the EditPage.

Change-Id: I671e095acc08382dd0a1c3d167fdaaa623ec5499

4 years agoAdd tests for ApiFormatRaw
Phantom42 [Mon, 1 Jan 2018 19:36:09 +0000 (21:36 +0200)]
Add tests for ApiFormatRaw

Bug: T183767
Change-Id: I63ce42dd61f6e47f7278c436cad1e4f05e287b04

4 years agoMerge "[MCR] fix RevisionStore::checkDatabaseWikiId for DB names with dashes."
jenkins-bot [Thu, 4 Jan 2018 17:27:45 +0000 (17:27 +0000)]
Merge "[MCR] fix RevisionStore::checkDatabaseWikiId for DB names with dashes."

4 years ago[MCR] fix RevisionStore::checkDatabaseWikiId for DB names with dashes.
addshore [Wed, 3 Jan 2018 14:42:13 +0000 (14:42 +0000)]
[MCR] fix RevisionStore::checkDatabaseWikiId for DB names with dashes.

This is a quick hack, for a proper solution see I6a98684af1d7

Bug: T183914
Change-Id: I45a151a332145438c484e02bbe96cd85dd602b9e

4 years ago[MCR] Tests for WikiPage::doUpdateRestrictions
addshore [Mon, 4 Dec 2017 18:23:17 +0000 (19:23 +0100)]
[MCR] Tests for WikiPage::doUpdateRestrictions

Bug: T180989
Change-Id: I75518d5ba34119e88e3e382523583fa8b65bc730

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 4 Jan 2018 08:56:38 +0000 (09:56 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I29c4edce7d71ca01d6eb9e20fc1640b873341b3c

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 4 Jan 2018 08:37:20 +0000 (09:37 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I91c811ecdae3a1b5fded9488f7577d219be82e28

4 years agoRemove deprecated back-compat HtmlFormatter class
Kunal Mehta [Thu, 4 Jan 2018 08:21:05 +0000 (00:21 -0800)]
Remove deprecated back-compat HtmlFormatter class

Change-Id: I9325ae046997812c607e93896e108053edca76d5

4 years agoMerge "ApiComparePages: Add 'fromsection' and 'tosection' parameters"
jenkins-bot [Thu, 4 Jan 2018 07:01:31 +0000 (07:01 +0000)]
Merge "ApiComparePages: Add 'fromsection' and 'tosection' parameters"

4 years agoBump dev dependency composer/spdx-licenses to 1.2.0
Kunal Mehta [Wed, 3 Jan 2018 20:32:07 +0000 (12:32 -0800)]
Bump dev dependency composer/spdx-licenses to 1.2.0

Notably, this includes support for SPDX 3.0.

https://github.com/composer/spdx-licenses/compare/1.1.4...1.2.0

Deprecated license identifiers will still be accepted, but in the future we
can start warning that they are deprecated.

Bug: T183858
Change-Id: I819ce40f24d8447a20c266b2f1fa454e966dd5a5

4 years agoMerge "HTMLTextAreaField: Add 'useeditfont' param"
jenkins-bot [Wed, 3 Jan 2018 21:18:11 +0000 (21:18 +0000)]
Merge "HTMLTextAreaField: Add 'useeditfont' param"

4 years agoHTMLTextAreaField: Add 'useeditfont' param
Ed Sanders [Wed, 3 Jan 2018 17:31:34 +0000 (17:31 +0000)]
HTMLTextAreaField: Add 'useeditfont' param

Change-Id: I7c76e911b4d71842b49272186e880051eee8de2b

4 years agoAdd tests for ApiFormatBase
Brad Jorsch [Wed, 3 Jan 2018 18:27:37 +0000 (13:27 -0500)]
Add tests for ApiFormatBase

Ensuring proper behavior of the base class lets comprehensive tests of
subclasses be simpler.

This also adjusts ApiFormatTestBase to be a bit more usable, passing an
array of options through to encodeData() instead of just a class name.
And removes the unused 'SKIP' from testGeneralEncoding, but allows
expecting an exception (for use in I63ce42dd).

Change-Id: Ib2a1fa0b04860b09105376881ff8411f9534c453

4 years agoMerge "Fix RepoGroup caching bug"
jenkins-bot [Wed, 3 Jan 2018 20:55:44 +0000 (20:55 +0000)]
Merge "Fix RepoGroup caching bug"

4 years agoMerge "Mark DBError as runtime exception"
jenkins-bot [Wed, 3 Jan 2018 20:51:55 +0000 (20:51 +0000)]
Merge "Mark DBError as runtime exception"

4 years agoMerge "Put menus/popups of infused PHP widgets into the default overlay"
jenkins-bot [Wed, 3 Jan 2018 20:24:55 +0000 (20:24 +0000)]
Merge "Put menus/popups of infused PHP widgets into the default overlay"

4 years agoFix typo in PostgresUpdater in I30a3a983
Brad Jorsch [Wed, 3 Jan 2018 19:04:59 +0000 (14:04 -0500)]
Fix typo in PostgresUpdater in I30a3a983

Bug: T174028
Change-Id: I916c8e693e477e03295a2224320eb94599c34d65

4 years agoMerge "Allow programmatic input in Command"
MaxSem [Wed, 3 Jan 2018 17:22:28 +0000 (17:22 +0000)]
Merge "Allow programmatic input in Command"

4 years agoAllow programmatic input in Command
Gergő Tisza [Fri, 22 Dec 2017 02:07:36 +0000 (02:07 +0000)]
Allow programmatic input in Command

Bug: T182463
Change-Id: Ib68180c7af12558686f4864c24fd85f01201d6fb

4 years agoMerge "Add message to the assert of ApiClearHasMsgTest"
jenkins-bot [Wed, 3 Jan 2018 16:08:54 +0000 (16:08 +0000)]
Merge "Add message to the assert of ApiClearHasMsgTest"

4 years agoAdd semantic tags to license info text
Lucas Werkmeister [Fri, 22 Dec 2017 14:46:30 +0000 (15:46 +0100)]
Add semantic tags to license info text

Surround uppercased parts of the text in emphasis or strong importance
tags, and then change the style of those tags to remove their special
font weight or style. In normal browsers, there should be no visible
difference, but other user agents might be able to utilize the
additional semantic information.

Change-Id: Ief505e28fe971da537726afd75238b87204b85dd

4 years agoDisplay the file sha1 value in the file info page
RazeSoldier [Fri, 29 Dec 2017 14:03:55 +0000 (22:03 +0800)]
Display the file sha1 value in the file info page

When a visitor accesses an info page of an existing file, base-36 sha1 value of this file will displayed in the table of basic information.

Bug: T181651
Change-Id: Ib8cae3e4070a186e28e8625556d3c510af0701c2

4 years agoAdd message to the assert of ApiClearHasMsgTest
Phantom42 [Wed, 3 Jan 2018 02:26:48 +0000 (04:26 +0200)]
Add message to the assert of ApiClearHasMsgTest

This adds 'sanity check' message for one of asserts so it is more
clear that it is asserting a precondition.

Change-Id: I10d36c1bf69effd7bd83f4a2259144e9f6e114fc

4 years agoFix RepoGroup caching bug
Gergő Tisza [Wed, 3 Jan 2018 02:19:58 +0000 (18:19 -0800)]
Fix RepoGroup caching bug

'bypassCache' was renamed in I9f79e5942ced4ae13ba4de0b4c62908cc746e777
to 'latest' but the cache bypass code was not updated.

Also fix an unrelated phpdoc error.

Change-Id: I141b97300853c60092363a90af063c3fd4941d27

4 years agoMark DBError as runtime exception
Gergő Tisza [Tue, 2 Jan 2018 22:07:28 +0000 (14:07 -0800)]
Mark DBError as runtime exception

Some tools (e.g. PHPStorm) can trace exceptions through the
call tree and show warnings when a call can throw an exception which
is neither handled nor acknowledged via @throws annotation.
This is quite useful but currently too noisy to use due to all methods
involving some kind of DB interaction potentially throwing a DBError.
To avoid false warnings, make DBError inherit from RuntimeException
to signal it to such tools that it is not meant to be handled.

Change-Id: I847d258791b128547e10672c5e06a9ce18458371

4 years agoConvert Preferences class into PreferencesFactory service
Sam Wilson [Tue, 7 Nov 2017 03:10:14 +0000 (11:10 +0800)]
Convert Preferences class into PreferencesFactory service

This deprecates the Preferences class and replaces it with
a PreferencesFactory service. Basically, all code from Preferences
is moved into DefaultPreferencesFactory. All Prefereces methods
are now either shims calling DefaultPreferencesFactory or just
throw exceptions.

Bug: T178449
Change-Id: Id0b2db0c2de0890f6e1609a9a0dca207c4600f99

4 years agoMerge "Add test for DBConnRef"
jenkins-bot [Tue, 2 Jan 2018 22:48:46 +0000 (22:48 +0000)]
Merge "Add test for DBConnRef"

4 years agoPut menus/popups of infused PHP widgets into the default overlay
Bartosz Dziewoński [Tue, 2 Jan 2018 22:25:01 +0000 (23:25 +0100)]
Put menus/popups of infused PHP widgets into the default overlay

With some special tweaks:
* Remove weird custom overlay handling in DateInputWidget that nobody
  actually used. I think if you need something special like that, you
  can just write two lines of JS code to attach the dropdown elsewhere.
* Also handle the CapsuleMultiselectWidget produced by HTMLForm's
  'multiselect' field in the same way.

Bug: T183069
Change-Id: I693f406194aeb826a3ab5bc78c97015b0b8a7fdb

4 years agoRemove duplicate names from CREDITS
Umherirrender [Tue, 2 Jan 2018 21:57:38 +0000 (22:57 +0100)]
Remove duplicate names from CREDITS

- "Michael M." was added manually, "Schnark" came from git log - see
https://phabricator.wikimedia.org/p/Schnark/ for the connection of both
names
- same email address, already in .mailmap
 - "victorbarbu" in Ib031bef17c8a7d708a5c7878e74967d19217bbc8
 - "Victor Barbu" in I5285dbfc47d6429e16b7e7839bf55d48320d0bf0
- same email address, added to mailmap
 - matejsuchanek in I4ef06d781bcb1aa0bc7b6d27c27cfde98390a367
 - Matěj Suchánek in Ib888634af281fc2347eaa389db4141782a98c15c

Change-Id: Ibc784dca10c9f74918daf1c3940f3cd17de1deda

4 years agoOOjs UI: Fix font size for default overlay
Bartosz Dziewoński [Thu, 14 Dec 2017 01:29:19 +0000 (02:29 +0100)]
OOjs UI: Fix font size for default overlay

Menus/popups inside the default overlay suffer from the same issue as
dialogs, as described in the comment here.

Bug: T183069
Depends-On: Ied0541209c4a9d7bf8c0574b0a864ba09fff1b70
Change-Id: I53888581f9e1da3b036166613c46cbc1085aa55e

4 years agoMerge "Update OOjs UI to v0.24.4"
jenkins-bot [Tue, 2 Jan 2018 21:15:43 +0000 (21:15 +0000)]
Merge "Update OOjs UI to v0.24.4"

4 years agoFollow-up Ic67a6f1af: RCFilters: Untypo the recurring namespaces typo
Moriel Schottlender [Tue, 2 Jan 2018 20:23:25 +0000 (12:23 -0800)]
Follow-up Ic67a6f1af: RCFilters: Untypo the recurring namespaces typo

The param name is namespace, not namespaces. Do keep up, Schottlender.

Bug: T183910
Change-Id: Ib14a3918a85c22ddd2121c8dcc709ab53b5ff63f

4 years agoUpdate OOjs UI to v0.24.4
Bartosz Dziewoński [Tue, 2 Jan 2018 20:02:12 +0000 (21:02 +0100)]
Update OOjs UI to v0.24.4

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

Depends-On: Ia54fb8fddc159f1612ca3038cdbd7da63935aa83
Change-Id: I3e59bf24191ddb753602cd4221fe998b53d25d8c

4 years agoMerge "MCR database schema"
jenkins-bot [Tue, 2 Jan 2018 19:17:04 +0000 (19:17 +0000)]
Merge "MCR database schema"

4 years agoRCFilters: Correct looking for items in namespace group
Moriel Schottlender [Tue, 2 Jan 2018 18:29:03 +0000 (10:29 -0800)]
RCFilters: Correct looking for items in namespace group

To look for the namespace items, we either search for things in the
'namesapces' view (plural) or the 'namespace' group (singular) so
the code had a typo. This is a recurring typo, but overall, it makes
more sense to look for items in the **group** of namespaces rather
than in the namespace view, conceptually.

Bug: T183910
Change-Id: Ic67a6f1afd3e95fe776fbc5c33ecb7af737055b4

4 years agoMerge "Expand templates: Change 'text' to 'wikitext'"
jenkins-bot [Tue, 2 Jan 2018 18:14:07 +0000 (18:14 +0000)]
Merge "Expand templates: Change 'text' to 'wikitext'"

4 years agoMerge "Expand templates: Use editfont on wikitext inputs"
jenkins-bot [Tue, 2 Jan 2018 18:12:48 +0000 (18:12 +0000)]
Merge "Expand templates: Use editfont on wikitext inputs"

4 years agoPass $title to RevisionStore in Revision::newFromArchiveRow
addshore [Tue, 2 Jan 2018 17:04:51 +0000 (17:04 +0000)]
Pass $title to RevisionStore in Revision::newFromArchiveRow

Follow up to:
I60568b8ffd22d5e3f861c03b4b8ef14332e9015b

Change-Id: Icab36eecbaa2fdbc8832f2563786c0041930b608

4 years agoSync up with Parsoid parserTests.txt
Arlo Breault [Tue, 2 Jan 2018 15:39:45 +0000 (10:39 -0500)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit 28d7734fa2385a8fa599e3ce1bfbcd8582c05bc4

Change-Id: Iee7f3f0022c9c770c1a02b401699df0915ea7c86

4 years agoAdd test for DBConnRef
daniel [Tue, 2 Jan 2018 14:25:17 +0000 (15:25 +0100)]
Add test for DBConnRef

Change-Id: I510b2ed22b3866392592a5df53aa0f3ff6aab750

4 years agoMerge "Fix border colour used for textarea"
jenkins-bot [Tue, 2 Jan 2018 14:16:34 +0000 (14:16 +0000)]
Merge "Fix border colour used for textarea"

4 years agoFix border colour used for textarea
Ed Sanders [Tue, 2 Jan 2018 13:36:56 +0000 (13:36 +0000)]
Fix border colour used for textarea

Prevents FOUC when WikiEditor finishes loading.

Change-Id: Ib3610939cdb4b6a65f702688de9852a203ad6bab

4 years agoExpand templates: Change 'text' to 'wikitext'
Ed Sanders [Mon, 1 Jan 2018 14:02:34 +0000 (14:02 +0000)]
Expand templates: Change 'text' to 'wikitext'

Change-Id: Idbddadc7187bbfe6214f313ac0205184bceb2d23

4 years agoExpand templates: Use editfont on wikitext inputs
Ed Sanders [Mon, 1 Jan 2018 14:01:38 +0000 (14:01 +0000)]
Expand templates: Use editfont on wikitext inputs

Change-Id: Ie8919b4d5caf13749d81b419aff276f7c57d7049

4 years agoMerge "Add @covers tags for more tests"
jenkins-bot [Tue, 2 Jan 2018 12:19:02 +0000 (12:19 +0000)]
Merge "Add @covers tags for more tests"

4 years agoMerge "HooksTest: Covers Hooks::callHook too"
jenkins-bot [Tue, 2 Jan 2018 11:55:26 +0000 (11:55 +0000)]
Merge "HooksTest: Covers Hooks::callHook too"

4 years agoAdd @covers tags for more tests
Kunal Mehta [Fri, 29 Dec 2017 23:44:13 +0000 (15:44 -0800)]
Add @covers tags for more tests

Change-Id: If2254b3a9e61e056091779a1ea14237aa7b42eb6

4 years agoGeneralize non-digit-grouping of four-digit numbers
Bartosz Dziewoński [Tue, 10 Oct 2017 18:51:50 +0000 (20:51 +0200)]
Generalize non-digit-grouping of four-digit numbers

In some languages it's conventional not to insert a thousands
separator in numbers that are four digits long (1000-9999).
Rather than copy-paste the custom code to do this between 13 files,
introduce another option and have the base Language class handle it.

This also fixes an issue in several languages where this logic
previously would not work for negative or fractional numbers.

To implement this, a new option is added to MessagesXx.php files,
`$minimumGroupingDigits = 2;`, with the meaning as defined in
<http://unicode.org/reports/tr35/tr35-numbers.html>. It is a little
roundabout, but it could allow us to migrate the number formatting
(currently all custom code) to some generic library easily.

Bug: T177846
Change-Id: Iedd8de5648cf2de1c94044918626de2f96365d48

4 years agoMerge "build: Updating mediawiki/mediawiki-codesniffer to 15.0.0"
jenkins-bot [Tue, 2 Jan 2018 10:12:26 +0000 (10:12 +0000)]
Merge "build: Updating mediawiki/mediawiki-codesniffer to 15.0.0"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 2 Jan 2018 08:42:01 +0000 (09:42 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I4e4a02ce4bfd4b5a73d87c57b3a9e8ef12db5087

4 years agoHooksTest: Covers Hooks::callHook too
Kunal Mehta [Tue, 2 Jan 2018 08:19:21 +0000 (00:19 -0800)]
HooksTest: Covers Hooks::callHook too

Change-Id: Id2b97b031b2fcf82a6fba66dae353db1acf340c3

4 years agoMerge "Chinese Conversion Table Update 2017-6"
jenkins-bot [Tue, 2 Jan 2018 07:21:52 +0000 (07:21 +0000)]
Merge "Chinese Conversion Table Update 2017-6"

4 years agoMerge "Add test for ApiClearHasMsg"
jenkins-bot [Tue, 2 Jan 2018 05:28:44 +0000 (05:28 +0000)]
Merge "Add test for ApiClearHasMsg"

4 years agoAdd test for ApiClearHasMsg
Phantom42 [Tue, 2 Jan 2018 02:58:08 +0000 (04:58 +0200)]
Add test for ApiClearHasMsg

Bug: T183769
Change-Id: I60c66a7cddaf03a83afd29e536281916ef3eb6d5

4 years agoBump RemexHTML version to 1.0.2
Subramanya Sastry [Tue, 2 Jan 2018 00:54:43 +0000 (18:54 -0600)]
Bump RemexHTML version to 1.0.2

Depends-On: I9fb9978c69f37bafc0049cd7ed343c033dd50ef8
Change-Id: I25bfac2c71b50db8d64f29f4b84af0a2732f245b

4 years agobuild: Updating mediawiki/mediawiki-codesniffer to 15.0.0
Umherirrender [Mon, 1 Jan 2018 13:10:16 +0000 (14:10 +0100)]
build: Updating mediawiki/mediawiki-codesniffer to 15.0.0

Clean up use of @codingStandardsIgnore
- @codingStandardsIgnoreFile -> phpcs:ignoreFile
- @codingStandardsIgnoreLine -> phpcs:ignore
- @codingStandardsIgnoreStart -> phpcs:disable
- @codingStandardsIgnoreEnd -> phpcs:enable

For phpcs:disable always the necessary sniffs are provided.
Some start/end pairs are changed to line ignore

Change-Id: I92ef235849bcc349c69e53504e664a155dd162c8

4 years agoUse MediaWikiCoversValidator for tests that don't use MediaWikiTestCase
Kunal Mehta [Fri, 29 Dec 2017 23:22:37 +0000 (15:22 -0800)]
Use MediaWikiCoversValidator for tests that don't use MediaWikiTestCase

Change-Id: I8c4de7e9c72c9969088666007b54c6fd23f6cc13

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 1 Jan 2018 07:43:44 +0000 (08:43 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib05ba7e02b1e4fdc06ebdc819f076106ad835d0c

4 years agoMerge "Add tests for ApiCheckToken"
jenkins-bot [Mon, 1 Jan 2018 01:18:52 +0000 (01:18 +0000)]
Merge "Add tests for ApiCheckToken"

4 years agoAdd tests for ApiCheckToken
Phantom42 [Sun, 31 Dec 2017 20:16:17 +0000 (22:16 +0200)]
Add tests for ApiCheckToken

Bug: T183768
Change-Id: I63ab0413252c7333f73b881995869454c4881a57

4 years agoMerge "Revision: Handle all return values of Title::newFromId"
jenkins-bot [Mon, 1 Jan 2018 00:05:25 +0000 (00:05 +0000)]
Merge "Revision: Handle all return values of Title::newFromId"

4 years agoRevision: Handle all return values of Title::newFromId
Sam Smith [Wed, 27 Dec 2017 14:17:04 +0000 (14:17 +0000)]
Revision: Handle all return values of Title::newFromId

In Revision::getKnownCurrent, fail early when Title::newFromId returns
null to avoid an uncatchable fatal error being triggered.

RevisionStore#getKnownCurrentRevision requires that the title parameter
be an instance of Title.

This follows on from Ia4c20a91.

Change-Id: I9bddafcc5df630d1dff1e2526194186cab7097e5

4 years agoFix typo in word "callback"
Umherirrender [Sun, 31 Dec 2017 12:35:10 +0000 (13:35 +0100)]
Fix typo in word "callback"

Change-Id: If47b9d80df4189317ec41998b35546a6118288c2

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 31 Dec 2017 08:14:59 +0000 (09:14 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I7a68758df8af2b9ffdf0e8d5a2c84fdbae221b9d

4 years agoMerge "Remove self-explaining "section heading" comments from classes"
jenkins-bot [Sat, 30 Dec 2017 21:25:14 +0000 (21:25 +0000)]
Merge "Remove self-explaining "section heading" comments from classes"

4 years agoParser: extract $title, follow-up 3d560be428
Kunal Mehta [Sat, 30 Dec 2017 10:32:06 +0000 (02:32 -0800)]
Parser: extract $title, follow-up 3d560be428

In the conversion away from extract(), the $title variable was missed. This
broke LabeledSectionTransclusion.

Change-Id: If4c140aedf16fc16a4ae2361f465798055748255

4 years agoApiComparePages: Add 'fromsection' and 'tosection' parameters
Brad Jorsch [Sat, 30 Dec 2017 17:59:26 +0000 (12:59 -0500)]
ApiComparePages: Add 'fromsection' and 'tosection' parameters

The deprecated diffing in prop=revisions and such used a 'rvsection'
parameter. To enable migration of things using that, action=compare
needs corresponding section parameters.

Bug: T183823
Change-Id: If1a0e2df614c083b37640418c69cca367ce0e895

4 years agoMerge "Improve (weak and strict) type hints invarious places"
jenkins-bot [Sat, 30 Dec 2017 17:10:58 +0000 (17:10 +0000)]
Merge "Improve (weak and strict) type hints invarious places"

4 years agoMerge "Decapitalise services folder in tests/phpunit"
jenkins-bot [Sat, 30 Dec 2017 10:42:38 +0000 (10:42 +0000)]
Merge "Decapitalise services folder in tests/phpunit"

4 years agoMerge "Append leading \ to BlobStoreFactoryTest covers"
jenkins-bot [Sat, 30 Dec 2017 08:37:47 +0000 (08:37 +0000)]
Merge "Append leading \ to BlobStoreFactoryTest covers"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 30 Dec 2017 08:12:23 +0000 (09:12 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I38e3c7018119fe60f30e1f0830eea7508d0061d5

4 years agoAppend leading \ to BlobStoreFactoryTest covers
Reedy [Sat, 30 Dec 2017 05:02:03 +0000 (05:02 +0000)]
Append leading \ to BlobStoreFactoryTest covers

Change-Id: I9b85aa9808c40aa728c6ef186c50bc8cdda08bc6

4 years agoTry to opportunistically flush statsd data in maintenance scripts
Aaron Schulz [Sat, 2 Dec 2017 21:12:41 +0000 (13:12 -0800)]
Try to opportunistically flush statsd data in maintenance scripts

This helps to avoid OOMs from buffer build-ups in the statsd
factory object. This piggy-backs on to the same checks used
for deferred update runs. In addition, the output() method
checks if the data size is getting large and emits if needed.

Bug: T181385
Change-Id: I598be98a5770f8358975815e51380c4b8f63a79e