lhc/web/wiklou.git
5 years agoMerge "Fix 'Tags' padding to keep it farther from the edge and document the source...
jenkins-bot [Thu, 28 Jun 2018 16:45:22 +0000 (16:45 +0000)]
Merge "Fix 'Tags' padding to keep it farther from the edge and document the source of the new right padding value"

5 years agoMerge "RELEASE-NOTES: Add note for breaking CategoryMultiselectWidget"
jenkins-bot [Thu, 28 Jun 2018 13:06:20 +0000 (13:06 +0000)]
Merge "RELEASE-NOTES: Add note for breaking CategoryMultiselectWidget"

5 years agoRELEASE-NOTES: Add note for breaking CategoryMultiselectWidget
Prateek Saxena [Thu, 28 Jun 2018 07:45:58 +0000 (13:15 +0530)]
RELEASE-NOTES: Add note for breaking CategoryMultiselectWidget

Follows-up on I2146d8ce6505dae55750b4b12bd806b83796c1c5.

Bug: T183299
Change-Id: I799afa68048dfb7b2b30cdae09c9bf6a625f867f

5 years agoMerge "Update OOUI to v0.27.4"
Bartosz Dziewoński [Thu, 28 Jun 2018 10:44:34 +0000 (10:44 +0000)]
Merge "Update OOUI to v0.27.4"

5 years agoAllow overloading of getLabel() with return ' '
Fomafix [Wed, 27 Jun 2018 20:13:01 +0000 (22:13 +0200)]
Allow overloading of getLabel() with return ' '

This is a follow-up to 125cbd8c017b872c78f047c08f494a458883db23.

Bug: T198338
Change-Id: I21626326dde368d70fcc33052e43ff90db5ea9c0

5 years agoMerge "resourceloader: Embed 'mediawiki' directly in startup response"
Krinkle [Thu, 28 Jun 2018 01:43:55 +0000 (01:43 +0000)]
Merge "resourceloader: Embed 'mediawiki' directly in startup response"

5 years agoRC Filters: Don't apply/clear highlighting while still initializing
Kosta Harlan [Wed, 27 Jun 2018 20:58:22 +0000 (16:58 -0400)]
RC Filters: Don't apply/clear highlighting while still initializing

this.controller.isInitialized() is still false on page load, we don't want to
clear/apply highlights at this stage.

Remove Controller's this.initializing in favor of this.initialized,
expose it through isInitialized(), and remove ChangesListWrapperWidget's
this.filterModelInitialized since it's now unused.

Bug: T198359
Change-Id: I284ded2c6dd891dfb3efab5c6800c26a806ce306

5 years agoMerge "filerepo: clean up remote description cache keys"
jenkins-bot [Wed, 27 Jun 2018 22:16:45 +0000 (22:16 +0000)]
Merge "filerepo: clean up remote description cache keys"

5 years agoMerge "RCFilters: Move aggregation of highlight classes to the backend"
jenkins-bot [Wed, 27 Jun 2018 22:14:51 +0000 (22:14 +0000)]
Merge "RCFilters: Move aggregation of highlight classes to the backend"

5 years agoResourceLoaderImage module definitions can define a defaultColor
jdlrobson [Mon, 25 Jun 2018 22:55:19 +0000 (15:55 -0700)]
ResourceLoaderImage module definitions can define a defaultColor

Bug: T197909
Change-Id: I0745e112d11026ed59d8daca990b313305cd094a

5 years agoMerge "Fix broken label in Special:Import due to duplicate ID"
MusikAnimal [Wed, 27 Jun 2018 20:05:45 +0000 (20:05 +0000)]
Merge "Fix broken label in Special:Import due to duplicate ID"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 27 Jun 2018 19:53:09 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia319ca22827e6f4f8302c03342db181e3e350596

5 years agoMerge "[MCR] populateContentTables maintenance script"
Gergő Tisza [Wed, 27 Jun 2018 18:57:01 +0000 (18:57 +0000)]
Merge "[MCR] populateContentTables maintenance script"

5 years agoUpdate OOUI to v0.27.4
Volker E [Wed, 27 Jun 2018 18:48:42 +0000 (20:48 +0200)]
Update OOUI to v0.27.4

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

Depends-on: I340d724fe7ede73cd7d20fa98184f33ad19b9148
Change-Id: I52f35f231d67f6fb6f0abfc268f25c5677e4b7ba

5 years agoresourceloader: Embed 'mediawiki' directly in startup response
Timo Tijhof [Fri, 15 Jun 2018 20:20:14 +0000 (21:20 +0100)]
resourceloader: Embed 'mediawiki' directly in startup response

Embed the essential files to define mw.loader directly as part of
the startup module.

* This means the internal 'mediawiki' module no longer exists.
  This is safe to remove because:
  1) While registered server-side for loading from startup.js, a PHPUnit
     structure test disallowed being specified as a dependency.
  2) Anything that attempted to load it client-side failed because the
     module was marked in the registry as 'raw', thereby excluding it
     from the data sent to the client-side. As such, it was seen as an
     unknown module that the client refused to fetch from the server.

