4 years agoMerge "HTMLTextField: Pass extra parameters in OOUI mode"
jenkins-bot [Wed, 12 Sep 2018 22:10:08 +0000 (22:10 +0000)]
Merge "HTMLTextField: Pass extra parameters in OOUI mode"

4 years agoHTMLTextField: Pass extra parameters in OOUI mode
Bartosz Dziewoński [Wed, 12 Sep 2018 20:09:47 +0000 (22:09 +0200)]
HTMLTextField: Pass extra parameters in OOUI mode

Some additional parameters that are passed through as attributes in
HTML mode were not being passed through as config options in OOUI mode:
* 'min'
* 'max'
* 'step'
* 'title'

Some have no equivalent in OOUI:
* 'pattern'
* 'list'
* 'multiple'

Also note that we support some OOUI config options that have no
equivalent in HTML:
* 'autosize'
* 'flags'
* 'indicator'

I originally noticed the problem with the 'min' and 'max' params,
which are clearly missing in OOUI preferences for RC and watchlist.
I don't know if anything anywhere actually uses the other ones.

Bug: T181844
Change-Id: I2d22ef3b08b7f0b4283b644d80bd74906177d089

4 years agoMerge "Add part to update ctd_user_defined in populateChangeTagDef"
jenkins-bot [Wed, 12 Sep 2018 19:32:00 +0000 (19:32 +0000)]
Merge "Add part to update ctd_user_defined in populateChangeTagDef"

4 years agoMerge "Set MCR migration stage to write-both/read-new AGAIN."
jenkins-bot [Wed, 12 Sep 2018 18:27:12 +0000 (18:27 +0000)]
Merge "Set MCR migration stage to write-both/read-new AGAIN."

4 years agoMerge "Reset services in ParserTestTopLevelSuite."
jenkins-bot [Wed, 12 Sep 2018 18:26:00 +0000 (18:26 +0000)]
Merge "Reset services in ParserTestTopLevelSuite."

4 years agoMerge "foreign-resources.yaml: Fix some documentation typos"
jenkins-bot [Wed, 12 Sep 2018 17:59:54 +0000 (17:59 +0000)]
Merge "foreign-resources.yaml: Fix some documentation typos"

4 years agoMerge "Make the spelling and pluralization of "Active filters" consistent"
jenkins-bot [Wed, 12 Sep 2018 17:58:18 +0000 (17:58 +0000)]
Merge "Make the spelling and pluralization of "Active filters" consistent"

4 years agoSet MCR migration stage to write-both/read-new AGAIN.
daniel [Tue, 11 Sep 2018 17:58:00 +0000 (19:58 +0200)]
Set MCR migration stage to write-both/read-new AGAIN.

This is a re-submit of the config change at the heart of I15989adae2b5
which got reverted in I5426b5efd0 dues to T204065.

Bug: T198561
Change-Id: I7a85d0c4d8288df061841c9144d895af1318dc45

4 years agoReset services in ParserTestTopLevelSuite.
daniel [Tue, 11 Sep 2018 17:01:08 +0000 (19:01 +0200)]
Reset services in ParserTestTopLevelSuite.

This is intended to isolate parser tests from other tests
by resetting the service locator between test runs, just like
MediaWikiTestCase does.

NOTE: this has no effect on parser tests run via parserTest.php,
it's only for tests run via PHPUnit.

Bug: T204065
Bug: T204072
Change-Id: I772b3b4a2d4d98948a249603b1cdb0933427b01c

4 years agoMerge "RCFilters: Replace deprecated 'advanced' by renamed to 'settings' icon"
jenkins-bot [Wed, 12 Sep 2018 16:49:20 +0000 (16:49 +0000)]
Merge "RCFilters: Replace deprecated 'advanced' by renamed to 'settings' icon"

4 years agoforeign-resources.yaml: Fix some documentation typos
Bartosz Dziewoński [Wed, 12 Sep 2018 16:13:53 +0000 (18:13 +0200)]
foreign-resources.yaml: Fix some documentation typos

Change-Id: I89281ddaeec5d0bc778ca6829dc2d7a531fb5320

4 years agoMerge "Use NumberInputWidget in HTMLFloatField"
jenkins-bot [Wed, 12 Sep 2018 16:08:48 +0000 (16:08 +0000)]
Merge "Use NumberInputWidget in HTMLFloatField"

4 years agoFix --user option in DeleteLocalPasswords
Amir Sarabadani [Wed, 12 Sep 2018 11:31:59 +0000 (13:31 +0200)]
Fix --user option in DeleteLocalPasswords

