Commit graph

100599 commits

Author SHA1 Message Date
jenkins-bot
ca93fc5eac Merge "Upgrade seld/jsonlint from 1.7.1 to 1.8.3 for PHP 8.0 support" 2020-12-22 23:05:28 +00:00
jenkins-bot
ed4835f9a4 Merge "DatabaseUpdater: Allow proper renaming of multiple indexes" 2020-12-22 22:26:59 +00:00
James D. Forrester
87f92a6b3d Upgrade seld/jsonlint from 1.7.1 to 1.8.3 for PHP 8.0 support
Change-Id: I1b9142ee5a7c8722fc268e25751e37e26c921b2c
2020-12-22 14:26:33 -08:00
jenkins-bot
a0034d1367 Merge "Pingback: Don't instantiate service if disabled by configuration" 2020-12-22 20:22:51 +00:00
jenkins-bot
b8ff3aa93b Merge "Pingback: Refactor for dependency injection and cover with tests" 2020-12-22 20:22:45 +00:00
jenkins-bot
9062904b00 Merge "Pingback: Re-order methods prior to refactor" 2020-12-22 20:07:34 +00:00
Timo Tijhof
b1856d9f38 Pingback: Don't instantiate service if disabled by configuration
The service has an early return already and the performance overhead
of scheduling, executing and instantiatingn the service and its deferred
update is extremely low.

But, it makes the overall system harder to reason about when execution
always runs through here. And it helps developers to isolate problems
and improve fault tolerance by being able to properly turn this off
if it or its dependencies are causing issues for whatever reason.

The dependencies it uses are quite core to MW, and so their issues
should not be ignored, but it makes the difference between a site
mostly working for readers and a site completely being down, because
on a stock MW install, Pingback is the only feature that uses
DeferredUpdates on regular page views by default.

Bug: T270540
Change-Id: I0d5da6bf3affdf8ab27239ef77fb8cfd87aa70d0
2020-12-22 19:13:58 +00:00
Timo Tijhof
43e3a6460b Pingback: Refactor for dependency injection and cover with tests
* Inject dependencies from the constructor and use those instead.

* Make getSystemInfo() static since its sole purpose is to collect
  global state. This also means it can be safely called from the
  Installer without needing to construct this class and its unsafe
  dependencies as the Installer was doing previously.

* Remove private 'id' member. This cached the fetchOrInsertId()
  return value but was never used.

* Remove selectField() fallback IGNORE-mode insert from fetchOrInsertId().
  This existed to handle concurrent writes, but this isn't possible
  since all this runs inside a DB_MASTER lock.

* Add missing call to $cache->makeKey().
  Avoid passing unformatted strings directly to BagOStuff methods.

Bug: T270540
Change-Id: I984526020ea4d5f0fd6f72b6be527edaf6ab0917
2020-12-22 19:13:53 +00:00
Timo Tijhof
cb27326ff3 Pingback: Re-order methods prior to refactor
- Arrange the methods in order of execution.
- Provide a single run() entrypoint for testing
  (added in the next commit).

Bug: T270540
Change-Id: I27369de38a033397aa15e3a7aba7a034dd1c94f3
2020-12-22 19:12:07 +00:00
jenkins-bot
9012e138a1 Merge "Cleanup some tests to reduce code duplications" 2020-12-22 17:54:54 +00:00
jenkins-bot
6913e74fb6 Merge "Provide native support to dismiss sitenotice in core." 2020-12-22 15:45:39 +00:00
jenkins-bot
6bae9d6dcc Merge "Improve docs in WebRequest/WebRequestUpload" 2020-12-22 07:41:02 +00:00
jenkins-bot
67606abc19 Merge "Localisation updates from https://translatewiki.net." 2020-12-22 07:30:01 +00:00
jenkins-bot
76e9192582 Merge "Remove unneeded GhostFieldAccessTraitTest::setUp" 2020-12-22 07:29:25 +00:00
Translation updater bot
63c4044a02 Localisation updates from https://translatewiki.net.
Change-Id: Ic60fdcde9a4267636da244d07e08a80052e37c0d
2020-12-22 08:28:57 +01:00
Ammar Abdulhamid
14ce139f94 Provide native support to dismiss sitenotice in core.
This patch adds a private method and other mechanisms to handle
generation of dismiss button for site notices (which are already
generated by core).

It also adds the $wgDismissableSiteNoticeForAnons global with its
default as set in the DismissableSiteNotice extension. The plan is,
however, to deprecate it later.

Native support will streamline the sitenotice processing and helps
towards more optimum default MediaWiki experience. It will also
eventually obsoletes the need for an extension to provide this crucial
button as well as remove the overhead of managing such extensions.