* Deprecate getStartupModules() and getLegacyModules().
  These are no longer needed. There are no known callers anywhere in
  Wikimedia Git or elsewhere indexed by Codesearch, but easy enough
  to leave as no-op for one release.

* Remove ResourceLoaderRawFileModule class.
  No longer needed. Was created as a hack specifically for the 'mediawiki'
  module so that it would not leak global variables in debug mode.
  It has no usage anywhere in Wikimedia Git, nor elsewhere in Codesearch.
  Remove without deprecation given this was meant to be a 'private' class.

* Introduce (private) getBaseModules(). Previously, this list only existed
  locally in getStartupModulesUrl() by merging getStartupModules() and
  getLegacyModules(). This value was factored out into its own method.

* Make getStartupModulesUrl() private and rename to getBaseModulesUrl().
  It is only used internally to export the 'baseModulesUri' value.
  Its name was already confusing before, but it would've been even more
  confusing now given it doesn't even call getStartupModules() any more.

Bug: T192623
Change-Id: I14ba282d7b65e99ca54b7c2f77ba6e1adaddd11c

5 years agoMerge "objectcache: define makeKey()/makeGlobalKey() for ReplicatedBagOStuff"
jenkins-bot [Wed, 27 Jun 2018 15:55:27 +0000 (15:55 +0000)]
Merge "objectcache: define makeKey()/makeGlobalKey() for ReplicatedBagOStuff"

5 years agoFix 'Tags' padding to keep it farther from the edge and document the source of the...
Hagar Shilo [Wed, 20 Jun 2018 16:22:56 +0000 (19:22 +0300)]
Fix 'Tags' padding to keep it farther from the edge and document the source of the new right padding value

Bug: T192275
Change-Id: Ib63a09b3b0edbca3bd2f2cd42a9485538738256f

5 years agoobjectcache: define makeKey()/makeGlobalKey() for ReplicatedBagOStuff
Aaron Schulz [Wed, 27 Jun 2018 08:16:11 +0000 (09:16 +0100)]
objectcache: define makeKey()/makeGlobalKey() for ReplicatedBagOStuff

Proxy to the "master"/"write" cache object method. This is similar to the
approach taken in MultiWriteBagOStuff

Bug: T198279
Change-Id: If0933246b7ef4fc07ebeec4c3c9625b1137dbe05

5 years agoMerge "mw.widgets.CategoryMultiselectWidget use TagMultiselectWidget"
jenkins-bot [Wed, 27 Jun 2018 08:19:04 +0000 (08:19 +0000)]
Merge "mw.widgets.CategoryMultiselectWidget use TagMultiselectWidget"

5 years agomw.widgets.CategoryMultiselectWidget use TagMultiselectWidget
Prateek Saxena [Thu, 8 Mar 2018 06:09:07 +0000 (11:39 +0530)]
mw.widgets.CategoryMultiselectWidget use TagMultiselectWidget

…also rename mw.widgets.CategoryCapsuleItemWidget to
mw.widgets.CategoryTagItemWidget.

Bug: T183299
Depends-on: Ia0732faff2d98f1ca07da5fbe1f2abc27f71a617
Change-Id: I2146d8ce6505dae55750b4b12bd806b83796c1c5

5 years agoMerge "resourceloader: Add @covers for FileModuleTest"
jenkins-bot [Wed, 27 Jun 2018 07:25:50 +0000 (07:25 +0000)]
Merge "resourceloader: Add @covers for FileModuleTest"

5 years agofilerepo: clean up remote description cache keys
Aaron Schulz [Wed, 27 Jun 2018 07:24:00 +0000 (08:24 +0100)]
filerepo: clean up remote description cache keys

Hash the file name portion and make the string constant portions
more relevant to what the keys are actually used for (e.g. there
is no URL parameter in the key)

Bug: T198279
Change-Id: Idf6f97db26f5be291cdd3a50a91346677fe9c3e6

5 years agoMerge "resourceloader: Add test for getVersionHash parent-definition requirement"
jenkins-bot [Wed, 27 Jun 2018 07:25:45 +0000 (07:25 +0000)]
Merge "resourceloader: Add test for getVersionHash parent-definition requirement"

5 years agoMerge "mediawiki.inspect: Fix exception when calling mw.inspect() a second time"
jenkins-bot [Wed, 27 Jun 2018 07:19:09 +0000 (07:19 +0000)]
Merge "mediawiki.inspect: Fix exception when calling mw.inspect() a second time"

5 years agoMerge "mediawiki.inspect: Fix doc index for inspect.grep()"
jenkins-bot [Wed, 27 Jun 2018 07:17:43 +0000 (07:17 +0000)]
Merge "mediawiki.inspect: Fix doc index for inspect.grep()"

5 years agoMerge "mediawiki.inspect: Use property assignments for clarity"
jenkins-bot [Wed, 27 Jun 2018 07:16:23 +0000 (07:16 +0000)]
Merge "mediawiki.inspect: Use property assignments for clarity"

