Commit graph

93996 commits

Author SHA1 Message Date
James D. Forrester
ec60dbbaea Follow-up 8cd2e13: Setup: Check that 1x key has been set in wgLogos before using
Bug: T232140
Bug: T244370
Change-Id: If1e0a384db6584d8854d7f39313ee62ae8423a7f
2020-02-05 07:44:16 -08:00
Translation updater bot
7516cb05fa Localisation updates from https://translatewiki.net.
Change-Id: Ic5fc5056b0a1d76174728694b9745281496357e4
2020-02-05 07:54:17 +01:00
jenkins-bot
292a1ab9ed Merge "Remove the need for Vector's ResourceLoaderLessModule and wgVectorPrintLogo" 2020-02-05 02:20:20 +00:00
jenkins-bot
8d1a7b906e Merge "Deprecate access of logos directly from config, introduce wgLogos" 2020-02-05 02:09:32 +00:00
jdlrobson
7931d76b96 Remove the need for Vector's ResourceLoaderLessModule and wgVectorPrintLogo
This allows us to remove code in Vector by using the newly added
wgLogos (see I569e0d800e147eabc7852567acd140108613f074)

The ResourceLoaderSkinModule with the logo feature enabled will surface
the horizontal wordmark at the top of pages for printed media.

Change-Id: I00899c16c0325f36b671baf17e88c2b5187b3526
Bug: T242177
Bug: T232140
2020-02-05 01:34:33 +00:00
jenkins-bot
0da73acefb Merge "Use faster pako library for deflating in the client" 2020-02-05 01:31:13 +00:00
jenkins-bot
5d162cb7d1 Merge "docs: Improve "Entry points" documentation page" 2020-02-05 01:31:07 +00:00
jenkins-bot
0041ac9e2a Merge "build: Update qunit and all karma-related tools to latest" 2020-02-05 01:09:21 +00:00
jenkins-bot
7b54f5dc3d Merge "rdbms: add GREATEST/LEAST wrappers to IDatabase" 2020-02-04 22:03:11 +00:00
Timo Tijhof
bc1f601382 docs: Improve "Entry points" documentation page
Turn this into a doc group, and let the descriptions come
directly from the files in question. This makes the list easier
to maintain, and alsom means that the overview page becomes
discoverable whenever one is looking at the entry point file
as well. Previously the doc page pointed to the entry points,
but not the other way around. This is also fixed.

Bug: T244294
Change-Id: I891c5a37e17592edc1136d7367949927121c8bc8
2020-02-04 21:44:38 +00:00
Brad Jorsch
724e1782db Add RestStructureTest
This tests validity of parameter definitions for the MW REST API, like
ApiStructureTest does for the Action API.

Bug: T243437
Change-Id: Iac9ca951d00573be6efe00cc07478c3581c84588
2020-02-04 20:30:10 +00:00
Brad Jorsch
d4c2f0d899 Move some validation logic from ApiStructureTest to ParamValidator
ApiStructureTest has a lot of logic for validating Action API settings
arrays during CI. Some of that logic should be part of ParamValidator
instead.

Bug: T242887
Change-Id: I3c3d23e38456de19179ae3e5855397316b6e4c40
Depends-On: I04de72d731b94468d8a12b35df67f359382b3742
2020-02-04 20:29:35 +00:00
Brad Jorsch
c2b1525908 API: Use ParamValidator library
This brings significant modularization to the Action API's parameter
validation, and allows the Action API and MW REST API to share
validation code.

Note there are several changes in this patch that may affect other code;
see the entries in RELEASE-NOTES-1.35 for details.

Bug: T142080
Bug: T232672
Bug: T21195
Bug: T34675
Bug: T154774
Change-Id: I1462edc1701278760fa695308007006868b249fc
Depends-On: I10011be060fe6d27c7527312ad41218786b3f40d
2020-02-04 13:36:14 -05:00
jenkins-bot
054dd94e97 Merge "mw-config: Avoid nested calls to dirname(), use levels" 2020-02-04 17:44:50 +00:00
Derick A
7099094805 mw-config: Avoid nested calls to dirname(), use levels
`dirname()`: https://www.php.net/manual/en/function.dirname.php,
has a levels param that can be used for indicate the number of parent
directories to go up!

Change-Id: Ibdf6fbedbcf9b0eead1cfbf822d24ccae6652f3f
2020-02-04 16:53:09 +00:00
Peter Ovchyn
baa0e2a425 languages: Decrease visibility of public variables in LanguageConverter class
Bug: T243461
Change-Id: I461ce7daba3a6a85464a69f4de76b1740472702d
2020-02-04 16:53:15 +02:00
Peter Ovchyn
74b7a2bef9 parser: Inject a LanguageConverterFactory through DI containers:
Add braking changes into DefaultPreferencesFactory

Bug: T243321
Depends-On: I654620c1741c9f07f5c995f32292287b8d4a71ff
Change-Id: I0501cf49c5dc1dc7b157b475577cc9ebc380e8c7
2020-02-04 16:09:20 +02:00
Peter Ovchyn
50e3bd4fac parser: Inject a LanguageConverterFactory through DI containers:
1. into class Parser
2. into class LinkHoderArray
3. into class DefaultPreferencesFactory