Bug: T262118
Bug: T259903
Depends-On: Ib80fc24c84eb333daa016c9816fdf91cc60d3983
Change-Id: I276325dc55fd475655e0212fc256b95ebb41b276
2020-12-22 08:04:44 +01:00
James D. Forrester
abdc94a3da Swap out uses of User->isLoggedIn() with ->isRegistered()
Bug: T270450
Change-Id: I90ff94a553ebae9a4ef97c25c333f067f19c327d
2020-12-22 03:13:37 +00:00
jenkins-bot
d79d75d315 Merge "Skin: allow specifying template for BaseTemplate skins" 2020-12-22 02:38:32 +00:00
DannyS712
1fcbf2b7e4 Remove unneeded GhostFieldAccessTraitTest::setUp
Change-Id: If3dce009ba41519322df3b53fa00097df02b1b6f
2020-12-22 01:34:57 +00:00
jenkins-bot
d75edaea7d Merge "Add integration test ApiWatchlistTraitTest" 2020-12-22 01:14:56 +00:00
Subramanya Sastry
94705b1e6a Sync up with Parsoid parserTests.txt
This now aligns with Parsoid commit b8c7ac91f5d4ec5860e23455e17a09d6c579b338

Change-Id: I80e93b2e22e10129e48a3a0312c46090e8d02551
2020-12-21 18:06:37 -06:00
jenkins-bot
9c9866ccb0 Merge "ParserTestRunner: add interwiki prefixes used by Parsoid tests" 2020-12-21 23:24:46 +00:00
jenkins-bot
c4a57083a2 Merge "ParserTestRunner: tweak filetype of djvu, allow capital E in !!hooks" 2020-12-21 23:23:40 +00:00
jenkins-bot
43e21cda75 Merge "Deprecate InterwikiLoadPrefix hook" 2020-12-21 22:51:47 +00:00
jenkins-bot
59848258c2 Merge "WikiMap: typo fix in comment" 2020-12-21 21:58:14 +00:00
C. Scott Ananian
727a77a19e ParserTestRunner: add interwiki prefixes used by Parsoid tests
Bug: T254181
Change-Id: Ia79992e8e44435746f8512b2f05408c560c80533
2020-12-21 16:53:43 -05:00
C. Scott Ananian
7b4c8f3768 ParserTestRunner: tweak filetype of djvu, allow capital E in !!hooks
Two minor improvements to parser tests:

1) Tweak the filetype of the djvu file to match what commons reports
   nowadays for a more relevant test

2) Allow capital 'E' when registering an extension requirement in the
   `!! hooks` clause of a parser test file.

Bug: T254181
Change-Id: Id4dcd0f5d040f4deb5235d565119a6f76cc7b59d
2020-12-21 16:53:43 -05:00
David Kamholz
9cb5187944 Implement Balinese language converter
This patch implements the BanConverter class for Balinese. Its purpose is to transliterate Balinese in Balinese script to Latin script. Latin to Balinese is not currently supported, because (1) the Latin transliteration is not fully one-to-one, (2) I'm not aware of any users who currently need Latin to Balinese.

The converter supports three distinct Latin transliteration variants: ban-dharma, ban-palmleaf, and ban-puri-kauhan-ubud. All three variants have been requested by different Balinese community members working with Balinese palm-leaf manuscripts. ban-puri-kauhan-ubud is the default, as it is the most familiar to lontar scholars, but Balinese Wikisource users will be able to select their preferred variant via a user script.

Conversion is accomplished via ICU Rule-Based Transliterators, bindings for which are available through the Intl extension.

This patchset adds the abstract class LanguageConverterIcu and has BanConverter inherit from it (makes future ICU-based LanguageConverters easier).

Bug: T263082
Change-Id: Ic3a46a215fbf020a022726e6b130b1d25496e284
2020-12-21 12:45:41 -08:00
C. Scott Ananian
3d40c43b1f Deprecate InterwikiLoadPrefix hook
The InterwikiLoadPrefix hook isn't compatible with Parsoid, as it is
unidirectional and doesn't support enumerating all valid prefixes
(T270444).  Set/reset $wgInterwikiCache to mock the interwiki table
for parserTests and other unit tests instead.

This is a soft deprecation, as the used-in-production
Extension:Interwiki still uses InterwikiLoadPrefix, although not in a
way that would break Parsoid (since $wgInterwikiCache is set in
production).

