Commit graph

106571 commits

Author SHA1 Message Date
C. Scott Ananian
3056737420 Make Parser::$mStripState private
This property was deprecated in 1.35.  The replacement function
Parser::getStripState() was introduced in MediaWiki 1.34.

Code search:
https://codesearch.wmcloud.org/search/?q=-%3EmStripState&i=nope&files=&excludeFiles=&repos=

Depends-On clauses below are for WMF-deployed code.  Other uses in
non-WMF-deployed code have been patched in:
* https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/4936
* Idc2fadf5105d6eb30777a16dff0035bceff17174 (BlueSpiceSocial)
* I130fd61a8fe2d28e6b116a3fcc767b8abd466cea (ContributionScores)
* I3676fe9882ce9de5732cb7230528134df544ff98 (HierarchyBuilder)
* Ic392afd1e93ae0003fd0ab65114ec1ff38bb2927 (Mpdf)
* I4b01017da752def982777c4fea5fad5e21e4c7ea (MsLinks)
* I09726078ee62eb99e032b8faa5f938e20107f48c (Negref)
* Ibfd6b7064a8e650c3492e0d2764d4f7afc4937bf (PageForms)
* Ia865435688d36178508f21cffae79538c919035c (PageInCat)
* Ib94db0e6d365e4cb3f51121340a04d31b88add62 (ParserFun)
* I8660c0691b7e9842106d7dcb224ff5ecf374e4bc (PhpTags)
* I1ad5f78e5a937767123400ceca4967941e256e5e (RandomImageByCategory)
* I4539e7cea597f71b2a2d9a6cae137bc25085ed6b (ReplaceSet)
* If8ff2e21952b3f08d3a8950d42e2afb56973fb89 (SemanticDrilldown)
* I4a5bd64760cdde5b614a7d4e2b09e8d0634b2056 (SemanticPageSeries)
* Ia04f1aac1d8ae4ea16c98cfbbe72195fffe653b6 (SemanticRating)
* Id2a2e2d024922e3babf756ebae1a4f59b4358146 (Spark)
* I4a979024b18ec4834dc06b51ee0f018d749c6dab (Tooltip)
* Iaf179914863998b32bfecc16c874c3cffd6c26e9 (VIKI)
* I2de0e7a6c133c2e1f3cb7502a81d809c4489db4c (XSL)
* https://gitlab.com/hydrawiki/extensions/characterescapes/-/merge_requests/1 (characterescapes)
* https://github.com/JeroenDeDauw/Validator/pull/38 (Validator)
* https://github.com/lingua-libre/CustomSubtitle/pull/3 (CustomSubtitle)
* https://github.com/mkroetzsch/AutoCreatePage/pull/12 (AutoCreatePage)
* https://gitlab.com/nonsensopedia/extensions/advancedbacklinks/-/merge_requests/95 (advancedbacklinks)
* https://github.com/vonloxley/Shariff-Mediawiki/pull/16 (Shariff-Mediawiki)

Bug: T275160
Depends-On: I062ac8b69756a7ad35d8cc744b4735fd2e70f13e
Depends-On: Ic4be2bad176f2c59a1104219be10045cd5929261
Depends-On: I3cb117a91c8c57331b6b513f64ddb68d6ae2758c
Depends-On: I67b5926f2f851b3dc709d044eec5dd3df5065482
Depends-On: I7806068e1cd6e4da66adfe7bb75095d4bfb5d6bc
Depends-On: I429da35ca4e276c852b8d6ee102ff19f742c22c0
Change-Id: I4af85a46cfcafba15aa5ee50fda9f7b04681d6e6
2021-10-13 19:58:50 -04:00
jenkins-bot
3769185eb3 Merge "objectcache: remove deprecated setDebug() method" 2021-10-13 23:57:46 +00:00
jenkins-bot
339f21e9c8 Merge "Reduce microtime()/mt_rand() fragility in WANObjectCacheTest" 2021-10-13 23:53:55 +00:00
DannyS712
4598d556f5 Remove cookie settings from mw.config
No longer used from there by the mediawiki.cookie module

No deployed javascript tries to use these, but a few undeployed
extensions do, so added to release notes.