Bug: T201009
Change-Id: I69c14741f578b59cd73e5c8c5576f8c250825a30

4 years agoMerge "resourceloader: Improve mw.loader tests"
jenkins-bot [Wed, 12 Sep 2018 10:54:58 +0000 (10:54 +0000)]
Merge "resourceloader: Improve mw.loader tests"

4 years agoMerge "resourceloader: Configure eslint to disallow $ and require inside startup"
jenkins-bot [Wed, 12 Sep 2018 10:54:52 +0000 (10:54 +0000)]
Merge "resourceloader: Configure eslint to disallow $ and require inside startup"

4 years agoMerge "resourceloader: Optimise mw.now() definition"
jenkins-bot [Wed, 12 Sep 2018 10:29:32 +0000 (10:29 +0000)]
Merge "resourceloader: Optimise mw.now() definition"

4 years agoUse NumberInputWidget in HTMLFloatField
mainframe98 [Thu, 6 Sep 2018 12:21:46 +0000 (14:21 +0200)]
Use NumberInputWidget in HTMLFloatField

The PHP variant of this widget was introduced in 0.27.0.
Using NumberInputWidget has the advantage that HTMLFloatField and
HTMLIntField can now be infused as a JavaScript NumberInputWidget.

Bug: T203656
Change-Id: I5d6a913de38d12a21c9bfb1ce9790574d98a5a1b