5 years agoMerge "Refactor ApiOptions for reusability"
jenkins-bot [Wed, 27 Jun 2018 06:16:10 +0000 (06:16 +0000)]
Merge "Refactor ApiOptions for reusability"

5 years agoRCFilters: Move aggregation of highlight classes to the backend
Roan Kattouw [Tue, 26 Jun 2018 23:52:59 +0000 (16:52 -0700)]
RCFilters: Move aggregation of highlight classes to the backend

Construction of the highlight containers was moved to the backend, but
setupHighlightContainers() also aggregates the CSS classes used for
highlights for grouped entries in enhanced mode.

Move that to the backend too, and get rid of setupHighlightContainers().

Also move the namespace classes to getHTMLClassesForFilters() so that
they get picked up too, and pick up classes for tags separately because
the way they're handled is weird.

Bug: T197168
Change-Id: I4c374f82e7d128025f4e2b2f39b0adba14b76ef3

5 years agoMerge "Move construction of highlight divs to backend"
jenkins-bot [Wed, 27 Jun 2018 00:42:13 +0000 (00:42 +0000)]
Merge "Move construction of highlight divs to backend"

5 years agoMerge "RCFilters: Share one color picker popup between all highlight dropdowns"
jenkins-bot [Wed, 27 Jun 2018 00:38:11 +0000 (00:38 +0000)]
Merge "RCFilters: Share one color picker popup between all highlight dropdowns"

5 years agoMove construction of highlight divs to backend
Moriel Schottlender [Mon, 25 Jun 2018 21:25:19 +0000 (14:25 -0700)]
Move construction of highlight divs to backend

Create the highlight container div in the backend for
both regular and enhanced result view, so we spare
the load in the frontend.

Bug: T197168
Change-Id: I36bd7b7c4c124d305ac7b07e824dc2a58e152be4

5 years agoRCFilters: Only attempt to remove tag if we can find an item for it
Kosta Harlan [Tue, 26 Jun 2018 20:24:11 +0000 (16:24 -0400)]
RCFilters: Only attempt to remove tag if we can find an item for it

As noted in T198140 and T198231, removeTagByData leads us eventually to
OO.ui.mixin.GroupElement.prototype.removeItems(), which does not check if
any of the items are null values, and a change event is emitted.

This commit ensures that we can find an item for the data before attempting
to remove the tag.

Bug: T198140
Change-Id: I79a923a7b4e5f6c4d14fcce3c5855b4c56796384

5 years agoRefactor ApiOptions for reusability
Max Semenik [Tue, 26 Jun 2018 22:46:40 +0000 (15:46 -0700)]
Refactor ApiOptions for reusability

Because GlobalPreferences needs an API and that API needs to behave like
this one, it makes sense to make them share code. Move some functionality
into separate functions to make this possible.

Bug: T62856
Change-Id: Ic64934e7f7226a309d71c22626119ea233e2caeb

5 years agoRCFilters: Share one color picker popup between all highlight dropdowns
Roan Kattouw [Sat, 7 Oct 2017 00:26:18 +0000 (17:26 -0700)]
RCFilters: Share one color picker popup between all highlight dropdowns

Add a PopupWidget subclass that wraps the color picker, and pass that
down to the buttons in the menu items.

Bug: T198142
Change-Id: I84dabce988f4c99835f503bb8c8eb492f7fbfde1

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 26 Jun 2018 19:55:47 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I6c8bffce7566484cc46e852b20c0b29d655e8a36

5 years agomediawiki.inspect: Fix exception when calling mw.inspect() a second time
Timo Tijhof [Tue, 26 Jun 2018 17:22:26 +0000 (18:22 +0100)]
mediawiki.inspect: Fix exception when calling mw.inspect() a second time

In mediawiki.js, the mw.inspect() method is defined to lazy-load the
'mediawiki.inspect' module, and then call mw.inspect.runReports().

The problem is that, mediawiki.inspect.js, re-creates mw.inspect as a plain
object, which blows away the mw.inspect() function that was there.

Calling it a second time threw "TypeError: inspect is not a function".

Fix this by making mediawiki.inspect.js extend the function object,
instead of re-defining it.

Bug: T197810
Change-Id: I61aa965f3e1fd0a1c9f9d98310632b4a8d5e1683

5 years agomediawiki.inspect: Fix doc index for inspect.grep()
Timo Tijhof [Tue, 26 Jun 2018 17:11:13 +0000 (18:11 +0100)]
mediawiki.inspect: Fix doc index for inspect.grep()

Because this was positioned linearly after the sub-object for
`mw.inspect.reports.*`, JSDuck was indexing this as part of that
object instead of the outer `mw.inspect.*` scope.

This could be fixed by adding `@member mw.inspect` on this method,
or by re-starting the `@class mw.inspect` scope, but really
this should've been declared closer to the rest of that class,
which naturally avoids the index issue.

Change-Id: Ib2c9dc861f7f062c05bc059643a1a676906d338f

5 years agomediawiki.inspect: Use property assignments for clarity
Timo Tijhof [Tue, 26 Jun 2018 17:07:43 +0000 (18:07 +0100)]
mediawiki.inspect: Use property assignments for clarity

