Commit graph

94790 commits

Author SHA1 Message Date
Timo Tijhof
75ccdc6147 languages: Move default $wgNamespaceAliases to MessagesEn.php
These are not configuration but business logic, similar to the
canonical names that are in NamespaceInfo.php, these must always
exist and cannot be altered or unset.

They were previously unconditionally assigned during all requests
in Setup.php and passed down as "site configuration".

Changes:

* Move them to MessagesEn.php where they can be cached and
  processed the same way as other core-provided aliases.

  Document and confirm with tests that this is a mergeable
  attribute that follows the language chain.

* Remove the duplicated code in a few places that was reading
  this variable + Language::getNamespaceAliases(), to instead
  just call the latter and move the logic there, centralised,
  and tested.

  In doing so I noticed that these were applied in an
  inconsistent order. Sometimes the config won, sometimes not.
  There's no obvious right or wrong way here, but I've chosen
  to standardise on the way that Language::getNamespaceIds() did
  it, which is that config wins. This because that method seems
  to be most widely used of the three (it decides how URLs and
  titles are parsed), and thus the one I least want to change
  the behaviour of.

* Document that $wgNamespaceAliases may only be used to
  define (extra) aliases, it is and never was a way to access
  the complete list of aliases.

Bug: T189966
Change-Id: Ibb14181aba8c1b509264ed40523e9ab4000fd71a
2020-03-14 19:27:40 +00:00
Timo Tijhof
e8d9d68b86 Setup: Remove compat for $wgUseSquid and friends
Follows-up f9f8dff40 (MediaWiki 1.34).

Bug: T189966
Change-Id: Ifc0022783e6b5e739d754f5a5060742d5ab42500
2020-03-14 16:59:26 +00:00
jenkins-bot
dcb93e016b Merge "Use MediaWikiServices::getRepoGroup" 2020-03-14 16:35:42 +00:00
Umherirrender
878330ae30 Use MediaWikiServices::getRepoGroup
Change-Id: Ibcef425c2e0c95d6d2f98b8d889f85ebcb33f20a
2020-03-14 13:16:12 +01:00
jenkins-bot
216d109a84 Merge "Setup: Move wgSkipSkins appendix to Skin::getAllowedSkins" 2020-03-14 09:03:23 +00:00
Reedy
fe94d1b39a tests: Use ::class rather than string class name
Change-Id: I50cf50e93917ba81fa846a7ea50ac2883e3167e5
2020-03-14 02:00:55 +00:00
jenkins-bot
bd0f1b8c78 Merge "Enhance passwored reset message" 2020-03-14 00:53:26 +00:00
Timo Tijhof
50c3a47140 Setup: Move wgSkipSkins appendix to Skin::getAllowedSkins
This isn't a default setting or fallback, it's unconditional
business logic that can't be overidden. This doesn't need to
run on every web request in Setup.php.

Bug: T189966
Change-Id: I708131b111cd2ff0e34c3cc8a4b933eff260b3da
2020-03-13 23:45:12 +00:00
jenkins-bot
bc72208733 Merge "OutputPage: Only export wgUserNewMsgRevisionId if non-null" 2020-03-13 23:30:36 +00:00
hmonroy
1426f6354c Enhance passwored reset message
Add a more general message for password reset request submissions.

Bug: T246844
Change-Id: I45e9db992ea113c44f7603081754ac9a575a5da6
2020-03-13 16:18:48 -07:00
jdlrobson
88a44e9eab Deprecate mediawiki.legacy.oldshared
Depends-On: I733cd966c678ede559be1edfb33acac89e96f88d
Depends-On: Ia2fd35431184fc4e2be1a223efae764cdc5ff3e4
Bug: T242177
Change-Id: I8bb209fd9ce93aa556ae6cf0f0db415957edae5e
2020-03-13 23:13:54 +00:00
Timo Tijhof
e08e9609ff OutputPage: Only export wgUserNewMsgRevisionId if non-null
Bug: T53640
Bug: T233676
Bug: T231168
Change-Id: Ia4f07bb90e6ed029d87947e7cf62c5a5d69726e9
2020-03-13 22:27:13 +00:00
jenkins-bot
2c96d9d23e Merge "OutputPage: Remove 'wgMonthNamesShort' from mw.config" 2020-03-13 22:06:25 +00:00
jenkins-bot
bf937f71ba Merge "Updating pear/mail_mime (1.10.6 => 1.10.7)" 2020-03-13 21:05:27 +00:00
Timo Tijhof
490d5c7acd OutputPage: Remove 'wgMonthNamesShort' from mw.config
This internal variable was exported on all page views for all users
for use by jquery.tablesorter.

This feature has not used it since 2013 (commit 65f11938e8),
where it was migrated to use the mediawiki.language module instead.

Bug: T48496
Bug: T219340
Change-Id: I1c9b012d633ffd76a31be5822fd2f4f984e1fb5c
2020-03-13 20:45:20 +00:00
James D. Forrester
d264915bbf package.json: Upgrade acorn to 7.1.1
Change-Id: I8e1d042615d469491a624343c30d3890dd22f701
2020-03-13 13:11:10 -07:00
jenkins-bot
13e8e9d97f Merge ""Enable 'site' and 'site.styles' modules on mobile target (take 2)" 2020-03-13 20:04:33 +00:00
jenkins-bot
799e7433c4 Merge "Setup: Improve section docs to better explain the pre-config setup" 2020-03-13 18:48:28 +00:00
jenkins-bot
86e2984464 Merge "Use unified cross-browser code for search input vendor property overrides" 2020-03-13 17:24:58 +00:00
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
Timo Tijhof
9e44459031 Setup: Improve section docs to better explain the pre-config setup
Also remove some comments that didn't help understand the line
below (e.g. "install header callback" above "HeaderCallback::install")

Bug: T189966
Change-Id: Ib0b413c557f83f8f58683515fcdbf1817fe1f661
2020-03-13 16:27: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
Reedy
6e212c43a7 Updating pear/mail_mime (1.10.6 => 1.10.7)
Change-Id: I95f3cbe7cecb63dfff4ef06bd62319af1d74ad11
Depends-On: I12a64fd3bc741b79fc1f447cc64646e0388b4b7e
2020-03-13 01:50: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