4 years agoMerge "Improve page display title handling for category pages"
jenkins-bot [Wed, 12 Sep 2018 07:25:46 +0000 (07:25 +0000)]
Merge "Improve page display title handling for category pages"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 12 Sep 2018 06:20:43 +0000 (08:20 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I4138398bcaf37ff156f075f01ef2efc719d2dc40

4 years agoMerge "Go search to consider fragment only title invalid"
jenkins-bot [Wed, 12 Sep 2018 05:18:09 +0000 (05:18 +0000)]
Merge "Go search to consider fragment only title invalid"

4 years agoUpdate OOUI to v0.28.2
Volker E [Wed, 12 Sep 2018 00:30:16 +0000 (17:30 -0700)]
Update OOUI to v0.28.2

Release notes:

Bug: T190581
Bug: T202477
Bug: T203766
Bug: T203813
Depends-on: I8af1bfd86322f9dce8a5e406f0b41e5dbcd9686a
Change-Id: Ice05fc7b2b4fae1741c3211c5909ba64bbbf28c4

4 years agoMerge "ContribsPager: Factor revision check out of formatRow"
jenkins-bot [Tue, 11 Sep 2018 22:56:49 +0000 (22:56 +0000)]
Merge "ContribsPager: Factor revision check out of formatRow"

4 years agoContribsPager: Factor revision check out of formatRow
jdlrobson [Thu, 26 Jul 2018 08:51:58 +0000 (16:51 +0800)]
ContribsPager: Factor revision check out of formatRow

This is needed by MobileFrontend. Also helps with readability
and understanding what is going on inside the larger formatRow

Bug: T199066
Change-Id: I679f4bf4305ca5b0fd523e844a01f06b4bd38b5c

4 years agoMerge "Lazy-infuse OOUI widgets by tab"
jenkins-bot [Tue, 11 Sep 2018 22:21:03 +0000 (22:21 +0000)]
Merge "Lazy-infuse OOUI widgets by tab"

4 years agoMerge "test: disable hook when testing default preferences"
jenkins-bot [Tue, 11 Sep 2018 20:50:06 +0000 (20:50 +0000)]
Merge "test: disable hook when testing default preferences"

4 years agoMerge "Fix missing comma on sql file"
jenkins-bot [Tue, 11 Sep 2018 20:47:27 +0000 (20:47 +0000)]
Merge "Fix missing comma on sql file"

4 years agoLazy-infuse OOUI widgets by tab
Ed Sanders [Fri, 7 Sep 2018 18:58:41 +0000 (19:58 +0100)]
Lazy-infuse OOUI widgets by tab

Bug: T203838
Change-Id: I43241e0563c62e009c1ad5409bf598b62661483e

4 years agoMerge "tests: Throw when tests run that "need a db" but miss Database group"
jenkins-bot [Tue, 11 Sep 2018 20:24:19 +0000 (20:24 +0000)]
Merge "tests: Throw when tests run that "need a db" but miss Database group"

4 years agoGo search to consider fragment only title invalid
Erik Bernhardson [Mon, 10 Sep 2018 20:29:08 +0000 (13:29 -0700)]
Go search to consider fragment only title invalid

When submiting using the 'go' feature of Special:Search (standard
usecase for autocomplete) a nearby title can be selected.
Unfortunately a fragment only title is considered valid, which
sends the user to Main_Page#searchterm.

Instead don't allow a search starting with # to trigger the go

Bug: T182452
Change-Id: I8ce3ce8633e23db41ae6eafb9996ca7294f8445a

4 years agoFix missing comma on sql file
Dayllan Maza [Tue, 11 Sep 2018 19:50:42 +0000 (15:50 -0400)]
Fix missing comma on sql file

Bug: T197144
Change-Id: I9e1562fd0ce94aaa44e932a608065a7340492746

4 years agoMerge "Add release notes for removed collations"
jenkins-bot [Tue, 11 Sep 2018 19:06:08 +0000 (19:06 +0000)]
Merge "Add release notes for removed collations"

4 years agotests: Throw when tests run that "need a db" but miss Database group
addshore [Tue, 11 Sep 2018 17:16:26 +0000 (18:16 +0100)]
tests: Throw when tests run that "need a db" but miss Database group

Depends-On: I5cfea2dc4e56ed4639126e35c0f8aa370852f056
Depends-On: Ic472eb073290793c432812ae8b47ab2b41e74a26
Change-Id: I4cdc8130032340726c5d18d795cd2d6b6b58b307

4 years agoAdd release notes for removed collations
Bartosz Dziewoński [Tue, 11 Sep 2018 18:10:49 +0000 (20:10 +0200)]
Add release notes for removed collations

* 'uppercase-se' - removed in 3469713f4e36f9fb7e9babe0f2fd165d6e59b2e2
* 'xx-uca-et' - removed in 9c46871d60f02a033c6082836f9b6a18b3a10ec1
* 'xx-uca-fa' - removed in 5a21de8abb7f03e72a07d8578babc1835dff4a64

Change-Id: I28a20fdf86af527a209d826fb12fb0ee28c83a66

4 years agoMerge "Revert MCR migration stage to write-both/read-old"
jenkins-bot [Tue, 11 Sep 2018 18:18:17 +0000 (18:18 +0000)]
Merge "Revert MCR migration stage to write-both/read-old"

4 years agoMerge "Remove xx-uca-et collation workaround"
jenkins-bot [Tue, 11 Sep 2018 18:13:00 +0000 (18:13 +0000)]
Merge "Remove xx-uca-et collation workaround"

4 years agoRevert MCR migration stage to write-both/read-old
Lucas Werkmeister [Tue, 11 Sep 2018 16:07:43 +0000 (18:07 +0200)]
Revert MCR migration stage to write-both/read-old

This partially reverts commit 9bd162dce2 (change I15989adae2).

Bug: T204065
Change-Id: I5426b5efd09dd1253883e405ec5db6d0ebac779e

4 years agoUse RevisionRenderer for rendering ParserOutput
daniel [Tue, 14 Aug 2018 16:37:30 +0000 (18:37 +0200)]
Use RevisionRenderer for rendering ParserOutput

Bug: T174035
Bug: T174036
Change-Id: I1085b05d635dd954c143c8a398fae909632ba0a9

4 years agoCover incomplete revision case in RenderedRevision.
daniel [Mon, 3 Sep 2018 13:34:12 +0000 (15:34 +0200)]
Cover incomplete revision case in RenderedRevision.

This introduces a check that allows magic words like {{REVISIONUSER}}
to still work even when an incomplete fake RevisonRecord is provided to
RevisionRenderer. In such a case, the revision is loaded from the database
if needed. This lets old code that only has access to a Content object for
rendering use that Content object in a fake RevisionRecord, instead of
having to load the full revision from the database in all cases.

Bug: T174035
Change-Id: I658eab97a8282b8943baf7968f3256da35789ec1

4 years agoMerge "Introduce RevisionRecord::isReadForInsertion"
jenkins-bot [Tue, 11 Sep 2018 15:14:17 +0000 (15:14 +0000)]
Merge "Introduce RevisionRecord::isReadForInsertion"

4 years agoMerge "[MCR] Set MCR migration stage to write-both/read-new."
jenkins-bot [Tue, 11 Sep 2018 13:59:46 +0000 (13:59 +0000)]
Merge "[MCR] Set MCR migration stage to write-both/read-new."

4 years agoRemove xx-uca-et collation workaround
Pikne [Tue, 11 Sep 2018 13:30:06 +0000 (13:30 +0000)]
Remove xx-uca-et collation workaround

Remove workaround introduced in I3e8031b9. No longer needed.

Bug: T202977
Change-Id: I39921ef83cddc33535b99bd9c0b75f8afb52ea9a

4 years agoIntroduce RevisionRecord::isReadForInsertion
daniel [Mon, 10 Sep 2018 19:34:31 +0000 (21:34 +0200)]
Introduce RevisionRecord::isReadForInsertion

RevisionRecord::isReadForInsertion provides a concise way to check
whether a revision is complete enough to be inserted into the database.

Change-Id: I0c79f55c0b935bce9943163ed4c2cc8b5f9c82d5

4 years ago[MCR] Set MCR migration stage to write-both/read-new.
daniel [Wed, 4 Jul 2018 13:39:24 +0000 (15:39 +0200)]
[MCR] Set MCR migration stage to write-both/read-new.

This patch exists to see if CI passes with
$wgMultiContentRevisionSchemaMigrationStage set to

NOTE: verify that $wgMultiContentRevisionSchemaMigrationStage
in production config (T197816) before merging this.

Bug: T198561
Depends-On: Ib718868d2c768b6ea851355eef047bc0e6593495
Change-Id: I15989adae2b5916577d164c50d7da88774e49324

4 years agoMerge "Add hooks to MediaWikiPHPUnitTestListener start/endTest"
jenkins-bot [Tue, 11 Sep 2018 09:48:47 +0000 (09:48 +0000)]
Merge "Add hooks to MediaWikiPHPUnitTestListener start/endTest"

4 years agoMerge "resourceloader: Remove closure around $CODE.defineLoader()"
jenkins-bot [Tue, 11 Sep 2018 09:30:52 +0000 (09:30 +0000)]
Merge "resourceloader: Remove closure around $CODE.defineLoader()"

4 years agoAdd part to update ctd_user_defined in populateChangeTagDef
Amir Sarabadani [Tue, 11 Sep 2018 08:39:53 +0000 (10:39 +0200)]
Add part to update ctd_user_defined in populateChangeTagDef

Change-Id: I8fa3fa95b259ed82e78f4c3de0f5e148c3586407

4 years agoMerge "resourceloader: Optimise register() to avoid different self-called signature"
jenkins-bot [Tue, 11 Sep 2018 09:06:41 +0000 (09:06 +0000)]
Merge "resourceloader: Optimise register() to avoid different self-called signature"

4 years agoMerge "resourceloader: Remove redundant UA-check for Opera 12"
jenkins-bot [Tue, 11 Sep 2018 09:06:36 +0000 (09:06 +0000)]
Merge "resourceloader: Remove redundant UA-check for Opera 12"

4 years agoMerge "resourceloader: Remove support for `addSource(id, url)`"
jenkins-bot [Tue, 11 Sep 2018 09:06:31 +0000 (09:06 +0000)]
Merge "resourceloader: Remove support for `addSource(id, url)`"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 11 Sep 2018 07:26:21 +0000 (09:26 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I76f3672d900827a2df2f88f668e6db92c911ba9e

4 years agoMerge "resources: Sort keys of foreign-resources.yaml"
jenkins-bot [Tue, 11 Sep 2018 02:03:03 +0000 (02:03 +0000)]
Merge "resources: Sort keys of foreign-resources.yaml"

4 years agoMerge "resources: Register html5shiv as foreign resource"
jenkins-bot [Tue, 11 Sep 2018 02:00:34 +0000 (02:00 +0000)]
Merge "resources: Register html5shiv as foreign resource"

4 years agoSpecial:AllPages: Use OOUI
Prateek Saxena [Thu, 20 Jul 2017 17:40:35 +0000 (23:10 +0530)]
Special:AllPages: Use OOUI

* Use the usual $formDescriptor and $htmlForm
* Fix typos

Bug: T117724
Change-Id: I1e9b45d687492eed290a825de78c6ecc61013da8

4 years agoMerge "Pass delimiter to preg_quote"
jenkins-bot [Mon, 10 Sep 2018 23:55:19 +0000 (23:55 +0000)]
Merge "Pass delimiter to preg_quote"

4 years agoresources: Sort keys of foreign-resources.yaml
Timo Tijhof [Mon, 10 Sep 2018 23:26:21 +0000 (00:26 +0100)]
resources: Sort keys of foreign-resources.yaml

Makes it easier to correlate entries when browsing resources/lib/
side-by-side with the file. Also, remove redundant 'dest' keys
from a few 'file' resources.

Change-Id: I543a37a3721080d01434f7c804fab2a51ac9ff75

4 years agoresources: Register html5shiv as foreign resource
Timo Tijhof [Mon, 10 Sep 2018 23:24:55 +0000 (00:24 +0100)]
resources: Register html5shiv as foreign resource

Change-Id: If3e119a85eb1c40288a5a02dc51c388e8da2c3ff

4 years agoMerge "jsduck: Fix OOUI resource links"
jenkins-bot [Mon, 10 Sep 2018 23:16:15 +0000 (23:16 +0000)]
Merge "jsduck: Fix OOUI resource links"

4 years agoMerge "resources: Rename oojs-ui file paths to ooui per general branding"
jenkins-bot [Mon, 10 Sep 2018 23:16:08 +0000 (23:16 +0000)]
Merge "resources: Rename oojs-ui file paths to ooui per general branding"

4 years agoMerge "foreign-resources.yaml: Add blank lines between registrations for easier merges"
jenkins-bot [Mon, 10 Sep 2018 22:21:49 +0000 (22:21 +0000)]
Merge "foreign-resources.yaml: Add blank lines between registrations for easier merges"

4 years agojsduck: Fix OOUI resource links
James D. Forrester [Mon, 10 Sep 2018 21:47:54 +0000 (14:47 -0700)]
jsduck: Fix OOUI resource links

The theme was renamed from 'mediawiki' to 'wikimediaui' months ago, at
which point these files would have broken.

oojs-ui-local.css doesn't currently exist, and possibly hasn't for a
long while(?).

Change-Id: Ib2f77ff357b8cf51c5ae00df6f187fca4a91be15

4 years agoresources: Rename oojs-ui file paths to ooui per general branding
James D. Forrester [Mon, 10 Sep 2018 20:42:52 +0000 (13:42 -0700)]
resources: Rename oojs-ui file paths to ooui per general branding

No change to the module names yet.

Change-Id: Ica33520b0128bd56dc06c8951bdc6932fce041fe

4 years agoMerge "Fix undeletion write-both/read-old mode."
jenkins-bot [Mon, 10 Sep 2018 21:26:48 +0000 (21:26 +0000)]
Merge "Fix undeletion write-both/read-old mode."

4 years agoMerge "Update wikimedia/timestamp to v2.1.1"
jenkins-bot [Mon, 10 Sep 2018 21:26:42 +0000 (21:26 +0000)]
Merge "Update wikimedia/timestamp to v2.1.1"

4 years agoMerge "Bump qunit from 2.6.0 to 2.6.2"
jenkins-bot [Mon, 10 Sep 2018 21:06:02 +0000 (21:06 +0000)]
Merge "Bump qunit from 2.6.0 to 2.6.2"

4 years agoMerge "resourceloader: Update startup mock in jsduck/eg-iframe"
jenkins-bot [Mon, 10 Sep 2018 21:05:56 +0000 (21:05 +0000)]
Merge "resourceloader: Update startup mock in jsduck/eg-iframe"

4 years agoforeign-resources.yaml: Add blank lines between registrations for easier merges
James D. Forrester [Mon, 10 Sep 2018 20:42:14 +0000 (13:42 -0700)]
foreign-resources.yaml: Add blank lines between registrations for easier merges

Change-Id: I412da56d1f981fa72799fb51b8216f39f02f0042

4 years agoBump qunit from 2.6.0 to 2.6.2
James D. Forrester [Wed, 5 Sep 2018 22:51:03 +0000 (15:51 -0700)]
Bump qunit from 2.6.0 to 2.6.2

Change-Id: Id7f47eee423c2fc1289f468c6622b952814d8912

4 years agoresourceloader: Update startup mock in jsduck/eg-iframe
Timo Tijhof [Mon, 10 Sep 2018 20:22:49 +0000 (21:22 +0100)]
resourceloader: Update startup mock in jsduck/eg-iframe

Follows-up dec800968eb. Without it, the mediawiki.base.js script
fails upon trying to access 'window.RLQ', which startup.js normally

Bug: T203578
Change-Id: Icfe16948b1b7af47f6e3f058500aa8fa86cafbfc

4 years agoMerge "resources: Register CLDRPluralRuleParser as foreign resource"
jenkins-bot [Mon, 10 Sep 2018 20:36:19 +0000 (20:36 +0000)]
Merge "resources: Register CLDRPluralRuleParser as foreign resource"

4 years agoMerge "build: Update grunt-karma from 2.0.0 to 3.0.0"
jenkins-bot [Mon, 10 Sep 2018 20:20:05 +0000 (20:20 +0000)]
Merge "build: Update grunt-karma from 2.0.0 to 3.0.0"

4 years agoresources: Register CLDRPluralRuleParser as foreign resource
Timo Tijhof [Mon, 10 Sep 2018 19:38:43 +0000 (20:38 +0100)]
resources: Register CLDRPluralRuleParser as foreign resource

The script verifies that our copy still matches the original

Change-Id: Idc982434c066f3b38cb95c6c2aaad7839f261ab1

4 years agoFix undeletion write-both/read-old mode.
daniel [Mon, 27 Aug 2018 19:45:40 +0000 (21:45 +0200)]
Fix undeletion write-both/read-old mode.

With the new schema, undeletion does not create now slot rows.
However, when in read-old mode, we may still have un-migrated
archive rows. When undeletion based on such a row, we do need
to insert a slot row.

This also changes the return value of SlotRecord for
SCHEMA_COMPAT_READ_OLD mode from null to the negative value of
rev_text_id, for consistency. Conceptually, the emulated slots
in SCHEMA_COMPAT_OLD now have a "virtual" content ID, hich is
 however distinct from any real content ID that may exist in
the future. Such virtual content IDs are however not assigned
in SCHEMA_COMPAT_WRITE_BOTH mode. In that mode, unmigrated
rows can be detected by calling hasContentId() on the main
slot. Migrated rows will return true here and provide the
id of the associated content row, even in
SCHEMA_COMPAT_READ_OLD mode. This is particularly essential
for undeletion, which needs to maintain the association
between revision and slot rows even in SCHEMA_COMPAT_READ_OLD

Bug: T174024
Bug: T194015
Bug: T183488
Change-Id: I88ee9809b9752e1e72d635d62e82008315402901

4 years agoUpdate wikimedia/timestamp to v2.1.1
Brad Jorsch [Mon, 10 Sep 2018 19:28:43 +0000 (15:28 -0400)]
Update wikimedia/timestamp to v2.1.1

Also enable some tests for PostgreSQL that are fixed by the new version.

Bug: T195807
Change-Id: Id0d016f620662836b3a17de5f118715c1cbe3e69
Depends-On: I3bd8df5236600963be89602b2a52d0d95d640d66

4 years agoMerge "Consolidate tests for getQueryInfo() and related methods."
jenkins-bot [Mon, 10 Sep 2018 18:41:02 +0000 (18:41 +0000)]
Merge "Consolidate tests for getQueryInfo() and related methods."

4 years agoMerge "mediawiki.notification: Use data-mw-foo instead of data-mw.foo"
jenkins-bot [Mon, 10 Sep 2018 18:38:04 +0000 (18:38 +0000)]
Merge "mediawiki.notification: Use data-mw-foo instead of data-mw.foo"

4 years agoConsolidate tests for getQueryInfo() and related methods.
daniel [Mon, 3 Sep 2018 17:15:37 +0000 (19:15 +0200)]
Consolidate tests for getQueryInfo() and related methods.

This consolidates tests for getQueryInfo, getArchiveQueryInfo,
getSlotQueryInfo, and similar methods that help application logic
be compatible with different migration stages of different aspects
of the revision storage schema.

Bug: T198561
Change-Id: I8e4ae69d7e00721a0af125afaf9a708f7fe99b0a

4 years agoSpecial:Preferences OOUI: Limit `max-width` override to inputs only
Volker E [Mon, 10 Sep 2018 18:08:38 +0000 (11:08 -0700)]
Special:Preferences OOUI: Limit `max-width` override to inputs only

Follow-up to I23e2e98a389a60

Change-Id: I08c41916418349172530204d070f12ef05b9246b

4 years agoMerge "Special:Preferences OOUI: Reduce width of number inputs to 10em "
jenkins-bot [Mon, 10 Sep 2018 16:51:14 +0000 (16:51 +0000)]
Merge "Special:Preferences OOUI: Reduce width of number inputs to 10em "

4 years agobuild: Update grunt-karma from 2.0.0 to 3.0.0
James D. Forrester [Mon, 10 Sep 2018 16:46:17 +0000 (09:46 -0700)]
build: Update grunt-karma from 2.0.0 to 3.0.0

Bug: T194280
Change-Id: Iba043c036c06bebd961896f390063ca9a0129eb2

4 years agoSpecial:Preferences OOUI: Reduce width of number inputs to 10em
Ed Sanders [Sat, 8 Sep 2018 13:33:59 +0000 (14:33 +0100)]
Special:Preferences OOUI: Reduce width of number inputs to 10em

Bug: T181844
Change-Id: I23e2e98a389a609145fa451902e62ca53b83c72e

4 years agomediawiki.notification: Use data-mw-foo instead of data-mw.foo
Fomafix [Mon, 10 Sep 2018 13:53:31 +0000 (15:53 +0200)]
mediawiki.notification: Use data-mw-foo instead of data-mw.foo

All other data-mw attributes or .data() parameters use 'mw-foo' instead
of 'mw.foo'.

Change-Id: I2f7290c8a7ba1684c65b976c17912aa85846de02

4 years agoAdd hooks to MediaWikiPHPUnitTestListener start/endTest
addshore [Fri, 24 Aug 2018 14:56:20 +0000 (15:56 +0100)]
Add hooks to MediaWikiPHPUnitTestListener start/endTest

Used in Wikibase I89ab5e9c2d608fb2d2f7

An alternate proposal to:
 - If9448650a56f30294cc3ef766b5f5ec201e85ba4
 - Idd12370b09ad0ebae23d77c743b79a7163961436

Change-Id: I82b5e94009527f9e46262bf6f505a43ddc9767f0

4 years agotest: disable hook when testing default preferences
Antoine Musso [Thu, 19 Jul 2018 15:35:59 +0000 (17:35 +0200)]
test: disable hook when testing default preferences

The GetPreferences hook lets extensions register additional user
preferences.  They show up on the form and that breaks the hardcoded
assertion that exactly 5 preferences are available.

Disable the hook in case the test is run with extensions loaded in (ex:

Change-Id: I78b11e989110407cd721e8a3fbbe81d28ca4be5b

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 10 Sep 2018 07:07:15 +0000 (09:07 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id9ce66ace073f0974d15610e14c64a565ce575dd

4 years agoImprove page display title handling for category pages
Niklas Laxström [Wed, 9 Nov 2016 06:24:57 +0000 (07:24 +0100)]
Improve page display title handling for category pages

One use case of display title is to localise page names with Translate
extension or without. While the page title changes, the subheadings still
say something like "Pages in category Foo/de".

Also converted one raw HTML message to be a parsed message.

First version of this patch caused an issue when previewing
because page title in h1 is not the same as page display title.

This issue is fixed by promoting page display title as it's own member
in OutputPage. Also added getUnprefixedDisplayTitle that attempts to
strip away the namespace prefix to mimic Title::getText() but which
works with display title instead.

Bug: T43720
Bug: T46197
Change-Id: I6097a873297eb57759252fc56ad6d02c44e4c366

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 9 Sep 2018 08:00:52 +0000 (10:00 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id50ca26cf97d5d23e50ab7f597d68827c31ac1da

4 years agoresourceloader: Improve mw.loader tests
Timo Tijhof [Sat, 8 Sep 2018 21:44:47 +0000 (22:44 +0100)]
resourceloader: Improve mw.loader tests

This is in preparation for improving handlePending(). Some of these
tests are only passing by accidental reliance on internal details
that might change (such as the sometimes synchronous execution
of mw.loader.implment).

Change-Id: I8fe5a29ec52bad64b038049e6591dfa38c19852e

4 years agoresourceloader: Configure eslint to disallow $ and require inside startup
Timo Tijhof [Sat, 8 Sep 2018 21:41:02 +0000 (22:41 +0100)]
resourceloader: Configure eslint to disallow $ and require inside startup

Would help statically detect accidental use of jQuery ($) before
it is defined within startup. It would also let ESLint in my editor
catch the issue I keep running into where I use a local variable
called 'module' in mediawiki.js before it is defined, which it
doesn't detect because 'module' is whitelisted in the project's
main .eslintrc file. None of the predefined globals for regular
modules are available inside the startup module.

Follows-up dec800968.

Bug: T192623
Change-Id: Icc102d59fff8eb7cd3f4d55f5c8b64866f2bc8af

4 years agoresourceloader: Optimise mw.now() definition
Timo Tijhof [Sat, 8 Sep 2018 18:32:18 +0000 (19:32 +0100)]
resourceloader: Optimise mw.now() definition

In a microbenchmark this wouldn't register given it's just property
access, but the 'timing' and 'navigationStart' properties are
non-trivial getter accessors on their first call, and that's worth
deferring to when it is needed, instead of blocking the definition
of mw.loader early on.

Also remove the redundant wrapper around Date.now(), which is a
static and otherwise detachable function, it does not need to
be bound or wrapped. jQuery defines its shortcut the same way,
as `jQuery.now = Date.now`.

Change-Id: Id621b08fbcce886318bae76ea4c47d50fc9d88e9

4 years agoresourceloader: Remove closure around $CODE.defineLoader()
Timo Tijhof [Sat, 8 Sep 2018 18:01:45 +0000 (19:01 +0100)]
resourceloader: Remove closure around $CODE.defineLoader()

Follows-up b7b84d55d4e, which embedded the whole of the three 'mediawiki'
JS files inside of startup.js, but did so inside of the pre-existing
closure that was there.

This adds some overhead we don't get value of, so best to remove
it and embed it as a sibling of startup.js in the same top-level

In local testing (Chrome stable, CPU 1/6th) this reduced startup
run-time from 73-78ms to 63-65ms.

* Declare isCompatible() as a normal function.
  Disable the implicit-globals warning given this isn't a regular module,
  this file is  intentionally in the global scope.
* Unfold the private startUp() function to its call site.

Change-Id: Ida51ab20898c9e4ae6cbf7ad2968d88d824a1483

4 years agoresourceloader: Optimise register() to avoid different self-called signature
Timo Tijhof [Fri, 7 Sep 2018 04:09:53 +0000 (05:09 +0100)]
resourceloader: Optimise register() to avoid different self-called signature

Follows-up 6815e355753c, and I24786f90bcfb2, which also removed
similar self-calling implementations to simplify stack depth,
and improve startup run-time performance.

Change-Id: Ieb4a7d1e1758856411a49566a69a840b9aeddaa6

4 years agoresourceloader: Remove redundant UA-check for Opera 12
Timo Tijhof [Fri, 7 Sep 2018 01:36:56 +0000 (02:36 +0100)]
resourceloader: Remove redundant UA-check for Opera 12

Follows-up 07d8fded3eb336257.

Change-Id: Ie3873292d26984eaa26c80c184e7388893d56c87

4 years agoresourceloader: Remove support for `addSource(id, url)`
Timo Tijhof [Mon, 3 Sep 2018 23:17:11 +0000 (00:17 +0100)]
resourceloader: Remove support for `addSource(id, url)`

The PHP interface still supports it without deprecation, but there
is no need for the client to support it given it is only ever called
from the startup module, which always passes it an object.

Follows-up 6815e355753c, which did the same for `state(key, val)`.

Also simplify the implementation to avoid extra calls and optimise
for the only signature.

Mark the method as @private, and change the existing use of
@protected to @private (doesn't really make sense in JavaScript).

Change-Id: I24786f90bcfb256b2e7c37f7760bba1a5e399443

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 8 Sep 2018 07:57:21 +0000 (09:57 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia40c19790cdf5164d2bd787d8b0e404b9d578572

4 years agoRCFilters: Replace deprecated 'advanced' by renamed to 'settings' icon
Volker E [Sat, 8 Sep 2018 02:37:40 +0000 (19:37 -0700)]
RCFilters: Replace deprecated 'advanced' by renamed to 'settings' icon

Bug: T190581
Change-Id: I6b0710817a3b498a85b7207ed4d4f6e17c867621

4 years agoMerge "Linker: Remove outdated comment"
jenkins-bot [Sat, 8 Sep 2018 01:35:49 +0000 (01:35 +0000)]
Merge "Linker: Remove outdated comment"

4 years agoMerge "Make Schema changes for Partial Blocks"
jenkins-bot [Fri, 7 Sep 2018 22:44:50 +0000 (22:44 +0000)]
Merge "Make Schema changes for Partial Blocks"

4 years agoMake Schema changes for Partial Blocks
David Barratt [Mon, 18 Jun 2018 14:26:20 +0000 (10:26 -0400)]
Make Schema changes for Partial Blocks

Update the database schema so a block can be switched between a sitewide and
partial block. Also add the restrictions table for specifiying the partial

Bug: T197144
Change-Id: I4a725312c4b980a1b14e5ca826069fa2278a5913

4 years agoMerge "build: Bump most devDependencies to latest"
jenkins-bot [Fri, 7 Sep 2018 21:54:47 +0000 (21:54 +0000)]
Merge "build: Bump most devDependencies to latest"

4 years agoMerge "mw.special.preferences/confirmClose: Catch clicks inside OOUI dropdowns"
jenkins-bot [Fri, 7 Sep 2018 20:28:15 +0000 (20:28 +0000)]
Merge "mw.special.preferences/confirmClose: Catch clicks inside OOUI dropdowns"