Add more tests for DefaultPreferencesFactory:
1. testVariantsSupport verifies that converter with variants is used correctly.
2. Test testUserGroupMemberships verifies that membership is used correctly

Bug: T243320, T243321, T243317
Change-Id: I1e5c37e18332d0d32391c74c06e3d84862e48df8
2020-02-04 14:42:03 +02:00
Translation updater bot
874395c520 Localisation updates from https://translatewiki.net.
Change-Id: Id6c540435ed16bb91d1cfc3c1f44fd4fd3e578cd
2020-02-04 07:53:37 +01:00
jdlrobson
8cd2e13363 Deprecate access of logos directly from config, introduce wgLogos
Add getAvailableLogos static method and wgLogos config variable

Longterm we'll phase out wgLogo and wgLogoHD for this more extendable
config.

wgLogoHD is marked as deprecated. wgLogo continues to function as before
when wgLogos doesn't exist to cause minimum disruption.

From now on all logos should be accessed via getAvailableLogos. Patches
in Minerva and Vector follow. See I00899c16c0325f36b671baf17e88c2b5187b3526,
I569e0d800e147eabc7852567acd140108613f074 and
I013bd0904fe8c55efa49d14e84cf06ec1412896f.

Bug: T232140
Change-Id: I66a971631c623cc94b58eb0e5e5bad804789bf1c
2020-02-04 01:56:20 +00:00
Ed Sanders
f3baf07379 Use faster pako library for deflating in the client
The library is patched to remove the check for a global
`exports` varaible, so that it exports as a module
in ResourceLoader.

Bug: T236210
Change-Id: I6e9f06ea1214a8f4ded3235d7fda8234392ae98e
2020-02-03 17:05:57 -08:00
Thalia
36ed224b8f Fix IndexPager documentation to use correct terms in query
The $mIndexField and $mExtraSortFields properties are set in the
constructor according to the value of 'order', rather than 'count'.

Change-Id: I31298ca86bbc0b95391e60194a1d99a76c662764
2020-02-03 13:41:22 -08:00
James D. Forrester
8c3f6440e4 build: Update qunit and all karma-related tools to latest
karma                   3.1.4  →  4.4.1
 karma-chrome-launcher   2.2.0  →  3.1.0
 karma-firefox-launcher  1.1.0  →  1.3.0
 karma-qunit             2.1.0  →  4.0.0
 qunit                   2.9.1  →  2.9.3