Bug: T291760
Follow-up: I600332cdb738f0b443549948b9f070f3ccfa12aa
Change-Id: Ia02048137f191b950ae789a9d206c1d9afbce83a
2021-10-13 23:45:24 +00:00
Aaron Schulz
6132721973 objectcache: remove deprecated setDebug() method
Change-Id: I4702d7c8df2c0a645279ed59b6b7a9aa9e5cea34
2021-10-13 23:32:35 +00:00
jenkins-bot
9730926907 Merge "Move mediawiki.ForeignUpload configuration settings to package files" 2021-10-13 23:18:28 +00:00
Bartosz Dziewoński
3223981217 Move parser test with stray carriage return to extraParserTests.txt
All of my favorite text editors corrupt this test case whenever I edit
parserTests.txt. extraParserTests.txt contains other tests with weird
characters that may get corrupted by normal text editors.

(I had to use `vi` to make this patch, and I wouldn't wish this on
anyone.)

Change-Id: Id474469180fc284e3e28b55f65808be727507875
2021-10-14 00:49:58 +02:00
jenkins-bot
7397bd0997 Merge "Minor cleanup to EditPage, should be a no-op" 2021-10-13 22:40:20 +00:00
jenkins-bot
5e54ab5c02 Merge "resourceloader: Remove obsolete logic for handheld=yes pageviews" 2021-10-13 22:28:54 +00:00
DannyS712
751dccfb12 Minor cleanup to EditPage, should be a no-op
Make some things simpler

Change-Id: Id438f928eaa588640922ba74a907f5ff75f65522
2021-10-14 00:16:54 +02:00
jenkins-bot
7b84b2bed6 Merge "Hard-deprecate ParserOutput::preventClickjacking()" 2021-10-13 22:16:31 +00:00
jenkins-bot
a241357432 Merge "Live preview: use the correct content model" 2021-10-13 20:06:09 +00:00
Umherirrender
02c0e8b8e7 Use Message::sizeParams to simplify code when building messages
Change-Id: Ic04d4dea86e61fb07b2a3b17acb6021fab6ae5ee
2021-10-13 19:52:41 +00:00
Petr Pchelko
a1aa3e0827 Hard-deprecate all public property access on CacheTime and ParserOutput.
- Added a test where ParserOutput objects with CacheTime
properties set are unserialized from previous versions.
- Generate new serialization tests for 1.38

Now all serialization in production is JSON, so changing
property visibility shouldn't affect ParserCache.

Bug: T263851
Depends-On: I283340ff559420ceee8f286ba3ef202c01206a23
Change-Id: I70d6feb1c995a0a0f763b21261141ae8ee6dc570
2021-10-13 13:27:16 -04:00
Petr Pchelko
4d54b4caa0 Run ParserOutput serialization tests against latest example available
In ParserOutput serialization tests we have a large number of examples
saved for different versions of MW. When MW version is released,
but the serialization doesn't change, we stop running some serialization
tests cause we can no longer find the latest example.

Change-Id: I01e8e0e17e2371b2cd08d200d3a4611d814e74bb
2021-10-13 13:26:47 -04:00
C. Scott Ananian
5050208ed0 Hard-deprecate ParserOutput::preventClickjacking()
Follow up to the soft deprecation in I9822c60c180d204bd30cb4447a1120155d456da4.

Code search:
https://codesearch.wmcloud.org/deployed/?q=%28allow%7Cprevent%29Clickjacking&i=nope&files=&excludeFiles=&repos=

Note that the dependencies here are actually cleanups to
OutputPage::preventClickjacking(), not ParserOutput::preventClickjacking().
It can be hard to tell the difference between these two methods when
reading code (especially when parameter types are omitted) and so we're
being extra cautious by cleaning up both of these together.

Bug: T287216
Depends-On: I626e89a1bff2d9c535b828a5b25eff863c91f858
Depends-On: I23e8b35540d2da34c0a3d335069c518b4b72a333
Depends-On: I2538ac8f37fcde183f496e49a8de0ed25a38e508
Change-Id: I0f9b1fe755f7d3d6a9b18fa21a738dda7566c211
2021-10-13 16:32:29 +00:00
Daimona Eaytoy
23ec8052ce Final sync of DeleteAction and FileDeleteAction forms
Fix the last drifts between the two. Custom CSS IDs/names/classes in
FileDeleteForm were replaced with the base one, as I think it's better
to be consistent, and it wouldn't be trivial to allow changing those
values in a clean way. Question for reviewers: should this part be
announced on tech news in case somebody is using those values in a
script?

Move the file delete intro above the form, like we do for normal
deletion.

For normal deletion, use the content of the wpReason field as default
value for that field, not the result of merging the dropdown and the
"other" field, which doesn't seem correct (the file version was already
doing this).

Make the file deletion form use the title as token salt like the base
form -- it shouldn't make any difference AFAICS.

