lhc/web/wiklou.git
5 years agoAdd MessagesBi.php
MarcoAurelio [Tue, 21 Aug 2018 18:56:19 +0000 (18:56 +0000)]
Add MessagesBi.php

Support for Bislama language was added some years ago but
this file was not added. Add a mostly empty file for now so
it can be filled with more content in the future.

Bug: T202438
Change-Id: I3e977428a42a2baaedeca7c0b47a98821bcafabb

5 years agoMerge "ChangeTag::createTagWithChecks calls ChangeTag::canCreateTag()"
jenkins-bot [Tue, 21 Aug 2018 18:40:36 +0000 (18:40 +0000)]
Merge "ChangeTag::createTagWithChecks calls ChangeTag::canCreateTag()"

5 years agoChangeTag::createTagWithChecks calls ChangeTag::canCreateTag()
Reedy [Tue, 21 Aug 2018 18:09:24 +0000 (19:09 +0100)]
ChangeTag::createTagWithChecks calls ChangeTag::canCreateTag()

It doesn't call ChangeTag::canDeleteTag()

Change-Id: Ib53c1b8e5f12aeaaff2eb3a704af6d29560b2ab6

5 years agoMerge "jquery.accessKeyLabel: Optimise by using mw.message().plain()"
jenkins-bot [Tue, 21 Aug 2018 18:04:00 +0000 (18:04 +0000)]
Merge "jquery.accessKeyLabel: Optimise by using mw.message().plain()"

5 years agoMerge "maintenance: Add maintenance script for managing foreign resources"
jenkins-bot [Tue, 21 Aug 2018 17:53:29 +0000 (17:53 +0000)]
Merge "maintenance: Add maintenance script for managing foreign resources"

5 years agoMerge "resources: Move non-jquery files from /resources/lib/jquery to /resources...
jenkins-bot [Tue, 21 Aug 2018 17:53:23 +0000 (17:53 +0000)]
Merge "resources: Move non-jquery files from /resources/lib/jquery to /resources/lib"

5 years agomaintenance: Add maintenance script for managing foreign resources
Timo Tijhof [Sun, 19 Aug 2018 05:14:05 +0000 (06:14 +0100)]
maintenance: Add maintenance script for managing foreign resources

Something for the short-term, perhaps. But at least an improvement
over 'update-oojs.sh' and 'update-ooui.sh'.

* Does not require any dependencies (no 'node' or 'npm').
* Performs integrity validation.

Change-Id: I0f79b84ef3903756353c66d3c3ee7e492c60e648

5 years agojquery.accessKeyLabel: Optimise by using mw.message().plain()
Timo Tijhof [Tue, 21 Aug 2018 04:45:43 +0000 (05:45 +0100)]
jquery.accessKeyLabel: Optimise by using mw.message().plain()

Avoids invoking mw.message#text, which uses the parser() of jqueryMsg,
twice for each call to jquery.accessKeyLabel.

These two messages do not contain any wikitext features, and are
not expected to need them in the future.

To make this explicit, add `{{format|plain}}` to their documentation,
and change the code to use plain().

Bug: T202357
Change-Id: I642f09afda4a93a1208550d44072f0909dcabdd0

5 years agoMerge "Load styles in 'oojs-ui-widgets' again rather than a separate module"
jenkins-bot [Tue, 21 Aug 2018 14:57:19 +0000 (14:57 +0000)]
Merge "Load styles in 'oojs-ui-widgets' again rather than a separate module"

5 years agoMerge "Add Special:Search sort parameter without ui"
jenkins-bot [Tue, 21 Aug 2018 14:57:13 +0000 (14:57 +0000)]
Merge "Add Special:Search sort parameter without ui"

5 years agoMerge "SpecialMovepage: Use 'helpInline' for "Move associated talk page" checkbox"
jenkins-bot [Tue, 21 Aug 2018 14:57:08 +0000 (14:57 +0000)]
Merge "SpecialMovepage: Use 'helpInline' for "Move associated talk page" checkbox"

5 years agoMerge "[MCR] Render multi-slot diffs"
jenkins-bot [Tue, 21 Aug 2018 14:04:56 +0000 (14:04 +0000)]
Merge "[MCR] Render multi-slot diffs"

5 years agoMerge "Create DifferenceEngine before calling GetDifferenceEngine"
jenkins-bot [Tue, 21 Aug 2018 12:00:31 +0000 (12:00 +0000)]
Merge "Create DifferenceEngine before calling GetDifferenceEngine"

5 years agoMerge "ChangeTags: Fix double escaping of tag descriptions"
jenkins-bot [Tue, 21 Aug 2018 11:08:00 +0000 (11:08 +0000)]
Merge "ChangeTags: Fix double escaping of tag descriptions"