This changes the assignment of these methods from being declared
at once in an object literal, to assigning properties in separate
statements.

This is functionally a no-op and produces the exact same values,
but was factored out of the next commit to keep the diff cleaner
when fixing T197810 (which changes the host object from a plain
empty object, to a function object, which cannot be declared
as a literal).

Bug: T197810
Change-Id: I6ba1891acf8807cb9e01fa11a608e0c509e5f2bc

5 years agoFix broken label in Special:Import due to duplicate ID
MusikAnimal [Mon, 25 Jun 2018 19:28:01 +0000 (15:28 -0400)]
Fix broken label in Special:Import due to duplicate ID

Change-Id: I176b811e12719320432af01a22812fea872794f6

5 years agoSkip MediaWikiTestCaseSchema1Test on Postgres
Kunal Mehta [Sat, 2 Jun 2018 02:14:02 +0000 (19:14 -0700)]
Skip MediaWikiTestCaseSchema1Test on Postgres

According to Anomie, the idea behind this test is semi-broken, and would
benefit from T191231 being implemented first.

Bug: T195807
Change-Id: I9561fd0a82c37cf044e292e00499ecb611fcded6

5 years agoMerge "Declare HTMLSelectNamespace::mAllValue"
jenkins-bot [Tue, 26 Jun 2018 15:25:07 +0000 (15:25 +0000)]
Merge "Declare HTMLSelectNamespace::mAllValue"

5 years agoresourceloader: Add test for getVersionHash parent-definition requirement
Timo Tijhof [Tue, 26 Jun 2018 15:24:31 +0000 (16:24 +0100)]
resourceloader: Add test for getVersionHash parent-definition requirement

Change-Id: I69cdfea96c1e64bd8a7495eb6e56d0aefbe37643

