Commit graph

94767 commits

Author SHA1 Message Date
jenkins-bot
f7ded135ed Merge "Create a PHP version of jquery.spinner" 2020-03-13 17:24:49 +00:00
Ed Sanders
7690bd6f25 Create a PHP version of jquery.spinner
Change-Id: I7622b08ec89525d24a4a1a755ffeee1aace9d382
2020-03-13 18:06:29 +01:00
jenkins-bot
4b5619b34a Merge "mediawiki.confirmCloseWindow: Add missing localisation message" 2020-03-13 16:37:31 +00:00
jenkins-bot
4679e54888 Merge "mediawiki.jqueryMsg: Document and test param cloning behaviour" 2020-03-13 16:35:25 +00:00
jenkins-bot
852139c6e4 Merge "Reduce the length of 6 long lines of code" 2020-03-13 10:10:24 +00:00
jenkins-bot
c731a4501c Merge "API: Fix fetching login token from action=query&meta=tokens on private wikis" 2020-03-13 09:59:52 +00:00
jenkins-bot
f9bc3c2155 Merge "XmlDumpWriter: fix blob address output in stubs" 2020-03-13 09:51:10 +00:00
Translation updater bot
d3ab01b13d Localisation updates from https://translatewiki.net.
Change-Id: I666c3c8204deb7295b63e016ae85432966aa1032
2020-03-13 08:06:55 +01:00
jenkins-bot
c628e74b7f Merge "Tests: Remove unneeded uses of global $wgUser" 2020-03-13 04:46:01 +00:00
jenkins-bot
c4551183ed Merge "Make MessageCache::getParserOptions private" 2020-03-13 04:40:08 +00:00
DannyS712
6191976e50 Make MessageCache::getParserOptions private
Bug: T247189
Change-Id: I3f1eda919f9b236c3215f66231c52ce658706bfe
2020-03-13 03:09:32 +00:00
DannyS712
f7b180e151 Add ContentModelChange and api to release notes
Change-Id: I2c3b85b0548c64eb4218ef257d56aa805f8a1a6b
2020-03-13 02:56:03 +00:00
jenkins-bot
e0b87b36cd Merge "Update symfony/yaml to 5.0.5" 2020-03-13 01:31:24 +00:00
Sam Wilson
bada529138 Reduce the length of 6 long lines of code
This shortens some lines below 120 characters when a tab is
counted as 4 characters (not that line lengths are currently
counted like that).

Bug: T243598
Change-Id: I828cd540268810bd56589885e38ad03f8bafc6f9
2020-03-13 09:01:14 +08:00
jenkins-bot
c7c82cb15f Merge "Allow storing additional CSP sources in ParserOutput" 2020-03-13 01:00:03 +00:00
Brian Wolff
89be2c5820 Allow storing additional CSP sources in ParserOutput
This adds methods to ParserOutput ::addExtraCSPStyleSrc,
::addExtraCSPDefaultSrc, and ::addExtraCSPScriptSrc, to easily
allow parser tags/functions to add additional CSP sources if their
tag needs it. Previously such an extension would need to use
and OutputPage hook. This is modeled on how addModules() works.

The immediate use case is for Kartographer (T240960), although
its expected that lots of extensions might do something like this,
especially extensions used outside of Wikimedia.

Change-Id: I24e5f0b4edff58025a0c2a3e1a9aa3f62eb7db7b
2020-03-12 17:39:51 -07:00
Reedy
6956896226 Update symfony/yaml to 5.0.5
Change-Id: I45ec5bf456043aac0b2d70349eedf549578e51d5
Depends-On: I05928398273941c9b247532a9d15ec563ab98547
2020-03-13 00:35:46 +00:00
Reedy
eed0b13a11 Update symfony/yaml to 4.4.5
Change-Id: I279b5b1415b293181717ee0049e4e4ae24bb4469
2020-03-13 00:34:50 +00:00
jenkins-bot
3fb7e265eb Merge "DevelopmentSettings: Set EnableJavaScriptTest to true" 2020-03-12 22:40:17 +00:00
Michael Große
25abda60a1 mediawiki.jqueryMsg: Document and test param cloning behaviour
Follows bb48ecbbc7.

This adds some documentation and renames the property that checks if a
non-string replacement has been used multiple times. The goal is to be
more mindful of other code that might inspect it.

