Commit graph

106610 commits

Author SHA1 Message Date
Umherirrender
808191ebc4 resourceloader: Change Context::getHash to always pass strings to implode
implode is documented as taking a string[], not mixed with int or null.
Explicitly cast or remove those instead of the implicit handling by PHP.

Change-Id: I0fac52c861bf85e09571b61a899b7a041aa77914
2021-11-03 00:32:42 +00:00
jenkins-bot
7c0ffb3b24 Merge "language: Fix nullable documentation for property, args and return types" 2021-11-02 10:21:05 +00:00
jenkins-bot
4523ace969 Merge "Special:Contributions - verify early year and month are ints" 2021-11-02 08:51:54 +00:00
Translation updater bot
707cf746f4 Localisation updates from https://translatewiki.net.
Change-Id: I61b008e12e92fc4a350b2e687f9cc95c4253c88c
2021-11-02 07:55:50 +01:00
Petr Pchelko
92a88e4e07 Special:Contributions - verify early year and month are ints
Bug: T293293
Change-Id: I96cf8a24a329dad26e2bf76bf4495c192e296577
2021-11-01 19:16:12 -07:00
Volker E
4c47d37688 Update WVUI to v0.3.2
Release notes: https://gerrit.wikimedia.org/r/plugins/gitiles/wvui/+/refs/tags/v0.3.2/CHANGELOG.md#v0_3_2-2021_11_01

Bug: T290392
Change-Id: I8fb7761e60be330e58cd017872318fe3675c0be1
2021-11-01 17:39:44 -07:00
Umherirrender
7e24705bcd Exclude null values for flag UserOptionsManager::EXCLUDE_DEFAULTS
isset returns false for null and the null values are not compared,
that treats them as non-default, even the default is also null.

Bug: T291748
Follow-Up: I6e61c11d8aed27b4b559e74849e0056e5eef3638
Change-Id: I0a0932b403098967c261eee3dc0e7d5da3c4fffb
2021-11-01 20:44:13 +01:00
jenkins-bot
bba758a65c Merge "Remove unused class fields in LinkRenderer" 2021-11-01 16:22:24 +00:00
jenkins-bot
bde944737d Merge "Use PageUpdater in API test to add revision" 2021-11-01 15:34:31 +00:00
Michael Große
045f1ffb4c Remove unused class fields in LinkRenderer
NamespaceInfo was added in
I4af843238ffd58925f57c0f7b98253a90cb285ec
and removed in:
I5c9ea04a9deca136bb7210f07200d18f97fd6686

Change-Id: I64612b57b0e5e5c7c126d7434e5b108fc735ac57
2021-11-01 15:59:42 +01:00
jenkins-bot
35d9c32cc4 Merge "Hard-deprecate Content::getParserOutput and AbstractContent::fillParserOutput." 2021-11-01 13:57:42 +00:00
Maggie Epps
850dcfa4bb Watchlist: Add space in filters checkbox
Uses \n string to manually create space between checkboxes and labels

Bug: T286262
Change-Id: I9a00a3f26f8c6faa854652c60cb9429e6b92d67d
2021-11-01 12:49:10 +00:00
WMDE-Fisch
e686e06c38 Use PageUpdater in API test to add revision
Change-Id: I9ba1357c0556d572594f4750403b24b5b8cdbdc0
2021-11-01 10:49:52 +01:00
jenkins-bot
5de5c90ac4 Merge "tests: Merge test cases into data provider & remove helper method" 2021-11-01 09:44:30 +00:00
Translation updater bot
1a274810ff Localisation updates from https://translatewiki.net.
Change-Id: I6d7aaa801b5e45b1c2fc7f0c064a6c58968416e4
2021-11-01 09:20:00 +01:00
James D. Forrester
20fd877da4 Drop experimental FileJournal system without deprecation
The feature was introduced in 2012 with d19f54602f (just before
the gerrit migration).

Change-Id: Ia3f59ad0ddeb1f610947b14e22b0694ff4c6ed84
2021-11-01 14:08:09 +11:00
Derick Alangi
29ddb9b716 tests: Merge test cases into data provider & remove helper method
NOTE: Deprecated `Http::isValidURI()` was updated to the recommended
method code.

Change-Id: I419f18a43278ca5926047037cecb4fa9bcb2017a
2021-10-31 19:58:49 +01:00
jenkins-bot
1d5332977b Merge "resourceloader: Remove use of Timing class" 2021-10-30 06:52:33 +00:00
jenkins-bot
1223ffe800 Merge "objectcache: remove "onHostRoutingPrefix" feature from WANObjectCache" 2021-10-30 05:40:24 +00:00
Aaron Schulz
6465b9f60e objectcache: remove "onHostRoutingPrefix" feature from WANObjectCache
This feature no longer seeems to be needed at this time and is
not worth the complexity in that case.