5 years agoSync up with Parsoid parserTests.txt
C. Scott Ananian [Tue, 26 Jun 2018 14:37:51 +0000 (10:37 -0400)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit b068bb51d29e294a4f4a875ae829cca8cf314205

Change-Id: Ie8e8a7ed631894f56372e286ed01d1583f7a8979

5 years agoMerge "Checkboxes should be styled on non-JS browsers"
jenkins-bot [Tue, 26 Jun 2018 14:21:33 +0000 (14:21 +0000)]
Merge "Checkboxes should be styled on non-JS browsers"

5 years agoDeclare HTMLSelectNamespace::mAllValue
Umherirrender [Mon, 25 Jun 2018 19:36:21 +0000 (21:36 +0200)]
Declare HTMLSelectNamespace::mAllValue

It is protected, because some extension extends this class

Change-Id: I576e9e7e843844433655b11b8847c9e3060ba8e9

5 years agoMerge "Fix PHP7 warning "non well formed numeric value encountered""
jenkins-bot [Tue, 26 Jun 2018 12:27:53 +0000 (12:27 +0000)]
Merge "Fix PHP7 warning "non well formed numeric value encountered""

5 years agoMerge "Add some output for progress in populateChangeTagDef.php"
jenkins-bot [Tue, 26 Jun 2018 10:54:25 +0000 (10:54 +0000)]
Merge "Add some output for progress in populateChangeTagDef.php"

5 years agoMerge "Expand $wgDBDefaultGroup documentation"
jenkins-bot [Tue, 26 Jun 2018 07:42:58 +0000 (07:42 +0000)]
Merge "Expand $wgDBDefaultGroup documentation"

5 years agoresourceloader: Add @covers for FileModuleTest
Timo Tijhof [Tue, 26 Jun 2018 01:52:40 +0000 (02:52 +0100)]
resourceloader: Add @covers for FileModuleTest

Add @covers for various helper methods used by public methods, where the helper
methods actually contain most of the logic being tested in FileModuleTest.

I've changed these methods from protected to private (confirmed no usage)
to further pin down that their contract doesn't matter beyond making the
public methods work.

Change-Id: I2aef0d322b38bc3595e7d2c2339112b16fc66b8d

5 years agoFix PHP7 warning "non well formed numeric value encountered"
Edward Chernenko [Mon, 25 Jun 2018 22:45:13 +0000 (01:45 +0300)]
Fix PHP7 warning "non well formed numeric value encountered"

PHP 7.1 warns when non-numeric string is implicitly cast to integer.

Change-Id: Ia46ea793e9495548c7d421b3372f6deaeda163f5

5 years agoMerge "French space armoring: Use unicode regex instead of octal escapes"
jenkins-bot [Mon, 25 Jun 2018 21:49:55 +0000 (21:49 +0000)]
Merge "French space armoring: Use unicode regex instead of octal escapes"

5 years agoMerge "Armor against French spaces detection in HTML attributes"
jenkins-bot [Mon, 25 Jun 2018 21:42:03 +0000 (21:42 +0000)]
Merge "Armor against French spaces detection in HTML attributes"

5 years agoMerge "wdio-mediawiki: Tag v0.2.0"
jenkins-bot [Mon, 25 Jun 2018 21:19:59 +0000 (21:19 +0000)]
Merge "wdio-mediawiki: Tag v0.2.0"

5 years agoMerge "Avoid bad method call to patchPatch() in DbTestRecorder"
jenkins-bot [Mon, 25 Jun 2018 21:13:32 +0000 (21:13 +0000)]
Merge "Avoid bad method call to patchPatch() in DbTestRecorder"

5 years agoMerge "Align loading animation for first load later reloads"
jenkins-bot [Mon, 25 Jun 2018 21:05:59 +0000 (21:05 +0000)]
Merge "Align loading animation for first load later reloads"

5 years agowdio-mediawiki: Tag v0.2.0
Timo Tijhof [Mon, 25 Jun 2018 20:57:32 +0000 (21:57 +0100)]
wdio-mediawiki: Tag v0.2.0

Change-Id: Ia975b2d35220a6ad8ca90e6198ca2ba74c256ea3

5 years agoExpand $wgDBDefaultGroup documentation
Marius Hoch [Mon, 25 Jun 2018 20:56:51 +0000 (22:56 +0200)]
Expand $wgDBDefaultGroup documentation

Per Krinkle's comment:
https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/440022/2/includes/DefaultSettings.php

Change-Id: I94e6e7f5048de610d2ae0722cb3de216288ed182

5 years agoAvoid bad method call to patchPatch() in DbTestRecorder
Aaron Schulz [Mon, 25 Jun 2018 20:14:08 +0000 (21:14 +0100)]
Avoid bad method call to patchPatch() in DbTestRecorder

Bug: T193995
Change-Id: Ibc480b04463792b7cd720a6eb080e0960a30e440

5 years agoMerge "Localisation updates from https://translatewiki.net."
L10n-bot [Mon, 25 Jun 2018 19:54:19 +0000 (19:54 +0000)]
Merge "Localisation updates from https://translatewiki.net."

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 25 Jun 2018 19:54:09 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie589a2973df5cc34bc5b622cd135608b7bb29a34

5 years agoMerge "resourceloader: Update StartUpModule to use file hash instead of mtime"
jenkins-bot [Mon, 25 Jun 2018 19:51:41 +0000 (19:51 +0000)]
Merge "resourceloader: Update StartUpModule to use file hash instead of mtime"

5 years agoMerge "resourceloader: Fix duplicate semi-colon in generated startup code"
jenkins-bot [Mon, 25 Jun 2018 19:28:28 +0000 (19:28 +0000)]
Merge "resourceloader: Fix duplicate semi-colon in generated startup code"

5 years agoMerge "skins: Remove redundant mediawiki.hidpi script"
jenkins-bot [Mon, 25 Jun 2018 18:51:58 +0000 (18:51 +0000)]
Merge "skins: Remove redundant mediawiki.hidpi script"

5 years agoresourceloader: Update StartUpModule to use file hash instead of mtime
Timo Tijhof [Mon, 25 Jun 2018 18:30:48 +0000 (19:30 +0100)]
resourceloader: Update StartUpModule to use file hash instead of mtime

This was overlooked as part of the whole shift from timestamps
to file hashes (T94074, f37cee996e, T104950, 28f6d7fbde).

The key name and method call here matches that of FileModule.

The impact of this still using mtimes was fairly low, given:

* The startup module is only cached for 5 minutes.

* The startup module's hash varies on "everything" which includes
  wgVersion, as such, when a new branch is cut and cloned and this file's
  timestamp is reset, there will still be other factors causing the
  overall hash to vary. As such, this change is unlikely to improve
  200-304 response ratio.

Change-Id: I6543fb75575e9a793a7fc93e15d2f3e0b5a04342

5 years agoresourceloader: Fix duplicate semi-colon in generated startup code
Timo Tijhof [Mon, 25 Jun 2018 18:25:36 +0000 (19:25 +0100)]
resourceloader: Fix duplicate semi-colon in generated startup code

The startup.js template used '$CODE.registrations();', which makes
sense syntatically (and for the linter), but the substitution logic
was only replacing the '$CODE.registrations()' portion.

This made the generated output contain two consecutive semi-colons.

Change-Id: Ibef1a0d932b19037987a7effa12aa57f578a142d

5 years agoMerge "LCStoreStaticArray: create cache directory when it doesn't exist"
jenkins-bot [Mon, 25 Jun 2018 18:30:17 +0000 (18:30 +0000)]
Merge "LCStoreStaticArray: create cache directory when it doesn't exist"

5 years agoskins: Remove redundant mediawiki.hidpi script
Timo Tijhof [Sat, 23 Jun 2018 23:30:18 +0000 (00:30 +0100)]
skins: Remove redundant mediawiki.hidpi script

This is an internal script automatically loaded by Skin.php to
activate the 'jquery.hidpi' polyfill for all images on the current
page in browsers that don't natively support the 'srcset' attribute
on the HTML img element.

This script is loaded via ResourceLoader for which Grade A currently
requires:
> IE11+/Edge, Chr 65+, Ff 52+, Saf 5+, Op 15+, iOS 6+, Android 4+.

According to MDN and CanIUse, the basic 'x' syntax of srcset is supported, and
enabled by default, in:
> Edge, Chr 34+, Ff 38+, Saf 7+, Op 21+, iOS 8+, Android 5+.

This means in the following browsers, MediaWiki will no longer attempt to
replace images in articles with their hidpi versions.

| Browser                | analytics.wikimedia.org (22 May - 22 June)
| ---------------------- | -----------------------
| IE 11 on Windows <= 7  | 3.4% (OS does not support HiDPI)
| IE 11 on Windows 8+    | 1.1%
| Safari 5 & 6 (desktop) | <0.1%
| Opera 15-20 (desktop)  | <0.1%
| iOS 6 & 7 (mobile)     | 0.1%
| Android 4 (mobile)     | 0.5%

While the total of 1.7% is higher than our usual point where we decide
to remove support, I think we should consider dropping the hidpi polyfill
still for several reasons:

* MobileFrontend no longer uses 'srcset' attributes. As such, these browsers
  don't actually change their behaviour based on the polyfill.

* For IE 11/Win8 in particular, most users don't have an HiDPI monitor,
  but we still download the polyfill. HiDPI on Win8 is primarily tablets.

* In all cases where the polyfill activates, we download the HiDPI images
  in addition to the standard resolution (which downloads and renders first).
  This is because client-side JavaScript is not able to replace it sooner.
  This could be considered a waste of bandwidth, as it can double or tripple
  the bandwidth cost for end users.
  This also means pages complete their loading much later because the browser
  first renders the page nearly to completion with standard resolution images,
  and only at the end our polyfill activates to restarts all image loading.

The experience gracefully falls back to normal web rendering, where the standard
resolution of the image is used. This would match what users of these devices
see on other websites, given client-side emulation of srcset is fairly rare.

== Modules

The 'mediawiki.hidpi' module was removed, and considered internal to Skin.php.
It contained no public methods. I confirmed there were no matches in Codesearch,
and no matches in mwgrep on Wikimedia wikis.

I did not remove 'jquery.hidpi', which is what contains the actual polyfill
and the jQuery.fn.hidpi() public method. (Codesearch shows 2 extenisons using
it, and mwgrep returned 1 unused gadget on Meta-Wiki referencing it).
It has been kept, but marked as deprecated. To be removed in a future release.

Bug: T127328
Change-Id: I42ce0feea1fbfe534f00e05a7cd8d81df0c33d8f

5 years agoMerge "resourceloader: spin base module code out as a proper module"
jenkins-bot [Mon, 25 Jun 2018 15:49:06 +0000 (15:49 +0000)]
Merge "resourceloader: spin base module code out as a proper module"

5 years agoLCStoreStaticArray: create cache directory when it doesn't exist
Edward Chernenko [Mon, 25 Jun 2018 15:40:25 +0000 (18:40 +0300)]
LCStoreStaticArray: create cache directory when it doesn't exist

Array store (LCStoreStaticArray) should behave as standard LCStoreCDB,
creating the target directory when it doesn't exist.

This fixes unexpected "No such file or directory" errors when
replacing 'files' with 'array' in $wgLocalisationCacheConf['store'].

Change-Id: Ie49cf03ca93ac47fc98665de36e6207bef287193

5 years agoAdd some output for progress in populateChangeTagDef.php
Amir Sarabadani [Tue, 19 Jun 2018 07:02:41 +0000 (09:02 +0200)]
Add some output for progress in populateChangeTagDef.php

I ran it on beta cluster and all was done without one single line of output

Bug: T193871
Change-Id: I05a7c7827203eb159b5845a874b94d74f5d5e299

5 years agoresourceloader: spin base module code out as a proper module
Aaron Schulz [Wed, 20 Jun 2018 15:14:28 +0000 (16:14 +0100)]
resourceloader: spin base module code out as a proper module

Bug: T192623
Change-Id: I6f7dc40488a990d0f8a25e84ebc9eb25ad4c2975

5 years ago[MCR] populateContentTables maintenance script
aude [Fri, 12 Jan 2018 00:56:20 +0000 (19:56 -0500)]
[MCR] populateContentTables maintenance script

This introduces a maintenance script for populating the tables
introduced by the MCR storage schema, namely:

  slots
  slot_roles
  content
  content_models

Per default, both the revision and archive tables are processed.

This script is part of the MCR schema migration: after instructing
RevisionStroe to write both the old and the new schema by setting
$wgMultiContentRevisionSchemaMigrationStage = MIGRATION_WRITE_BOTH,
this script can be used to back-fill the new schema for existing
revisions.

Doing this is a precondition to later setting
$wgMultiContentRevisionSchemaMigrationStage = MIGRATION_NEW to
complete the schema migration.

Bug: T182682
Change-Id: Iecc67c1b8c082be1a1039eeb52e76ad16b965226

5 years agoMerge "Revert "Use pathinfo() in AutoLoaderStructureTest::testPSR4Completeness""
jenkins-bot [Mon, 25 Jun 2018 13:04:27 +0000 (13:04 +0000)]
Merge "Revert "Use pathinfo() in AutoLoaderStructureTest::testPSR4Completeness""

5 years agoRevert "Use pathinfo() in AutoLoaderStructureTest::testPSR4Completeness"
Hashar [Mon, 25 Jun 2018 12:38:07 +0000 (12:38 +0000)]
Revert "Use pathinfo() in AutoLoaderStructureTest::testPSR4Completeness"

This reverts commit 634c2ec2afd93827e5aaf571396eb76d35948188.

Reason for revert: that strips the PSR4 directories from the class.

Example:
$dir BlueSpiceFoundation/src/"
$file BlueSpiceFoundation/src/ConfigDefinition/IntSetting.php

$abbrFileName: IntSetting
$expectedClassName: BlueSpice\IntSetting

$abbrFileName should be relative to $dir and not just the filename.

Bug: T198077
Change-Id: Ie934e309fee0392439b4e26d86249f0650e5ea67

5 years agoMerge "Use pathinfo() in AutoLoaderStructureTest::testPSR4Completeness"
jenkins-bot [Mon, 25 Jun 2018 12:05:26 +0000 (12:05 +0000)]
Merge "Use pathinfo() in AutoLoaderStructureTest::testPSR4Completeness"

5 years agoUse pathinfo() in AutoLoaderStructureTest::testPSR4Completeness
Antoine Musso [Mon, 25 Jun 2018 11:32:30 +0000 (13:32 +0200)]
Use pathinfo() in AutoLoaderStructureTest::testPSR4Completeness

When setting AutoloadNamespaces to './' in extension.json, the test
AutoLoaderStructureTest::testPSR4Completeness would fail. The directory
path is not made canonical while the file is, which causes the substr()
call being used to strip too many characters. For example:

  $dir : /mediawiki/extensions/Wikidata.org/./
  $file: /mediawiki/extensions/Wikidata.org/Hooks.php

$abbrFileName = substr( substr( $file, strlen( $dir ) ), 0, -4 );
>>> oks

Use pathinfo() to parse the filename. Yields 'Hooks' as expected.

Bug: T198077
Change-Id: Ia8a11d87788b32ddb426a16a61b410b05ff5f15e

5 years agoMerge "Make WikiPage::convertSelectType protected"
jenkins-bot [Mon, 25 Jun 2018 11:21:59 +0000 (11:21 +0000)]
Merge "Make WikiPage::convertSelectType protected"

5 years agoBrowser tests: use Util.getTestString in specialwatchlist.js
Jakob Warkotsch [Mon, 25 Jun 2018 10:14:25 +0000 (12:14 +0200)]
Browser tests: use Util.getTestString in specialwatchlist.js

Follow-up on I5c5e9b22af5406f347636b22e68657b2674db6c9 and
I0747c2d361e951f8b3765a3dca548e55edb72216

Change-Id: I35ad793e6d9fe4c3bf58df9b4fcf6471c0a81f70

5 years agoMerge "Browser tests: extract commonly used getTestString function"
jenkins-bot [Mon, 25 Jun 2018 09:51:52 +0000 (09:51 +0000)]
Merge "Browser tests: extract commonly used getTestString function"

5 years agoMerge "Add browser test for basic watchlist functionality"
jenkins-bot [Mon, 25 Jun 2018 09:49:02 +0000 (09:49 +0000)]
Merge "Add browser test for basic watchlist functionality"

5 years agoMerge "mediawiki.hook: Move mw.hook tests to new mediawiki.base.test.js file"
jenkins-bot [Mon, 25 Jun 2018 09:01:35 +0000 (09:01 +0000)]
Merge "mediawiki.hook: Move mw.hook tests to new mediawiki.base.test.js file"

5 years agoMerge "Remove deprecated 'dom-level2-shim' module"
jenkins-bot [Mon, 25 Jun 2018 08:14:13 +0000 (08:14 +0000)]
Merge "Remove deprecated 'dom-level2-shim' module"

5 years agoMerge "resourceloader: Add coverage for StartupModule::getDefinitionSummary"
jenkins-bot [Mon, 25 Jun 2018 08:05:31 +0000 (08:05 +0000)]
Merge "resourceloader: Add coverage for StartupModule::getDefinitionSummary"

5 years agoGitInfo: Don't try shelling out if it's disabled
Kunal Mehta [Sun, 24 Jun 2018 20:55:43 +0000 (23:55 +0300)]
GitInfo: Don't try shelling out if it's disabled

Bug: T198037
Change-Id: I364f9bc0e78439474101f4b2a171805c91f50a72

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 24 Jun 2018 20:07:51 +0000 (22:07 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I9a6171181bfab383402ad99e1f59315d5aded560

5 years agoAdd the es-419 language code to support South American Spanish
Niklas Laxström [Wed, 13 Jun 2018 08:12:54 +0000 (10:12 +0200)]
Add the es-419 language code to support South American Spanish

This code is useful for targeting Spanish spoken in the Latin America
and the Caribbean region. There are no plans to make this available as
an interface language, hence I am not adding a language file with a
fallback to 'es'.

Bug: T112889
Change-Id: If7f0ed7a13f1cc86985ce5ce509dcf543cc1c0ff

5 years agoMake WikiPage::convertSelectType protected
Umherirrender [Sun, 24 Jun 2018 12:25:30 +0000 (14:25 +0200)]
Make WikiPage::convertSelectType protected

When override WikiPage this function is needed
to map the string to const

Change-Id: I4e4d597a77c859ad17bd6c29bed875fb4248b5fb

5 years agoMerge "rdbms: make some LBFactory fields private"
jenkins-bot [Sun, 24 Jun 2018 03:06:28 +0000 (03:06 +0000)]
Merge "rdbms: make some LBFactory fields private"

5 years agoRemove deprecated 'dom-level2-shim' module
Timo Tijhof [Sun, 20 May 2018 14:15:40 +0000 (16:15 +0200)]
Remove deprecated 'dom-level2-shim' module

This is an empty placeholder module that does nothing. It was kept
for backwards compatibility with older extensions that were still
supporting MediaWiki versions that in turn supported older browsers.

There is no longer any use of 'dom-level2-shim' anywhere in Wikimedia Git,
nor anywhere found by Codesearch,
nor anywhere on-wiki at WMF (including user scripts).

Bug: T127328
Change-Id: I416b216471c321d56d3b6d72bc9ef7dcc0f16093

5 years agoMerge "MWExceptionRenderer: Fix db error outage page"
jenkins-bot [Sun, 24 Jun 2018 02:22:09 +0000 (02:22 +0000)]
Merge "MWExceptionRenderer: Fix db error outage page"

5 years agoresourceloader: Add coverage for StartupModule::getDefinitionSummary
Timo Tijhof [Sun, 24 Jun 2018 01:59:44 +0000 (02:59 +0100)]
resourceloader: Add coverage for StartupModule::getDefinitionSummary

Change-Id: I913c8ecd5f51db851ef408c4281cdd75a0e0b239

5 years agoMerge "Make MessageCache::getMsgFromNamespace() process cache hook-defined keys"
jenkins-bot [Sun, 24 Jun 2018 01:47:52 +0000 (01:47 +0000)]
Merge "Make MessageCache::getMsgFromNamespace() process cache hook-defined keys"

5 years agoMerge "rdbms: rearrange LoadBalancer fields and make some private"
jenkins-bot [Sun, 24 Jun 2018 01:41:35 +0000 (01:41 +0000)]
Merge "rdbms: rearrange LoadBalancer fields and make some private"

5 years agordbms: rearrange LoadBalancer fields and make some private
Aaron Schulz [Thu, 21 Jun 2018 00:58:51 +0000 (01:58 +0100)]
rdbms: rearrange LoadBalancer fields and make some private

Put the object/callback fields first, followed by config fields
and then state fields, similar to LBFactory.

Change-Id: I40ceaa48842b505f15efe5e41ca7a6de437b6ff1

5 years agoUse \u{00A0} instead of &#160; or &nbsp;
Fomafix [Tue, 27 Dec 2016 21:14:16 +0000 (22:14 +0100)]
Use \u{00A0} instead of &#160; or &nbsp;

Directly use the UTF-8 encoding of the 'NO-BREAK SPACE' (U+00A0) instead of
the HTML/XML entities &#160; or &#xa0; or &nbsp;.

With the UTF-8 character the generated HTML is shorter and better to read.

Also change the special value for the label in HTMLForm from &#160; to
U+00A0 but also support &#160; for backward compability.

Bug: T154300
Change-Id: I882599ac1120789bb4e524c4394870680caca4f4

5 years agoresourceloader: move using() from mediawiki.js to the base module
Aaron Schulz [Wed, 20 Jun 2018 15:05:08 +0000 (16:05 +0100)]
resourceloader: move using() from mediawiki.js to the base module

Bug: T192623
Change-Id: I9095749a013cf97bff45d6d11afd9b2cee7e189b

5 years agoresourceloader: remove internal use of using() in mediawiki.js
Aaron Schulz [Wed, 20 Jun 2018 14:48:32 +0000 (15:48 +0100)]
resourceloader: remove internal use of using() in mediawiki.js

Bug: T192623
Change-Id: Id10ddf9f98661a8e328f40717b12cc08cbc04064

5 years agoMake MessageCache::getMsgFromNamespace() process cache hook-defined keys
Aaron Schulz [Sat, 23 Jun 2018 16:59:12 +0000 (17:59 +0100)]
Make MessageCache::getMsgFromNamespace() process cache hook-defined keys

Change-Id: I6f8a0c002b54dc48bc3e6902ab1ba41b2f99412a

5 years ago[MCR] Rollback for all slots
daniel [Fri, 27 Apr 2018 14:04:36 +0000 (16:04 +0200)]
[MCR] Rollback for all slots

Bug: T194034
Change-Id: Ifd23bc1cd64ddc090e1c1c26aacda37e8ba7a18b

5 years agoMerge "Make undo fail if more than just the main slot is affected."
jenkins-bot [Sat, 23 Jun 2018 08:59:37 +0000 (08:59 +0000)]
Merge "Make undo fail if more than just the main slot is affected."