A test is added to assert that the replacements are only cloned from the
second use onward, in case someone holds on to the inject object to
listen for clicks or something similar.

Change-Id: Icd1e06ed50f12483cf0884027e83dacf17eebb02
2020-03-12 22:31:54 +00:00
Kosta Harlan
880938593e DevelopmentSettings: Set EnableJavaScriptTest to true
Bug: T247285
Change-Id: Id973426b31eb1c98bff49ea135d0d64de09fcbbe
2020-03-12 22:26:10 +00:00
jenkins-bot
1e98ecf1c3 Merge "resourceloader: Support single-file component .vue files" 2020-03-12 22:16:10 +00:00
Roan Kattouw
ca46126e98 resourceloader: Support single-file component .vue files
Allows .vue files to be used in package modules as if they were .js
files: they can be added to the 'packageFiles' array in module
definitions, and require()d from JS files.

In the load.php output, each .vue file is transformed to a function that
contains the JS from the <script> tag, then a line that sets
module.exports.template to the contents of the <template> tag (encoded
as a string). The contents of the <style> tag are added to the module's
styles.

Internally, the type of a .vue file is inferred as 'script-vue', and the
file is parsed with VueComponentParser, which extracts the three parts.
After the transformation, the file's type is set to 'script+style', and
files of this type contribute to both getScript() and getStyles().

This change also adds caching to getPackageFiles(), because it now needs
to be called twice (in getScript() and getStyles()).

Change-Id: Ic0a5c771901450a518eb7d24456053956507e1ed
2020-03-12 14:32:41 -07:00
jdlrobson
73c20062e0 mediawiki.legacy.shared is merged into existing skin modules and removed
Skins that are using ResourceLoaderSkinModule will need to update their
features to include `legacy`

Note that Ic7af947cfd5a5df4218f006232ede4ee7ed36c62 for Vector
and I6471bc169f3c2a1f51e17b8ee26ac245b0374c18 for Monobook should
be merged in the same release as this patch to ensure these styles
do not disappear from those skins. Minerva or Timeless will not be impacted.

Changes for other skins including Modern and CologneBlue to follow
where needed.

Bug: T242177
Change-Id: Icb910a563273bde92a09b1bb92857d5b6e348baa
2020-03-12 13:17:24 -07:00
jenkins-bot
1f1cff797a Merge "Upgrade codesniffer to 30.0.0 and semver to 1.5.1" 2020-03-12 18:03:08 +00:00
jenkins-bot
9c023275d8 Merge "Remove $options parameter from OutputPage::parserOptions" 2020-03-12 17:47:45 +00:00
jenkins-bot
2296134f52 Merge "Add PSR-4 mappings for existing namespaces and the top level" 2020-03-12 17:44:05 +00:00
jenkins-bot
43705de4f9 Merge "Add RefreshSecondaryDataUpdate and use it in DerivedPageDataUpdater" 2020-03-12 17:43:57 +00:00
James D. Forrester
7ecc689787 Upgrade codesniffer to 30.0.0 and semver to 1.5.1
Change-Id: If1a68e39a5ee60f247143c2920178c7401d2c84b
Depends-On: I654f213365eb52a82ddeacda023a694095a4ba10
2020-03-12 08:59:52 -07:00
James D. Forrester
8c4687243c Upgrade wikimedia/assert from 0.4.0 to 0.5.0
Depends-On: I7704fd5224d26514f0b1a6d41b9d35c07585d389
Change-Id: If9e606ff04ead740757d28c249658c322dba8f8d
2020-03-12 15:27:53 +00:00
jenkins-bot
3fb4bd33d8 Merge "Don't show a link to email system users on Special:UserRights" 2020-03-12 11:59:21 +00:00
Translation updater bot
558dfe8052 Localisation updates from https://translatewiki.net.
Change-Id: Ia62fef773f0d8e1eb20ea98ed5a3e2cda6ef6220
2020-03-12 08:06:53 +01:00
Sam Wilson
225174e0e3 Update message docs for option-list messages
A new documentation template exists on TranslateWiki:
https://translatewiki.net/wiki/Template:Doc-mediawiki-options-list
giving a central place to document the format of these messages
(which are already the same anyway).