Bug: T264604
Bug: T288702
Change-Id: I059ab57236ab2281183110bd65dcf23b1fa7405d
2021-10-30 05:19:47 +00:00
Aaron Schulz
be0af1a960 rdbms: improve clarity of Database::canRecoverFromDisconnect and add logging
Bug: T281451
Change-Id: I014a56d97008e7dd32b7dc59964ee8158a1b0ca5
2021-10-29 20:37:35 -07:00
jenkins-bot
7c89521936 Merge "Force using HTTP 1.1 for SwiftFileBackend" 2021-10-29 20:52:39 +00:00
jenkins-bot
6141883e41 Merge "MultiHttpClient: Allow setting HTTP protocol version in curl" 2021-10-29 20:50:27 +00:00
jenkins-bot
50e133a8b2 Merge "Follow-up I86568863: mw-ui-button: Reduce specificity of margin rule" 2021-10-29 17:59:20 +00:00
Alexandros Kosiaris
5a62ea7d77 Force using HTTP 1.1 for SwiftFileBackend
We want to force the use of HTTP/1.1 instead of leaving it up to the host
default which might be HTTP/2, introducing a performance regression for
large uploads.

Since we have to pass this to every run()/runMulti(), set it as a private
constant that can be passed directlry or added to existing option arrays.

Bug: T275752
Change-Id: Ifbae4d585daee28fa92b07f53c5854320a18a311
2021-10-29 10:54:26 -07:00
Alexandros Kosiaris
afe2d229c9 MultiHttpClient: Allow setting HTTP protocol version in curl
For context see T275752, but the premise is that we want to be able to
set the HTTP protocol version so that for specific use cases. That way
we will be able to use the proper protocol per use case, mitigating
potential future regressions or selectively rolling out a newer protocol
version per use case. Support setting CURLOPT_HTTP_VERSION, while making
sure to default to the current default which lets curl decide which
version to use

CurlHttpRequest already forcibly set this to 1.0 for what is worth

Bug: T275752
Change-Id: I82f4f174997ecaa54e33eb848b5f007c982506dd
2021-10-29 10:52:35 -07:00
jenkins-bot
5b27523cee Merge "actions: Update deprecated code in Actions::checkCanExecute()" 2021-10-29 11:15:41 +00:00
Roman Stolar
957697e1e0 Hard-deprecate Content::getParserOutput and AbstractContent::fillParserOutput.
Use ContentRenderer::getParserOutput instead.
Extensions defining a content model should override ContentHandler::fillParserOutput.
Update tests.

Bug: T287158
Change-Id: I1c71a8429806f1813a39f5807256b2eb9fb9901f
2021-10-29 14:04:22 +03:00
jenkins-bot
4a371b7e04 Merge "specialpage: Remove deprecated check of special page object checks" 2021-10-29 10:57:22 +00:00
daniel
c1fce9dfd6 wfParseUrl: add regression test for T294559
As of PHP 7.2, parse_url does not correctly handle ports on protocol
relative URLs. Ensure that we properly compensate for this.

Bug: T294559
Change-Id: I52c661cbff5e6f28120b50111659255d712d6887
2021-10-29 10:57:14 +02:00
Translation updater bot
fd36d1f1f7 Localisation updates from https://translatewiki.net.
Change-Id: I6f618dceabdf5d6d0c690f2ca691dbafdc3fc49d
2021-10-29 08:05:35 +02:00
jenkins-bot
95af3986a1 Merge "Metrics: Add test coverage for getRenderedSamples() and send()" 2021-10-28 20:32:53 +00:00
jenkins-bot
6080c9df86 Merge "Revert "wfParseUrl: rely on parse_url for proto-relative urls"" 2021-10-28 19:26:21 +00:00
Urbanecm
a568fdedc3 Revert "wfParseUrl: rely on parse_url for proto-relative urls"
This reverts commit 66e58d1ea7.

Reason for revert: let's revert and hope this will fix T294559

Bug: T294559
Change-Id: I2e4ae268e288f87b6c80fac08d275118f5b5cbd7
2021-10-28 19:04:46 +00:00
Derick Alangi
2c10f768f0 actions: Update deprecated code in Actions::checkCanExecute()
Inspired by T290004, attempting to solve that ticket will be done
in the next patch on this one.

Bug: T290004
Change-Id: I431e3eba1bcfb446a4ab60aa3d2189762ea9f65f
2021-10-28 11:23:32 +01:00
Translation updater bot
0bfe17ad12 Localisation updates from https://translatewiki.net.
Change-Id: I721939651894221c68271233a282e59d8319094c
2021-10-28 08:08:34 +02:00
jenkins-bot
266bd90188 Merge "Use UndeletePage from ApiUndelete" 2021-10-28 05:05:09 +00:00
jenkins-bot
8274d7dbd6 Merge "Use expectException() in ActionTest" 2021-10-28 02:05:51 +00:00
Daimona Eaytoy
55b1c430ed Use expectException() in ActionTest
This way the intent is clearer, and it also properly covers the case
where the exception isn't thrown.