Bug: T222293
Change-Id: I76d9fe8b6b189a9a334411f3b62014c234002edc
2020-02-03 13:28:24 -08:00
jenkins-bot
7c6ec9a895 Merge "RevisionStore: fail on mismatching hash or size." 2020-02-03 20:25:36 +00:00
jenkins-bot
e799b64254 Merge "Fix TextPassDumperDatabaseTest to work with 0.11 schema" 2020-02-03 19:50:18 +00:00
jenkins-bot
c63dd159ca Merge "Add more tests for the user class (factory and preferences mostly)" 2020-02-03 17:17:12 +00:00
jenkins-bot
3cd45de6ed Merge "languages: Add @group Language to all tests related to Language for easier navigation through tests" 2020-02-03 16:41:25 +00:00
Peter Ovchyn
863a1d5bdd languages: Move Converter and tests to respective files
Bug: T226833, T243760
Change-Id: I6fc7f267098d663fbefd0e78457726c343c9b3e4
2020-02-03 15:31:08 +02:00
Peter Ovchyn
6ee4f72d1d languages: Add @group Language to all tests related to Language for easier navigation through tests
Bug: T226833, T243761
Change-Id: Ied7d4a1db661f5cfaefe6c392348ff56b1a5616c
2020-02-03 15:29:59 +02:00
Peter Ovchyn
61e0908fa2 languages: Introduce LanguageConverterFactory
Done:
* Replace LanguageConverter::newConverter by LanguageConverterFactory::getLanguageConverter
* Remove LanguageConverter::newConverter from all subclasses
* Add LanguageConverterFactory integration tests which covers all languages by their code.
* Caching of LanguageConverters in factory
* Make all tests running (hope that's would be enough)
* Uncomment  the deprecated functions.
* Rename FakeConverter to TrivialLanguageConverter
* Create ILanguageConverter to have shared ancestor
* Make the LanguageConverter class abstract.
* Create table with mapping between lang code and converter instead of using name convention
* ILanguageConverter @internal
* Clean up code

Change-Id: I0e4d77de0f44e18c19956a1ffd69d30e63cf51bf
Bug: T226833, T243332
2020-02-03 11:38:03 +02:00
Translation updater bot
d60c1c1b3f Localisation updates from https://translatewiki.net.
Change-Id: I0059fc2f3b780dd547a32d1637b4a5fb1c7615ee
2020-02-03 07:55:20 +01:00
DannyS712
0e301253f1 Add more tests for the user class (factory and preferences mostly)
Add tests for
* ::newFromId, ::newFromConfirmationCode
* ::getStubThreshold, ::requiresHTTPS
* ::setItemLoaded, ::isItemLoaded
* ::getGroupMemberships

Expand tests for
* ::getCanonicalName

Bug: T233385
Change-Id: I2c47590e1cef35387aa376303ebfa09e54c0cc34
2020-02-02 07:55:06 +00:00
jenkins-bot
5ddbe251ac Merge "mw.special.preferences: Fix enhancements for email checkboxes" 2020-02-01 01:07:32 +00:00
jenkins-bot
1051bc5bf8 Merge "mw.special.preferences: Use editor font when "Treat signature as wikitext" is checked" 2020-02-01 00:32:27 +00:00
jenkins-bot
7f83dd05ad Merge "mw.special.preferences: Remove redundant try...catch" 2020-02-01 00:29:46 +00:00
Bartosz Dziewoński
d674d655dc mw.special.preferences: Fix enhancements for email checkboxes
Somehow this code seems to have slipped through the OOUI conversion?

Change-Id: Ib9aad9942a1956c126dcfb818c3b8c76349bc4db
2020-01-31 15:15:23 -08:00
Bartosz Dziewoński
a38664c957 mw.special.preferences: Use editor font when "Treat signature as wikitext" is checked
Change-Id: I72c022fbbbd09e6964391bd7511484099422fca4
2020-01-31 11:41:02 -08:00
jenkins-bot
4643327880 Merge "Click on "Previous page" thumbnail shouldn't lead from page 2 to page 0" 2020-01-31 18:46:12 +00:00
jenkins-bot
d68b5935db Merge "EditPage: Add 'warningbox' to cascading protection note for consistency" 2020-01-31 17:08:56 +00:00
Edward Chernenko
35c290b578 Click on "Previous page" thumbnail shouldn't lead from page 2 to page 0
When viewing a multi-page document, "previous page" thumbnail has page=
parameter, but when previous page is page #1, this parameter is omitted
(the link points to /wiki/File:Something.pdf,
not to /w/index.php?title=File:Something.pdf&page=1). This is correct.
Not having the page parameter means page 1 will be shown.

The line of JavaScript code touched in this patch created page=0 when the
parameter was missing. Such a page does not exist. It needs to start with
1 or be omitted. Asking for page 0 can cause misbehavior depending on the
wiki's configuration.

Bug: T241747
Change-Id: I701742f539822fbe26e69201241c9c4cb291953f
2020-01-31 14:43:19 +01:00
Translation updater bot
ed8604f229 Localisation updates from https://translatewiki.net.
Change-Id: Ib1eb92ce2249eadf6786686bf77b9507f708349c
2020-01-31 09:20:41 +01:00
Bartosz Dziewoński
9656d2a328 mw.special.preferences: Remove redundant try...catch
When the checks for $target.length were added in e0aa4128,
the try...catch wrappers became redundant.

Change-Id: I136bdf687c1db8632e9d355638734460f5e196e4
2020-01-30 23:28:51 -08:00
Martin Urbanec
56fd901bc0 Localize Special:Diff to tr
Bug: T243964
Change-Id: I25b38e99dcdd831256ec2bc242b165cebdae74b0
2020-01-30 20:40:31 +01:00
Bartosz Dziewoński
d0c84a8c68 EditPage: Add 'warningbox' to cascading protection note for consistency
Other protection warnings displayed by this function (via
LogEventsList::showLogExtract) are already styled that way
since 6fd6651c17.

Change-Id: Ibd1bb553ae012e55d8e3227ebc61b0d32c686e66
2020-01-30 11:26:49 -08:00
C. Scott Ananian
a20d4094f8 Deprecate/make private internal callbacks invoked inside Parser.php
Parser::magicLinkCallback() and Parser::makeFreeExternalLink() are not
called from outside the parser and have been made private.

Parser::attributeStripCallback() did have one use outside MediaWiki core,
so it has been deprecated rather than made private.  The one use inside
the parser has been converted to an anonymous callback.

Code search:
https://codesearch.wmflabs.org/search/?q=magicLinkCallback%7CmakeFreeExternalLink%7CattributeStripCallback&i=nope&files=&repos=

Change-Id: Id909b745f9dea1481d09de4747f4aa32648bf85b
2020-01-30 14:00:36 -05:00
James D. Forrester
194b2f25fc RELEASE-NOTES-1.35: Re-organise all the Parser removals into a block
Change-Id: I7a16c6e02816c99d4b6aefac50136274e8c4ae81
2020-01-30 14:00:36 -05:00
jenkins-bot
90e4949e3f Merge "Make private Parser::incrementIncludeSize(), which is not used outside the class" 2020-01-30 18:52:44 +00:00
jenkins-bot
2379d7c24b Merge "Hard-deprecate Parser::doBlockLevels(), which Parsoid won't support" 2020-01-30 18:27:25 +00:00
jenkins-bot
8fe9d55fdb Merge "Hard-deprecate Parser::fetchTemplate()" 2020-01-30 18:27:18 +00:00
jenkins-bot
51280df815 Merge "objectcache: fix cache pollution in WANObectCache Multi* methods" 2020-01-30 18:17:03 +00:00