5 years agoMerge "Ignore CentralIdLookup::resetCache() in code coverage reports"
jenkins-bot [Tue, 21 Aug 2018 10:35:04 +0000 (10:35 +0000)]
Merge "Ignore CentralIdLookup::resetCache() in code coverage reports"

5 years agoIgnore CentralIdLookup::resetCache() in code coverage reports
Kunal Mehta [Tue, 21 Aug 2018 07:18:50 +0000 (00:18 -0700)]
Ignore CentralIdLookup::resetCache() in code coverage reports

Change-Id: I4c3603354b0aa9396f620b9894d384e676db7f95

5 years agoMerge "benchmarker: Implement setupEach for per-iteration setup"
jenkins-bot [Tue, 21 Aug 2018 05:46:33 +0000 (05:46 +0000)]
Merge "benchmarker: Implement setupEach for per-iteration setup"

5 years agoMerge "Chinese Conversion Table Update 2018-2"
jenkins-bot [Tue, 21 Aug 2018 03:12:13 +0000 (03:12 +0000)]
Merge "Chinese Conversion Table Update 2018-2"

5 years agoChangeTags: Fix double escaping of tag descriptions
Roan Kattouw [Tue, 21 Aug 2018 01:54:39 +0000 (18:54 -0700)]
ChangeTags: Fix double escaping of tag descriptions

truncateTagDescription() was escaping its return value for HTML, even
though it had just produced plain text, and all similar functions
return plain text as well.

Bug: T192509
Change-Id: Ieaa631ef19c235121af9d8e09f2674f54fa3c25a

5 years agoMerge "Fix FOUC for floated collapsible elements outside the content area"
jenkins-bot [Tue, 21 Aug 2018 00:37:00 +0000 (00:37 +0000)]
Merge "Fix FOUC for floated collapsible elements outside the content area"

5 years agoMerge "Resolve deprecation warnings in iw search widget"
jenkins-bot [Tue, 21 Aug 2018 00:36:55 +0000 (00:36 +0000)]
Merge "Resolve deprecation warnings in iw search widget"

5 years agoFix FOUC for floated collapsible elements outside the content area
Roan Kattouw [Tue, 21 Aug 2018 00:02:25 +0000 (17:02 -0700)]
Fix FOUC for floated collapsible elements outside the content area

There was CSS setting the correct float value, but it only worked on
elements inside the content area because it used .mw-content-ltr and
-rtl. Add another rule to catch things outside the content area (which
should float based on the UI language).

Bug: T198774
Change-Id: I29b71a2e52139e540d719b61964084170d36bc5e

5 years agoMerge "Fix handling categorization changes"
jenkins-bot [Mon, 20 Aug 2018 22:22:05 +0000 (22:22 +0000)]
Merge "Fix handling categorization changes"

5 years agoResolve deprecation warnings in iw search widget
Erik Bernhardson [Mon, 20 Aug 2018 21:58:25 +0000 (14:58 -0700)]
Resolve deprecation warnings in iw search widget

The old iteration api has been deprecated, but looks like this
call wasn't caught in the patch that introduced it.

Change-Id: I435bacdb185e09127606217982ca70a1bec60301

5 years agoMerge "tests: Replace Bugddddd with Tddddd in test names, test strings"
jenkins-bot [Mon, 20 Aug 2018 21:55:28 +0000 (21:55 +0000)]
Merge "tests: Replace Bugddddd with Tddddd in test names, test strings"

5 years agotests: Replace Bugddddd with Tddddd in test names, test strings
Fomafix [Sat, 18 Aug 2018 13:51:29 +0000 (15:51 +0200)]
tests: Replace Bugddddd with Tddddd in test names, test strings

Change-Id: Ic6fbc5e14b1a756f62dd6cc3a6b2acc0d47db498

5 years agoresources: Move non-jquery files from /resources/lib/jquery to /resources/lib
Timo Tijhof [Sun, 19 Aug 2018 21:23:51 +0000 (22:23 +0100)]
resources: Move non-jquery files from /resources/lib/jquery to /resources/lib

Per discussion on T193826, these are not part of jquery (the library, or the
module), and should not be in the same subdirectory.

To follow the new convention that all entries directly in /resources/lib
should correspond to single library only (either as file, or as directory),
move them one directory up.

Bug: T193826
Change-Id: I24c05ec5fc5f0a2d54d501a4a022d829675bf850

5 years agoRemove wgPasswordSenderName from DefaultSettings.php
James D. Forrester [Mon, 20 Aug 2018 20:18:31 +0000 (13:18 -0700)]
Remove wgPasswordSenderName from DefaultSettings.php

This was removed from MediaWiki in 1.23 already, but was still
lingering in DefaultSettings.