After this patch, it should be possible to make DeleteAction extend
FormAction with low effort.

Bug: T288282
Change-Id: I8b115ecb1c94af63d686a575b18362ac32105ae2
2021-10-13 13:48:24 +00:00
Daimona Eaytoy
d2419a1dda Live preview: use the correct content model
I was under the impression that live preview could only be used on
wikitext pages, but this isn't the case. So pass the proper content
model to the API.

Bug: T293022
Change-Id: Icff5b8b25a4b0df3feda2093d5b9c92e6dd9be3a
2021-10-13 15:35:10 +02:00
Amir E. Aharoni
3893aab376 Add S'gaw Karen (ksw) to Names.php
Bug: T292612
Change-Id: I101a8f53b688730a52e4f031f43f1b875720587b
2021-10-13 15:44:41 +03:00
jenkins-bot
29b5c36fbd Merge "Fix Burmese date format" 2021-10-13 12:36:44 +00:00
jenkins-bot
401d848980 Merge "Add unwatchedpages to the basic grant" 2021-10-13 09:35:21 +00:00
Amir E. Aharoni
03aebb3f13 Fix Burmese date format
The word "ဇန်နဝါရီ" means "January". It appeared in all the dates,
which is obviously wrong.

This was reported by User:Ninjastrikers.

Change-Id: I1491301d253a59468caf9b00626f341be8810073
2021-10-13 10:53:55 +03:00
xiplus
59b2f57b13 Fix regex typo
Fix regex for no-conversion marks.

Change-Id: I1f9216a859bf91324c5943202c303c59f1a88595
2021-10-13 14:39:36 +08:00
jenkins-bot
ad9255fe30 Merge "Remove deprecated ApiBase::PARAM_VALUE_LINKS" 2021-10-13 01:54:56 +00:00
jenkins-bot
7f088b0e7a Merge "installer: Fix 5th param to sourceFile() in DatabaseUpdater" 2021-10-13 00:39:50 +00:00
jenkins-bot
9f3a5069cd Merge "RCFilters: Merge mw.rcfilters.init.js into mw.rcfilters.js" 2021-10-13 00:35:16 +00:00
Paladox
62bc788c9b installer: Fix 5th param to sourceFile() in DatabaseUpdater
Bug: T293044
Change-Id: I594e2920b77735756022f4ecbf730e0c5b190471
2021-10-13 00:13:49 +00:00
DannyS712
8b97d3440c RCFilters: Merge mw.rcfilters.init.js into mw.rcfilters.js
After the mediawiki.rcfilters.filters.(dm|ui) modules were merged,
mw.rcfilters.js was just `require`ing the old init script to run some
extra setup, no need for separate files.

Bug: T256836
Change-Id: I6462151152d075af0ef8bce3a5edf0a0ba48761a
2021-10-13 00:12:06 +00:00
Reedy
7accea74ec Upgrading wikimedia/wrappedstring (v3.2.0 => v4.0.1)
Depends-On: Ic26f3a3be1061b77e0af7b8c4c2569f9d070d191
Change-Id: I5a9f97cac52e4e9af612c2130359b017fb7176c1
2021-10-12 23:30:27 +00:00
jenkins-bot
071957a2af Merge "Metrics: reduce the number of packets sent by MetricsFactory->flush()" 2021-10-12 22:01:25 +00:00
jenkins-bot
f5fdf3ed44 Merge "profiler: Remove dependency on WebRequest from Profiler" 2021-10-12 22:00:44 +00:00
jenkins-bot
361b04288a Merge "PHPVersionCheck: Mark PHP 7.4.0 - 7.4.2 as buggy" 2021-10-12 21:10:40 +00:00
jenkins-bot
1a70d45e9e Merge "phpunit: Fix parameter order on two assertSame() calls" 2021-10-12 20:47:11 +00:00
Alexander Vorwerk
0a86c3655d phpunit: Fix parameter order on two assertSame() calls
The first parameter of assertSame() is the expected value, the second
one the actual value.

Change-Id: I5a411403443f18b30c93ab9552f625a70c75f75c
2021-10-12 20:22:34 +00:00
Reedy
4f3570f7d8 PHPVersionCheck: Mark PHP 7.4.0 - 7.4.2 as buggy
Follows-up f28578f9da, which removed the "7.4.0 - 7.4.8" bad
range.