Change-Id: I618444290a43b5dd19af0625106d0381826896e3
2020-03-12 14:25:05 +08:00
jenkins-bot
b902067484 Merge "resourceloader: Error in FileModule if provided path is a directory" 2020-03-12 01:45:47 +00:00
jenkins-bot
6aaf41a1f7 Merge "resourceloader: Factor out file loading in ResourceLoaderFileModule" 2020-03-12 01:45:00 +00:00
James D. Forrester
43939abbf7 resourceloader: Error in FileModule if provided path is a directory
Pre-PHP74, these would silently return false; now they throw an error.

Bug: T233012
Change-Id: I9bcb98fa1189c3d59a67a054c5b807d1495d82bb
2020-03-12 01:32:18 +00:00
James D. Forrester
8595db5546 resourceloader: Factor out file loading in ResourceLoaderFileModule
This file had six different almost-identical calls to the system
call file_get_contents(), which makes it hard to fix all nine of
them neatly.

Change-Id: I607f3cd3dbfa0f47f8d9766a27e581fdc127a0cf
2020-03-12 01:31:32 +00:00
DannyS712
3275ef7f5e Tests: Remove unneeded uses of global $wgUser
Tests still pass -> wgUser isn't needed

Bug: T243708
Change-Id: I931f01bc132a5777c27a4296a14fd734a23ca099
2020-03-12 00:52:43 +00:00
James D. Forrester
ba9a90c608 Upgrade less.php from 1.8.2 to 3.0.0 (no-op)
Number bumps to reflect SemVer environmental requirements
breakage (whoops).

Change-Id: I736559d6db92a16c97dd18b19611b83daa17f407
Depends-On: Ic855187a2306fd3b3ee268f83909aaae0efd3d06
2020-03-11 16:31:17 -07:00
Bartosz Dziewoński
da2a97a46f mediawiki.confirmCloseWindow: Add missing localisation message
The code was introduced in I5d35b6fddd7, which copied the
code from UploadWizard, but forgot about the localisation
message.

Change-Id: I8a7290bb6961a0a397b99427c5da2d4cbbe6f251
2020-03-11 23:20:33 +00:00
jenkins-bot
e569e341fd Merge "maintenance: Remove --mwdebug option" 2020-03-11 22:12:42 +00:00
jenkins-bot
e005e08768 Merge "Add a ContentModelChange helper, and an api module that uses it" 2020-03-11 22:10:01 +00:00
jenkins-bot
8e18833778 Merge "Remove usage of deprecated static Revision methods from actions" 2020-03-11 22:09:35 +00:00
jenkins-bot
7932a7cb52 Merge "Remove usage of deprecated Revision from ApiEditPage" 2020-03-11 22:08:20 +00:00
jenkins-bot
486fcdb86d Merge "ApiEditPage: add baserevid parameter" 2020-03-11 21:54:10 +00:00
jenkins-bot
f9484f6f8e Merge "SpecialEmailUser: Set user text field to required" 2020-03-11 20:25:59 +00:00
jenkins-bot
cb56548124 Merge "Localisation updates from https://translatewiki.net." 2020-03-11 20:05:56 +00:00
DannyS712
2c454b32f0 Don't show a link to email system users on Special:UserRights
Bug: T247437
Change-Id: I7347c6b1d8f421793aafa959ac9250cb3e4cca1f
2020-03-11 18:49:19 +00:00
Timo Tijhof
624c629300 maintenance: Remove --mwdebug option
I added this in fdb7d36903 when DevelopmentSettings.php was fairly
basic and might have even been harmless to include in production
(unverified at this point).

The use case was easy injection by WMF CI and Travis CI,
but we never ended up using that. Both for CI and for local
development we have converged on the debuggable/non-magical way
of injecting it, which is explicitly placing it in LocalSettings.php
at the point where the developer is in control of it.

It also means it consistently applies no matter which script you
run, including on the web, which makes sense as the site settings
shouldn't change unexpectedly.

An alternative might be to make this configurable and only
available in a special development mode, and not in prod. However
that creates a bit of a paradox. If we require admins to place
something in LocalSettings to make this available, might as well
make that line of code be "require DevelopmentSettings.php",
equally easy to copy/paste and comment out.

Change-Id: Iffc58599581bf20b5880b7c57259e8b37ddf9dcb
2020-03-11 17:57:01 +00:00
Thalia
f226643945 SpecialEmailUser: Set user text field to required
Bug: T247430
Change-Id: I3a3ce61c8af61cc7e882f5e4b3350a2d2be68c54
2020-03-11 17:51:12 +00:00