Follow-up to: I578341430f53bef6d02b8ad78c1c1f2e6b96c064.
Previous, reverted attempt: acda2cc90aea519f41c8ae55bc4d05f02072df84.

Bug: T97709
Change-Id: I94a0c7c20f78c31149685c4443564be240ddad50

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 20 Aug 2018 19:55:37 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ifab1146f977f25c1714b857c12ef279aba164650

5 years agoresourceloader: Remove wgResourceLoaderValidateStaticJS setting
Timo Tijhof [Mon, 20 Aug 2018 19:19:24 +0000 (20:19 +0100)]
resourceloader: Remove wgResourceLoaderValidateStaticJS setting

Not used since 2011 (MediaWiki 1.18).

In an early version of ResourceLoader, we ran JSMinPlus syntax
validation on-demand on all served JavaScript content. This
was identified as cause of slowdown and high memory use, and
generally not considered as useful in production.

The reason it was there originally was not for the purpose of
validating static files, but for user-generated content.

So in MediaWiki 1.18, the behaviour of wgResourceLoaderValidateJS
was changed to only apply to user-generated content, and the
rest was disabled behind wgResourceLoaderValidateStaticJS, which
we then never use. Not even in development, given that we now
have superior experience through ESLint, even within IDEs where
supported.

Follows-up 49d3d18033738 (r91914).

Change-Id: Ie25109a4fb23ee93fed0db4af5db4b11fe9ffe7f

5 years agoMerge "resourceloader: Merge the two ua.match() calls in startup.js"
jenkins-bot [Mon, 20 Aug 2018 18:32:06 +0000 (18:32 +0000)]
Merge "resourceloader: Merge the two ua.match() calls in startup.js"

5 years ago[MCR] Render multi-slot diffs
Gergő Tisza [Wed, 11 Jul 2018 09:24:07 +0000 (11:24 +0200)]
[MCR] Render multi-slot diffs

Move logic for rendering a diff between two content objects out of
DifferenceEngine, into a new SlotDiffRenderer class. Make
DifferenceEngine use multiple SlotDiffRenderers, one per slot.

This separates the class tree for changing high-level diff properties
such as the header or the revision selection method (same as before:
subclass DifferenceEngine and override ContentHandler::getDiffEngineClass
or implement GetDifferenceEngine) and the one for changing the actual
diff rendering for a given content type (subclass SlotDiffRenderer and
override ContentHandler::getSlotDiffRenderer or implement
GetSlotDiffRenderer). To keep B/C, when SlotDiffRenderer is not overridden
for a given content type but DifferenceEngine is, that DifferenceEngine
will be used instead.
The weak point of the scheme is overriding the DifferenceEngine methods
passing control to the SlotDiffRenderers (the ones calling
getDifferenceEngines), without calling the parent. These are:
showDiffStyle, getDiffBody, getDiffBodyCacheKeyParams. Extensions doing
that will probably break in unpredictable ways (most likely, only
showing the main slot diff). Nothing in gerrit does it, at least.

A new GetSlotDiffRenderer hook is added to modify rendering for content
models not owned by the extension, much like how GetDifferenceEngine
works.

Also deprecates public access to mNewRev/mOldRev and creates public
getters instead. DifferenceEngine never supported external changes to
those properties, this just acknowledges it.

Bug: T194731
Change-Id: I2f8a9dbebd2290b7feafb20e2bb2a2693e18ba11
Depends-On: I04e885a33bfce5bccc807b9bcfe1eaa577a9fd47
Depends-On: I203d8895bf436b7fee53fe4718dede8a3b1768bc

5 years agoCreate DifferenceEngine before calling GetDifferenceEngine
Gergő Tisza [Mon, 13 Aug 2018 16:53:59 +0000 (18:53 +0200)]
Create DifferenceEngine before calling GetDifferenceEngine

This way the hook is able to consider what kind of DifferenceEngine
was created by default, or even wrap/decorate it.

Change-Id: Ibb6b1b087a2dda445be2b5e8c7518c7d169b5192

5 years agobenchmarker: Implement setupEach for per-iteration setup
Kunal Mehta [Mon, 20 Aug 2018 07:21:49 +0000 (00:21 -0700)]
benchmarker: Implement setupEach for per-iteration setup

To bypass caches in legacy code where injection doesn't easily work,
support a per-iteration setup function, 'setupEach', which runs right
before the actual function is timed and called.

And use it in benchmarkTitleValue, where I mistakenly assumed that
'setup' did what I wanted.

Bug: T201992
Change-Id: I2d01d899bf63576df2833705667f1a16604ab4cc

5 years agoresourceloader: Merge the two ua.match() calls in startup.js
Timo Tijhof [Mon, 20 Aug 2018 05:11:17 +0000 (06:11 +0100)]
resourceloader: Merge the two ua.match() calls in startup.js