Bug: T246594
Change-Id: I04c33d95aa07c4234fcf4d80ed2dfeccdf579fdd
2021-10-12 20:21:38 +00:00
jenkins-bot
62d75eae0b Merge "DeleteAction: allow easy override of form messages" 2021-10-12 20:02:01 +00:00
jenkins-bot
08e509737b Merge "docs: Document in DEVELOPERS.md how to stop or restart the thing" 2021-10-12 18:30:59 +00:00
jenkins-bot
829455fc49 Merge "docs: Various DEVELOPERS.md improvements about MediaWiki-Docker" 2021-10-12 18:28:51 +00:00
Timo Tijhof
41e082e612 docs: Document in DEVELOPERS.md how to stop or restart the thing
It's all great that it's up and running, but how does one stop the
containers when you're done with it and want/need to reduce load on
the computer, or re-create them after something went wrong?

Change-Id: I9ec446d73a5fac41550c19eb83912469cfdb92ee
2021-10-12 16:52:44 +00:00
jenkins-bot
52cb8f1aa6 Merge "Fix history page iteration in backwards mode" 2021-10-12 16:50:41 +00:00
Cole White
dd0b5e0e1f Metrics: reduce the number of packets sent by MetricsFactory->flush()
Sending one packet per metric is inefficient.  Collapse all rendered
metrics into a single array to make the best use of the max payload size
of a UDP packet.

Bug: T240685
Change-Id: I74fcc222a7e8610b09fa14c5782c317d1e697d1d
2021-10-12 10:34:03 -06:00
jenkins-bot
c99c6eb384 Merge "Pre-format comments for non-local files too" 2021-10-12 15:46:39 +00:00
Nikki Nikkhoui
0b3a4c0fa8 Do not cache private wiki completion results
Previously, when a user with correct permissions uses completion search on a
private wiki, the results are returned and cached. Since we are on a private wiki,
we don't want to cache results since the content is not accessible to all users.

Now, content that is not accessible to all users will not be cached.

This patch achieves this by setting the appropriate Cache-Control response headers
for the MW REST Search endpoint.

Bug: T292763
Change-Id: I693b4088df9c0520d5238c286312ec52ab273604
2021-10-12 13:12:05 +00:00
Lucas Werkmeister
97661702dc Fix reference to moved flag in phpdoc
$generateHtml is now wrapped in the ContentParseParams, referring to it
by its old name is confusing.

Bug: T287158
Change-Id: I31e0a596881ecd7d3bea709ab3f8029779cb7f02
2021-10-12 11:57:38 +02:00
jenkins-bot
5535b42559 Merge "Add SpecialExportGetExtraPagesHook" 2021-10-11 22:00:33 +00:00
Sam Smith
8b9fb65513 block: Stop passing list of blocks around by ref
Bug: T270318
Change-Id: I03a71964a12f3470ce68170f0bc6f669fc362929
2021-10-11 17:51:33 +01:00
Sam Smith
75808a6e31 block: Add BlockManager::getIPBlock()
The ::getIPBlock() method returns all current blocks affecting the IP
address.

Supporting changes:

* Extract ::getXffBlocks() from ::getAdditionalIpBlocks() and rename the
  latter to ::getSystemIpBlocks()

* Add ::getIpBlock(), which returns an AbstractBlock instance that
  represents all blocks affecting the IP, including range blocks and
  system blocks (using ::getSystemIpBlocks())

Additional changes:

* Update DocBlocks for all methods mentioned above

Bug: T270318
Change-Id: I2009c3a7143c10167461e1ce9d4b8efe81390ff6
2021-10-11 17:51:27 +01:00
Alexander Vorwerk
af305e61cc Remove NS_IMAGE and NS_IMAGE_TALK from DumpNamespaceFilter
NS_IMAGE and NS_IMAGE_TALK have been removed as aliases of NS_FILE
and NS_FILE_TALK in 1.34.

Change-Id: I6f00366314645c4b9d627ed1810d6346499f087d
2021-10-11 15:23:44 +02:00
jenkins-bot
ce1c6b7002 Merge "Migrate WikiPage::doEditUpdates() to using PageUpdaterFactory" 2021-10-11 11:36:50 +00:00
Martin Urbanec
ba53aa6d78 Add unwatchedpages to the basic grant
This is a fairly low-risk right, I think viewing
deleted content (viewdeleted) or OS logs (viewrestrictedlogs)
should be separate from this. The basic grant already has
other low-risk rights, like patrolmarks or abusefilter-log-detail,
so I think it should be fine to add this too.

Alternatively, we can create a new grant instead.

Bug: T292940
Change-Id: Ied76fe0e6f896e56029fb40f1197e87f3f5ff68a
2021-10-11 10:16:23 +02:00