Bug: T270444
Change-Id: If2507017c99c4ee42c104a0890bc45a84d7239d5
2020-12-21 19:28:48 +00:00
Umherirrender
1f03065c60 Add integration test ApiWatchlistTraitTest
Change-Id: Ifc3c340cac1799ae0546b2050be3dc327aadff57
2020-12-21 20:27:14 +01:00
Umherirrender
1a4afa12a2 Improve docs in WebRequest/WebRequestUpload
Change-Id: Id1f838a06919edfa87f423876026e57e73fe73cb
2020-12-21 19:49:58 +01:00
C. Scott Ananian
e56dbc3e1b WikiMap: typo fix in comment
Change-Id: I08c578189db8e6edb0c3d9755d29314b94bbcc20
2020-12-21 13:15:48 -05:00
Thiemo Kreuz
b771c1e49d Fix bad word wrapping in diffs with non-breaking spaces
Reported here:
https://www.mediawiki.org/wiki/Topic:W00umsemcje8hzty

Example page:
https://test.wikipedia.org/wiki/Special:Diff/460945/460946

Compatibility matrix:
https://developer.mozilla.org/en-US/docs/Web/CSS/white-space

Change-Id: I38f90f6c055fb16facfde5c054ee4e5675e507ae
2020-12-21 15:14:07 +01:00
DannyS712
3503537452 TitleTest::testIsWatchable should call isWatchable
Instead of ::canHaveTalkPage
Likely a copy-paste error

Change-Id: I46c0ebd6267f8631907c011bca525572313154c1
2020-12-21 11:44:10 +00:00
DannyS712
1326cb3be5 Cleanup some tests to reduce code duplications
Also fix incorrect order of some other assertions

Change-Id: Idf50f98de7a17311ea8db6f2cae3b101f4c1da89
2020-12-21 10:08:29 +00:00
Ammar Abdulhamid
5e43009900 DatabaseUpdater: Allow proper renaming of multiple indexes
With the abstract schema changes, indexes will now commonly be
renamed in group for the entire table (the single schema change).

Currently we are mis(using) DatabaseUpdater::renameIndex() which
was not meant for doing this and looks quite suboptimal.

In addition, because the renameIndex() method was purposefully
written to deal with a single index, the messages it prints
during the update become misleading and there's no reason for
to be so.

Change-Id: I04d93e13456cfbfbd46e922af3b6c4026cc36544
2020-12-21 10:50:22 +01:00
jenkins-bot
dd07220553 Merge "Minor cleanup to ComposerPackageModifier" 2020-12-21 09:31:14 +00:00
jenkins-bot
625a42e505 Merge "Make use of LESS nesting in a few files" 2020-12-21 09:25:42 +00:00
jenkins-bot
d10c108269 Merge "Rename four logging indexes to have log_ prefix" 2020-12-21 08:35:45 +00:00
jenkins-bot
b116d34869 Merge "Localisation updates from https://translatewiki.net." 2020-12-21 08:17:53 +00:00
Amir Sarabadani
443c94de3f Rename four logging indexes to have log_ prefix
To follow database coding convention and avoid clashes in RDBMS engines
where indexes are global

Bug: T270033
Change-Id: I17028bba489d04b01d22c39dc8935a4f0f771c7e
2020-12-21 07:39:50 +00:00
Translation updater bot
f0f041475e Localisation updates from https://translatewiki.net.
Change-Id: I4854cf384397557d54a9ec1cea1c41226a638d1c
2020-12-21 08:36:15 +01:00
DannyS712
d464f84182 Fix a typo: matser -> master
Bug: T201491
Change-Id: I2230195439582b1977d0c84295a5e8d9ee07a6cf
2020-12-21 06:38:42 +00:00
jenkins-bot
55407a960a Merge "Cleanup SpecialBlockTest" 2020-12-21 03:35:23 +00:00
jenkins-bot
6a532fd3b6 Merge "Correct minor things in RELEASE-NOTES" 2020-12-20 22:46:42 +00:00
jenkins-bot
268d10b1b7 Merge "Change "1 hidden category" to "a hidden category"" 2020-12-20 22:30:15 +00:00
Amir Aharoni
ac981497e0 Correct minor things in RELEASE-NOTES
* Language code for Mara language.
* Task number for Nias language.

Change-Id: Ib2b62383c1d96f1984c051ee130bd992ce945e24
2020-12-21 00:01:21 +02:00
jenkins-bot
dee1ab460c Merge "Rename all sites indexes" 2020-12-20 21:33:34 +00:00
jenkins-bot
5c660de5d0 Merge "Add Access-Control-Max-Age to $wgAllowedCorsHeaders" 2020-12-20 19:08:10 +00:00
jenkins-bot
e465223c2e Merge "Add MessagesNia.php" 2020-12-20 17:15:33 +00:00