Covered by tests. No need for the separate //i regex.

Change-Id: I2fb5c8f45a3b9d9d20884c58d1adbd9e6cee2814

5 years agoSupport a heading of '0' in Html::messageBox()
Kunal Mehta [Mon, 20 Aug 2018 04:46:21 +0000 (21:46 -0700)]
Support a heading of '0' in Html::messageBox()

Change-Id: I181cb6f92ab1b10d87b1213a043a5f291149d094

5 years agoMerge "Simplify redirect linking in InfoAction"
jenkins-bot [Mon, 20 Aug 2018 01:35:01 +0000 (01:35 +0000)]
Merge "Simplify redirect linking in InfoAction"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 19 Aug 2018 19:53:50 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I0a824a0c317de91546f123d42158f818113f63b0

5 years agoMerge "Improve StaticArrayWriterTest and add missing @covers tag"
jenkins-bot [Sun, 19 Aug 2018 17:07:13 +0000 (17:07 +0000)]
Merge "Improve StaticArrayWriterTest and add missing @covers tag"

5 years agoMerge "Create and use PrefixingStatsdDataFactoryProxy in PerDbNameStatsdDataFactory"
jenkins-bot [Sun, 19 Aug 2018 07:51:39 +0000 (07:51 +0000)]
Merge "Create and use PrefixingStatsdDataFactoryProxy in PerDbNameStatsdDataFactory"

5 years agoMerge "CSP: In tests, use setMwGlobals() instead of manual set+undo"
jenkins-bot [Sun, 19 Aug 2018 07:40:05 +0000 (07:40 +0000)]
Merge "CSP: In tests, use setMwGlobals() instead of manual set+undo"

5 years agoCreate and use PrefixingStatsdDataFactoryProxy in PerDbNameStatsdDataFactory
addshore [Sat, 18 Aug 2018 10:22:38 +0000 (11:22 +0100)]
Create and use PrefixingStatsdDataFactoryProxy in PerDbNameStatsdDataFactory

MediaWiki::emitBufferedStatsdData() is never called for the PerDbName factory,
so stats were being dropped. Instead of having two factories, turn the
PerDbName one into a proxy/wrapper around the main factory that just adds a
prefix in front of all of the keys.

Bug: T202144
Change-Id: I31e376446abb58e41353b4ca3814120d2e914104

5 years agoImprove StaticArrayWriterTest and add missing @covers tag
Kunal Mehta [Sun, 19 Aug 2018 07:06:35 +0000 (00:06 -0700)]
Improve StaticArrayWriterTest and add missing @covers tag

Checking for proper quoting was suggested by Krinkle in CR.

Change-Id: I7fa599767017a5cfc82899bc4178de6cb34bdd02

5 years agoCSP: In tests, use setMwGlobals() instead of manual set+undo
Timo Tijhof [Sun, 19 Aug 2018 00:42:58 +0000 (01:42 +0100)]
CSP: In tests, use setMwGlobals() instead of manual set+undo

This is the idiom as used in other PHPUnit tests for MediaWiki.

Change-Id: I285e5abe57bad8b9a8a3b35d81bb3a9f5f3dbe85

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 18 Aug 2018 19:53:37 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia8ac63807e9d30d524349ab38e4c66f3f840ce57

5 years agoRemove wfMakeStaticArrayFile()
Kunal Mehta [Sat, 18 Aug 2018 05:32:19 +0000 (22:32 -0700)]
Remove wfMakeStaticArrayFile()

Replaced by the StaticArrayWriter class.

Bug: T200626
Change-Id: I7c02cf3a7dda2804d2eb8d51716254bd78b7544c

5 years agoMove wfMakeStaticArrayFile() into a class
Kunal Mehta [Sat, 18 Aug 2018 05:31:36 +0000 (22:31 -0700)]
Move wfMakeStaticArrayFile() into a class

And include tests :)

This code is independent of MediaWiki, but not really large enough to be
worth librarizing right now.

Bug: T200626
Change-Id: I022c074e8a708fb5219bc4ff4b53e7e31f60dc4b

5 years agoMerge "Reduce calls to MediaWikiServices::getInstance()"
jenkins-bot [Sat, 18 Aug 2018 05:03:47 +0000 (05:03 +0000)]
Merge "Reduce calls to MediaWikiServices::getInstance()"

5 years agoMerge "Use Title::makeName in Special:Export to simplify code"
jenkins-bot [Sat, 18 Aug 2018 04:10:00 +0000 (04:10 +0000)]
Merge "Use Title::makeName in Special:Export to simplify code"