Change-Id: I7831382956d5bc204b695fecc47f7111519d53af
2021-10-28 03:05:43 +02:00
Nicholas Ray
45c003e1ce Change checkboxHack bindToggleOnSpaceEnter function
This refactors the bindToggleOnSpaceEnter function to use keydown and
keyup listeners to provide the space/enter key functionality. This
provides the following benefits:

* A click event is triggered when pressing the space or enter key on the
passed in "button" element. This simulates native button behavior which
triggers a click event when these keys are pressed.

* Checkboxhack menus will no longer toggle rapidly when holding down the
space/enter keys.

Bug: T291096
Change-Id: I1ea65112fa6b527f1bd9118212838298399996aa
2021-10-27 17:06:17 -06:00
jenkins-bot
7766b0206e Merge "Give skins more flexibility over table of contents render" 2021-10-27 23:02:57 +00:00
Derick Alangi
8c87a766b5 specialpage: Remove deprecated check of special page object checks
We should pass the special page names as an array of strings and create
the instances of these specials pages in the factory instead. In 1.34, we
deprecated passng instances of special pages in $wgSpecialPages for example.

Bug: T245128
Change-Id: I089ffd0f9983812ae621b2aef592c2059125ee7d
2021-10-27 22:53:59 +01:00
Nicholas Ray
d99dd4040e [BREAKING] Change cleanup API of checkboxHack
Before this commit, each bind function would return an object containing
a reference to the function used in the event listener creation with the
intention that this could later be used to cleanup the event listeners.
This is problematic for the following reasons:

* In order to cleanup the event listener, it forces the client to know
which element the event listener was added to (button, checkbox,
document, window, etc.),. the event type that was used ('click',
'focusin', etc), and whether or not the "useCapture" param was also
used. The `removeEventListener` API won't remove the correct event
listener unless these three pieces of info are known by the client [1].

* Because the above point is tricky to get right, numerous potential
memory leaks were possible with the `unbind` function as the
`useCapture` param wasn't being passed in some cases.

This commit aims to simplify the cleanup API by returning an anonymous
function in each bind function that the client can call to cleanup the
relevant event listeners without knowing any of the implementation
details. This also makes the `unbind` function unnecessary.

** This is a breaking change to the checkboxHack API ** but because
there aren't any known clients of the return values [2], a formal
deprecation process was assumed to be unnecessary. Note gadgets should
not be using the internal function mw.loader.require so these were
not considered.

[1] https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener#matching_event_listeners_for_removal
[2] https://codesearch.wmcloud.org/search/?q=checkboxHack&i=nope&files=&excludeFiles=&repos=

Bug: T291096
Change-Id: Ia2d79f27dd81fdc74a44829da3ca472f4c01d4b5
2021-10-27 18:25:49 +00:00
jenkins-bot
b2d441658f Merge "Upgrade RemexHtml to 3.0.0" 2021-10-27 17:27:46 +00:00
jenkins-bot
94ff9fc6cd Merge "Selected links should not be red." 2021-10-27 16:42:17 +00:00
Tim Starling
6273b5f932 Upgrade RemexHtml to 3.0.0
This is required by Parsoid 0.15.0-a6.

I don't need to increment the Parsoid version here since it is
not using semantic versioning. The caret will allow upgrades until the
Glorious Future of 1.0.0.

Depends-On: I72346a431f556555410f6af64bdb10140ea9bd8a
Change-Id: Idefebb725444d244252623533b8469214324f931
2021-10-27 16:29:18 +00:00
Translation updater bot
d27bf77b4d Localisation updates from https://translatewiki.net.
Change-Id: I632bb2ded31697298118a1ce38efd86333374810
2021-10-27 08:07:55 +02:00
Ed Sanders
e5f26988b1 Follow-up I86568863: mw-ui-button: Reduce specificity of margin rule
This rule can continue to apply to all buttons. Increasing
the specificity caused regressions.

Bug: T294286
Change-Id: I8bf02e81df56cafa221daeeb0f36e0305c6d9816
2021-10-26 23:27:42 +01:00
Umherirrender
b9269eda80 resourceloader: Remove use of Timing class
Do it self to avoid the global state of the Timing class within the
resourceloader.
Replaced the deferred update with a scoped callback to send stats on all
possible return path for the called function, but directly when needed
and not deferred, which can make wrong times.
The old code was using a fix mark set be
MediaWiki::doPostOutputShutdown, where a defered send does not has
impact of the send stats

Change-Id: I5fec6a73db3e7c3ac6a6ac33bb293727ae3a38ca
2021-10-26 22:58:07 +02:00
jenkins-bot
fdaf95c524 Merge "ApiQueryImageInfo: don't show empty comments as deleted" 2021-10-26 19:59:25 +00:00