5 years agoReduce calls to MediaWikiServices::getInstance()
Umherirrender [Sat, 18 Aug 2018 04:02:39 +0000 (06:02 +0200)]
Reduce calls to MediaWikiServices::getInstance()

In some functions MediaWikiServices::getInstance() was called twices or
in loops. Extract the variable to reduce calls.

Change-Id: I2705db11d7a9ea73efb9b5a5c40747ab0b3ea36f

5 years agoUse Title::makeName in Special:Export to simplify code
Umherirrender [Sat, 18 Aug 2018 03:10:24 +0000 (05:10 +0200)]
Use Title::makeName in Special:Export to simplify code

Also adjust param docs

Change-Id: Ia938b38c86da25e73b91a55506d660bc9ca9384f

5 years agoMerge "TitleFormatter: Remove indirection from getText()"
jenkins-bot [Sat, 18 Aug 2018 01:18:38 +0000 (01:18 +0000)]
Merge "TitleFormatter: Remove indirection from getText()"

5 years agoMerge "TitleFormatter: Don't look up namespace name for ns 0"
jenkins-bot [Sat, 18 Aug 2018 01:14:51 +0000 (01:14 +0000)]
Merge "TitleFormatter: Don't look up namespace name for ns 0"

5 years agoMerge "TitleValue: Avoid function call for internal property"
jenkins-bot [Sat, 18 Aug 2018 01:05:28 +0000 (01:05 +0000)]
Merge "TitleValue: Avoid function call for internal property"

5 years agoMerge "test: Assert that API generators have unique prefixes"
jenkins-bot [Sat, 18 Aug 2018 01:04:31 +0000 (01:04 +0000)]
Merge "test: Assert that API generators have unique prefixes"

5 years agoMerge "Turn ApiPrefixUniquenessTest into a structure test"
jenkins-bot [Sat, 18 Aug 2018 00:55:18 +0000 (00:55 +0000)]
Merge "Turn ApiPrefixUniquenessTest into a structure test"

5 years agotest: Assert that API generators have unique prefixes
Antoine Musso [Tue, 19 Jun 2018 07:50:12 +0000 (09:50 +0200)]
test: Assert that API generators have unique prefixes

Signed-off-by: Brad Jorsch <bjorsch@wikimedia.org>
Change-Id: I30758f2ac95fd8ae361ef8079abdfb0a82d92e34

5 years agoTitleFormatter: Remove indirection from getText()
Kunal Mehta [Fri, 17 Aug 2018 23:41:02 +0000 (16:41 -0700)]
TitleFormatter: Remove indirection from getText()

At the end of the day, the output is identical to LinkTarget::getText().

Change-Id: Ifddafb79d7602ba5e368cc40f99c56e22a56d506

5 years agoTitleFormatter: Don't look up namespace name for ns 0
Kunal Mehta [Fri, 17 Aug 2018 23:21:27 +0000 (16:21 -0700)]
TitleFormatter: Don't look up namespace name for ns 0

It's hardcoded to empty string, so we can skip some code.

Profiling (after switching the benchmark script to use NS_MAIN) showed
no noticable improvements in getPrefixedText().

Change-Id: Id6b044a51648d0a3f58331ac0427f9d5cd9d8f0f

5 years agoTitleValue: Avoid function call for internal property
Kunal Mehta [Fri, 17 Aug 2018 23:15:20 +0000 (16:15 -0700)]
TitleValue: Avoid function call for internal property

Change-Id: I16342469a8122bd46cada11fd1f1d3f88d2e8d1e

5 years agoMerge "Inject SpecialPageFactory into Parser"
jenkins-bot [Fri, 17 Aug 2018 21:42:39 +0000 (21:42 +0000)]
Merge "Inject SpecialPageFactory into Parser"

5 years agoMerge "Pass through 'helpInline' to OOUI FieldLayout and make true by default"
jenkins-bot [Fri, 17 Aug 2018 21:22:58 +0000 (21:22 +0000)]
Merge "Pass through 'helpInline' to OOUI FieldLayout and make true by default"

5 years agoTurn ApiPrefixUniquenessTest into a structure test
Kunal Mehta [Mon, 11 Jun 2018 23:51:42 +0000 (16:51 -0700)]
Turn ApiPrefixUniquenessTest into a structure test

This way it gets run during extension test runs as well.

Temporarily add a hack allowing 'wbeu' duplicates until T196962 is fixed.

Change-Id: Ic89a22a2ff4525585de9e290a1d47d22cfaaac5e

5 years agoMerge "mediawiki.util: Only call $.fn.updateTooltipAccessKeys if accesskey is set"
jenkins-bot [Fri, 17 Aug 2018 21:18:22 +0000 (21:18 +0000)]
Merge "mediawiki.util: Only call $.fn.updateTooltipAccessKeys if accesskey is set"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 17 Aug 2018 21:12:20 +0000 (23:12 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie7ab020ed7722038335b1a27c6faaaa7e07f8f3f

5 years agoMerge "Mass conversion to SpecialPageFactory service"
jenkins-bot [Fri, 17 Aug 2018 21:02:58 +0000 (21:02 +0000)]
Merge "Mass conversion to SpecialPageFactory service"

5 years agoMerge "Add index on rc_this_oldid"
jenkins-bot [Fri, 17 Aug 2018 20:45:43 +0000 (20:45 +0000)]
Merge "Add index on rc_this_oldid"

5 years agoSpecialMovepage: Use 'helpInline' for "Move associated talk page" checkbox
Bartosz Dziewoński [Fri, 17 Aug 2018 20:38:14 +0000 (22:38 +0200)]
SpecialMovepage: Use 'helpInline' for "Move associated talk page" checkbox

Before: https://phabricator.wikimedia.org/F25074120
After:  https://phabricator.wikimedia.org/F25074199

Change-Id: I7d63853a766fc176595ace5d9730c7111b043e8c

5 years agoMerge "Improve profileinfo.php documentation"
jenkins-bot [Fri, 17 Aug 2018 20:40:47 +0000 (20:40 +0000)]
Merge "Improve profileinfo.php documentation"

5 years agoPass through 'helpInline' to OOUI FieldLayout and make true by default
Ed Sanders [Tue, 12 Jun 2018 14:46:48 +0000 (15:46 +0100)]
Pass through 'helpInline' to OOUI FieldLayout and make true by default

This change is meant to improve the layout of Special:Preferences in
particular, but it will affect any OOUI form using help messages. It
should be a harmless or beneficial change for most of them.

Previous behavior can be restored by passing `'help-inline' => false`
to the HTMLForm factory after 'help-message'/'help-messages'/'help'.

For example:

* Special:Preferences?ooui=1#mw-prefsection-watchlist
  * Before: https://phabricator.wikimedia.org/F25025213
  * After:  https://phabricator.wikimedia.org/F25025181

* Special:ChangeEmail
  * Before: https://phabricator.wikimedia.org/F25073327
  * After:  https://phabricator.wikimedia.org/F25073328

* Special:BotPasswords/foo
  * Before: https://phabricator.wikimedia.org/F25073324
  * After:  https://phabricator.wikimedia.org/F25073326

Bug: T181854
Change-Id: Ica67fe4081dfaa8eb9e8f56fdb93530750e47012

5 years agoMerge "jquery.expandableField: Remove module unused since 1.22"
jenkins-bot [Fri, 17 Aug 2018 19:32:28 +0000 (19:32 +0000)]
Merge "jquery.expandableField: Remove module unused since 1.22"

5 years agoMerge "resourceloader: Increase minification cache version"
jenkins-bot [Fri, 17 Aug 2018 19:26:42 +0000 (19:26 +0000)]
Merge "resourceloader: Increase minification cache version"

5 years agoMerge "JavaScriptMinifier: Fix bad state after ternary in object literal"
jenkins-bot [Fri, 17 Aug 2018 19:10:10 +0000 (19:10 +0000)]
Merge "JavaScriptMinifier: Fix bad state after ternary in object literal"

5 years agoMerge "jquery.suggestions: Remove dead code for returning options"
jenkins-bot [Fri, 17 Aug 2018 19:08:37 +0000 (19:08 +0000)]
Merge "jquery.suggestions: Remove dead code for returning options"

5 years agojquery.expandableField: Remove module unused since 1.22
Timo Tijhof [Fri, 17 Aug 2018 18:24:01 +0000 (19:24 +0100)]
jquery.expandableField: Remove module unused since 1.22

Was originally created for Vector, which was originally part
of MediaWiki core. It hasn't been used for a while, and Vector
is in its own repository now.

Found 0 uses of this anywhere in Wikimedia Git, nor elsewhere
indexed by MediaWiki Codesearch.

Bug: T202154
Change-Id: I72ab5ad7f25be87b2f6d2f5f41a672b6a48b8005

5 years agoInject SpecialPageFactory into Parser
Kunal Mehta [Wed, 15 Aug 2018 01:11:59 +0000 (18:11 -0700)]
Inject SpecialPageFactory into Parser

Change-Id: I6a6a94cbdafdc724ce02408cd9e744e7b3eda92b

5 years agoMass conversion to SpecialPageFactory service
Aryeh Gregor [Sun, 12 Aug 2018 09:08:58 +0000 (12:08 +0300)]
Mass conversion to SpecialPageFactory service

Change-Id: Ia6e1e819ec6cbe8bf75b820109f51d47863e31fc

5 years agoMerge "Make SpecialPageFactory a service"
jenkins-bot [Fri, 17 Aug 2018 18:53:27 +0000 (18:53 +0000)]
Merge "Make SpecialPageFactory a service"

5 years agoMerge "Deprecate wfGetCache() and wfGetMainCache()"
jenkins-bot [Fri, 17 Aug 2018 18:41:58 +0000 (18:41 +0000)]
Merge "Deprecate wfGetCache() and wfGetMainCache()"

5 years agoMerge "Deprecate $wgParser"
jenkins-bot [Fri, 17 Aug 2018 18:28:38 +0000 (18:28 +0000)]
Merge "Deprecate $wgParser"

5 years agoMerge "Add release notes for $wgContLang deprecation"
jenkins-bot [Fri, 17 Aug 2018 18:19:48 +0000 (18:19 +0000)]
Merge "Add release notes for $wgContLang deprecation"

5 years agoMake SpecialPageFactory a service
Aryeh Gregor [Tue, 7 Aug 2018 10:58:31 +0000 (13:58 +0300)]
Make SpecialPageFactory a service

Calling SpecialPageFactory methods statically is now soft-deprecated.

SpecialPageFactory::resetList() is a no-op, and I changed tests
in core to use overrideMwServices() instead.

Methods that fell back to $wgUser now require a User object being passed.

Depends-On: Ie1f80315871085b9fd4763a265b588849d94414d
Change-Id: Id8a92d57743f790b7d8c377c033cef38d1bb24de

5 years agoDeprecate wfGetCache() and wfGetMainCache()
Kunal Mehta [Tue, 14 Aug 2018 23:43:25 +0000 (16:43 -0700)]
Deprecate wfGetCache() and wfGetMainCache()

The former is already a wrapper around ObjectCache::getInstance().

The latter was identical to ObjectCache::getLocalClusterInstance().

Bug: T115890
Change-Id: Ib4e43bc8d3f4ac9f7a453e36dcce9b3d962666ba

5 years agoDeprecate $wgParser
Kunal Mehta [Tue, 14 Aug 2018 23:22:15 +0000 (16:22 -0700)]
Deprecate $wgParser

Bug: T160811
Change-Id: I7bcf4bbd14268ec069d97848c016e0098eaf0be4

5 years agojquery.suggestions: Remove dead code for returning options
Timo Tijhof [Fri, 17 Aug 2018 17:50:36 +0000 (18:50 +0100)]
jquery.suggestions: Remove dead code for returning options

    returnValue = (key in obj) ? undefined : obj[key];

By standard, this cannot return anything other undefined.
This code has been broken since the introduction of the module
in 2012 (32377424b, r72349).

The functionality also didn't have test (naturally), and isn't
used anywhere in Wikimedia Git. Simply remove it.

Also remove the confusing $() wrapping of the non-getter return
value that provides chainability.

The 'this' inside a jQuery method is already an instance of jQuery,
pulling it through $() again achieves very little.

Change-Id: Id13861d42b65a759d74670d8c5850aecee4daf7d

5 years agoAdd release notes for $wgContLang deprecation
Kunal Mehta [Tue, 14 Aug 2018 23:21:20 +0000 (16:21 -0700)]
Add release notes for $wgContLang deprecation

Bug: T160815
Change-Id: I4dfdd8516b243f3eeccb69fe518a932178534aa2

5 years agomediawiki.util: Only call $.fn.updateTooltipAccessKeys if accesskey is set
Timo Tijhof [Fri, 17 Aug 2018 17:23:00 +0000 (18:23 +0100)]
mediawiki.util: Only call $.fn.updateTooltipAccessKeys if accesskey is set

Avoids overhead of mw.Message#parse, jqueryMsg.parser, and various
other DOM operations.

Bug: T202151
Change-Id: Id6304c9223806af6d469d9b4c67e60263f4b17ac

5 years agoSimplify redirect linking in InfoAction
Umherirrender [Fri, 17 Aug 2018 17:11:54 +0000 (19:11 +0200)]
Simplify redirect linking in InfoAction

- Only call WikiPage::getRedirectTarget once
- Use the result of getRedirectTarget to determine if the page info must
be shown,
  because sometimes Title::isRedirect gets wrong state, see T172016 for
more information

Bug: T172016
Change-Id: Ic789207ba00d057a35e82a4c22628207eeb7b5fd

5 years agoMessage: Fix error on getTitle() without language
Fomafix [Fri, 17 Aug 2018 16:06:47 +0000 (18:06 +0200)]
Message: Fix error on getTitle() without language

Steps to reproduce:

Old:
> $msg = new Message( 'brackets' )
> print $msg->getTitle()
Error from line 478 of /.../includes/Message.php: Call to a member function equals() on boolean

New:
> $msg = new Message( 'brackets' )
> print $msg->getTitle()
MediaWiki:Brackets

This got broken in 796d62d0.

Change-Id: I52cde36787e348378c4df18d90aa577a5600e06b

5 years agoImprove profileinfo.php documentation
Timo Tijhof [Fri, 17 Aug 2018 14:58:57 +0000 (15:58 +0100)]
Improve profileinfo.php documentation

* Move $wgEnableProfileInfo to DefaultSettings.php

* The configuration variable to enable the entry point was added
  together with the entry point itself in 9af3c09e5c (r9846).

* Change references to StartProfiler.php to refer to LocalSettings.php,
  given the former is deprecated since 1.31 (I4e8dd9558132).

Change-Id: I7ca5f2deace8645f06bebd915630c1de05c84bc5

5 years agoMerge "Html: Add test coverage for inlineScript()"
jenkins-bot [Fri, 17 Aug 2018 01:08:26 +0000 (01:08 +0000)]
Merge "Html: Add test coverage for inlineScript()"

5 years agoMerge "languages: Add coverage for 'ar' and 'ml' normalize()"
jenkins-bot [Fri, 17 Aug 2018 00:27:13 +0000 (00:27 +0000)]
Merge "languages: Add coverage for 'ar' and 'ml' normalize()"

5 years agoAdd Special:Search sort parameter without ui
Erik Bernhardson [Thu, 2 Aug 2018 02:45:02 +0000 (19:45 -0700)]
Add Special:Search sort parameter without ui

Search engines support the sort parameter, it would be nice if we
could pass it to be rendered in the web ui. This avoids implementing
any ui, which can be done at a later time.

Bug: T195071
Change-Id: Id7bd35bd4259bb1f1f856933d279dbd6eddfa2e2

5 years agoMerge "mediawiki.jqueryMsg: Combine the two generated data scripts"
jenkins-bot [Fri, 17 Aug 2018 00:09:10 +0000 (00:09 +0000)]
Merge "mediawiki.jqueryMsg: Combine the two generated data scripts"

5 years agoMerge "mw.ForeignStructuredUpload: Use 'helpInline' instead of custom styles"
jenkins-bot [Thu, 16 Aug 2018 23:40:39 +0000 (23:40 +0000)]
Merge "mw.ForeignStructuredUpload: Use 'helpInline' instead of custom styles"

5 years agoMerge "Fix eslint warnings and switch to error code"
jenkins-bot [Thu, 16 Aug 2018 22:31:26 +0000 (22:31 +0000)]
Merge "Fix eslint warnings and switch to error code"

5 years agoMerge "Warn against certain jQuery methods"
jenkins-bot [Thu, 16 Aug 2018 22:21:36 +0000 (22:21 +0000)]
Merge "Warn against certain jQuery methods"

5 years agoMerge "benchmarks: Create $normBenchs before the run instead of during"
jenkins-bot [Thu, 16 Aug 2018 22:10:54 +0000 (22:10 +0000)]
Merge "benchmarks: Create $normBenchs before the run instead of during"

5 years agoLoad styles in 'oojs-ui-widgets' again rather than a separate module
Bartosz Dziewoński [Thu, 16 Aug 2018 21:46:21 +0000 (23:46 +0200)]
Load styles in 'oojs-ui-widgets' again rather than a separate module

OOUI's 'widgets' style module must be loaded after its 'core' style
module, because the styles need the rules to be in this order to work.

We can't enforce a dependency from 'oojs-ui-widgets.styles' on
'oojs-ui-core.styles', because it is a style-only module (it can't
have dependencies).

When both of these modules are loaded as style-only modules (using
addModuleStyles() in PHP), everything works fine, because they are
loaded in alphabetical order. But when they are loaded as dependencies
from JS code, the order is unspecified.

Move OOUI 'widgets' styles back into the 'oojs-ui-widgets' module
(partially reverting fc65ff17d9f132aa332c99f7da44b92f6a372826) to
avoid the problem.

When 'oojs-ui-widgets.styles' is loaded on a page that also includes
'oojs-ui-widgets' (e.g. Special:Preferences), unfortunately the styles
will be loaded twice. I don't see a way to avoid this problem.

Bug: T195544
Change-Id: Ia07189f96b423b218ecbc52acffdedca517d2b01

5 years agomw.ForeignStructuredUpload: Use 'helpInline' instead of custom styles
Bartosz Dziewoński [Thu, 16 Aug 2018 20:51:18 +0000 (22:51 +0200)]
mw.ForeignStructuredUpload: Use 'helpInline' instead of custom styles

Before: https://phabricator.wikimedia.org/F25025765
After: https://phabricator.wikimedia.org/F25025764

Change-Id: I423c786e30570b8febc888b61450e8fce9185ba6