Commit graph

4108 commits

Author SHA1 Message Date
Ed Sanders 5957ac55df Pass through dtenable from main request query string
Instead of passing dtenable=1 unconditionally for API requests.

Bug: T360863
Change-Id: I42c651558d95a88eaf6006b6509caa4e41df8464
2024-03-25 18:26:53 +00:00
Translation updater bot fad95c02b6 Localisation updates from https://translatewiki.net.
Change-Id: I7ff6591d46d2f9df5e4c1a34347e343cacf4fbe9
2024-03-25 08:35:48 +01:00
Bartosz Dziewoński dacef1a97a Clean up subscribe links/buttons
* Don't generate `<!--__DTSUBSCRIBELINK__...-->` placeholder comments
  (follow-up to Idb23b0f5e438d35ed74569ff50302c7fad5ba688)
* Remove unused method parameter
* Remove unnecessary pass-by-reference (only $tocInfo needs it)

Change-Id: Ie3348671c486de5bbd9f286772a8d145e3609bd5
2024-03-25 01:13:59 +01:00
David Lynch 5276729d3e Add #top to the ignore list for checking for moved topics
Top is in the WHATWG spec as a magic value that always navigates to the
top of the document.

There used to be a #top element in pre-Vector2022 skins, and it's in
fairly wide use on some wikis in signatures and via gadgets, so many
links exist that point to it.

Bug: T360274
Change-Id: Ia12464239ab2cdc428c570d0cf5df1c0d1780b7a
2024-03-22 22:01:17 -05:00
jenkins-bot f22dabfb80 Merge "Move some doc comments to real type hints" 2024-03-23 01:36:33 +00:00
Umherirrender 6c005d293f Add explicit parentheses around mixed boolean operator
Mixing different binary boolean operators within an expression
without using parentheses to clarify precedence is not allowed (T358966)

Change-Id: I9e9c9531ab0fa373606b19a5865cec748a3f36ff
2024-03-23 00:52:30 +01:00
Translation updater bot 1d377d284f Localisation updates from https://translatewiki.net.
Change-Id: I8ac50a30ce6b64f7ae2bbe969b71a4fe4928a68c
2024-03-22 08:44:09 +01:00
Translation updater bot bf752c5e0d Localisation updates from https://translatewiki.net.
Change-Id: If5ddaf783d99aa097db92e08ea13b64b81bf95ca
2024-03-21 08:54:57 +01:00
Translation updater bot fe83a6b5b3 Localisation updates from https://translatewiki.net.
Change-Id: Iac44a8d485271e6c94e4878aa9b5d0af88bc6cc7
2024-03-20 08:23:31 +01:00
Translation updater bot 86a9ab0e36 Localisation updates from https://translatewiki.net.
Change-Id: I3da696e30b4af2deb68264e4b60e4f52d6f09f92
2024-03-19 08:24:55 +01:00
Translation updater bot 62d66cb82a Localisation updates from https://translatewiki.net.
Change-Id: Ida7ec3e9cb98ff3d26874da827b97bd28aff6458
2024-03-18 08:30:50 +01:00
Bartosz Dziewoński cc9524e268 Remove workaround for T357812
Change-Id: I1aa3172c5656a79171351d0122f83b680adea739
2024-03-16 19:57:19 +00:00
Translation updater bot 0bf382329f Localisation updates from https://translatewiki.net.
Change-Id: Iec19b4a5eabffa56bf33a03934b072efb27c3696
2024-03-15 08:33:19 +01:00
Translation updater bot 313179e61c Localisation updates from https://translatewiki.net.
Change-Id: I130f5f7b5bd00649ef16c572a1e6cfa649582d21
2024-03-14 09:02:54 +01:00
jenkins-bot b8d42a0667 Merge "Use standard gray color for timestamp links" 2024-03-13 15:57:31 +00:00
jenkins-bot bd09ad6801 Merge "Move [subscribe] links outside of <h2> tags" 2024-03-11 17:07:14 +00:00
Bartosz Dziewoński d2d2d914ce Move some doc comments to real type hints
Change-Id: I64e3f7123c803ae2576c8b05824698d78a691018
2024-03-11 14:13:17 +01:00
jenkins-bot c5044b0822 Merge "Localisation updates from https://translatewiki.net." 2024-03-11 07:30:49 +00:00
Translation updater bot 4f6dbf44b2 Localisation updates from https://translatewiki.net.
Change-Id: I59ef15227246f2c46f70a30be2a2fde92ae25e0f
2024-03-11 08:26:47 +01:00
Bartosz Dziewoński 69e8e948b2 Remove now redundant PHPDoc blocks
MediaWiki's PHPCS plugin requires documentation comments on all
methods, unless those methods are fully typed (all parameters and
return value).

It turns out that almost all of our methods are fully typed already.

Procedure:

1. Find: \*(\s*\*\s*(@param \??[\w\\]+(\|null)? &?\$\w+|@return \??[\w\\]+(\|null)?)\n)+\s*\*/
   Replace with: */
   This deletes type annotations, except those not representable
   as PHP type hints such as union types `a|b` or typed arrays `a[]`,
   or those with documentation beyond type hints, or those on
   functions with any other annotations.

2. Find: /\*\*/\n\s*
   Replace with nothing
   This deletes the remaining comments on methods that had no prose
   documentation.

3. Undo all changes that PHPCS complains about (those comments
   were not redundant)

4. Review the diff carefully, these regexps are imprecise :)

Change-Id: Ic82e8b23f2996f44951208dbd9cfb4c8e0738dac
2024-03-10 23:53:04 +00:00
Bartosz Dziewoński b16dd9dd96 Update PHPCS overrides
There's now a different rule for the same thing in
mediawiki/mediawiki-codesniffer v43.0.0. Also document the reason for
the override. Follow-up to 8b00546749.

Change-Id: I392ee10639ffda6de55b091555e8c3cadd2af485
2024-03-10 22:59:05 +01:00
Umherirrender 8b00546749 build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0
Change-Id: I889efe00ac06fa857fc3ae063193368927bcff7a
2024-03-10 17:36:18 +01:00
Bartosz Dziewoński 9c9512ecf5 Move [subscribe] links outside of <h2> tags
Place the "[subscribe]" links used when the 'VISUALENHANCEMENTS'
feature is disabled in the same DOM position as the "🔔 Subscribe"
buttons used when it is enabled.

Recent changes in MediaWiki core caused them to move inside the
`<span class="mw-headline">`, breaking some gadgets (T13555#9615648).
Moving them all the way outside should avoid problems.

I don't remember why we placed them inside the `<h2>` tags, but there
doesn't seem to be any reason to do it now. It must have been easier
that way before we introduced the `<div class="mw-heading">` wrappers.

Note that I'm keeping the `<!--__DTSUBSCRIBELINK__...-->` placeholder
comments in case it turns out there is a reason, and we need to revert
this change. If everything goes well, they can be cleaned up in change
Ie3348671c486de5bbd9f286772a8d145e3609bd5 later.

Bug: T13555
Change-Id: Idb23b0f5e438d35ed74569ff50302c7fad5ba688
2024-03-08 21:18:53 +01:00
Translation updater bot dc5919fefe Localisation updates from https://translatewiki.net.
Change-Id: Id59fb8cbe6a01e46fa852690be144ff8ce543848
2024-03-08 08:22:57 +01:00
jenkins-bot 63dd90a8dc Merge "Fix collapsed sections when recovering autosave on mobile, take 3" 2024-03-07 17:36:12 +00:00
Translation updater bot 1722eca501 Localisation updates from https://translatewiki.net.
Change-Id: I4367ef60f1a31c709824fbac5b49e70887e3d1e0
2024-03-07 08:48:27 +01:00
David Lynch 01749e4970 Instrument when permalinks are copied
Bug: T359182
Change-Id: I3a7cfc0eaf6472804cc587cfa320bdc20b462492
2024-03-05 11:35:46 -06:00
jenkins-bot ae7df33ec1 Merge "Only include one set of DiscussionTools buttons in the page HTML" 2024-03-04 17:30:29 +00:00
Translation updater bot 209fcca0e6 Localisation updates from https://translatewiki.net.
Change-Id: I9d118b26d974a181519dbbc0e2c0327d2a5e2f8c
2024-03-04 08:23:15 +01:00
Bartosz Dziewoński 4958416caf Only include one set of DiscussionTools buttons in the page HTML
We no longer need to support toggling visual enhancements without
reloading the page, so we can remove the extraneous set of buttons
to reduce HTML size.

Bug: T322457
Change-Id: I54e57c754c54b7e611069f9832d1ebabf141a396
2024-03-01 16:51:17 +00:00
Translation updater bot 601fe334c0 Localisation updates from https://translatewiki.net.
Change-Id: If0444be2789725fe7013ab4931dcf6d15cf710b2
2024-03-01 08:33:00 +01:00
jenkins-bot eeeb6e7eab Merge "Fix PHP getTitleFromUrl() when $wgArticlePath is '/$1'" 2024-02-29 17:53:16 +00:00
Translation updater bot 97939f9681 Localisation updates from https://translatewiki.net.
Change-Id: I2843779e2819f6b6b39ec151e6b52d85bee6345c
2024-02-29 08:35:50 +01:00
jenkins-bot c3ca1ef3c8 Merge "Remove TemporaryParsoidHandlerParserCacheWriteRatio hack" 2024-02-28 17:20:38 +00:00
Translation updater bot fb3367c188 Localisation updates from https://translatewiki.net.
Change-Id: Ia51f0b2944edd3132bfedec061a913330a4a7ed2
2024-02-28 08:14:11 +01:00
Bartosz Dziewoński a9966234ac Fix collapsed sections when recovering autosave on mobile, take 3
We need to more carefully wait for mobile section toggling to happen.
Follow-up to 3957d7ac25.

Bug: T338920
Change-Id: I1bd31483c5be9428075f07494e89b06f19f8bf23
2024-02-28 04:43:59 +01:00
Translation updater bot 1812ac44ac Localisation updates from https://translatewiki.net.
Change-Id: I19bbb7f389135176ee40f97618b0e26a8f2cb9ff
2024-02-27 08:19:55 +01:00
jenkins-bot 545d17d2c9 Merge "Replace spaces in link fragments before searching for topics/comments" 2024-02-26 19:21:11 +00:00
Ed Sanders 16e308119f Replace spaces in link fragments before searching for topics/comments
MediaWiki should never generate links like this, but users or 3rd
party tools probably create them accidentally quite regularly, and
we do a similar thing with Title normalisation.

Change-Id: Ia467f422578bcb9b4d3fb8feab0b85f4b6436f7e
2024-02-26 18:59:00 +00:00
Translation updater bot f485dc3f00 Localisation updates from https://translatewiki.net.
Change-Id: I0deca42859446b81be2f26dd232c0d22cd083c5d
2024-02-26 08:35:54 +01:00
Bartosz Dziewoński 6419c19d1e Fix PHP getTitleFromUrl() when $wgArticlePath is '/$1'
In this case, the generated regexp would match the '/local' part in
the generated URL. Prefixing 'https://local' is no longer necessary
since 10899af666.

Add tests for this, and some tests to cover T261711 as well.

Bug: T358321
Change-Id: Idf54deba13f30b799b7b8d17de1897bc90f95701
2024-02-24 02:03:17 +01:00
Bartosz Dziewoński cf9f11167d CommentFormatterTest: Set ArticlePath in the test
Tests would fail if your wiki's config was different than this.

Change-Id: I148851a9d7b777f1fad5f17b01b835b0b9384a80
2024-02-24 01:19:16 +01:00
Translation updater bot 5ebdb052c7 Localisation updates from https://translatewiki.net.
Change-Id: I6feb874b7e50765bcd35b0061d6d871c8bb59a54
2024-02-23 08:44:15 +01:00
jenkins-bot 402f5de391 Merge "Support for core section heading formatting in post-cache transform" 2024-02-23 05:01:19 +00:00
Translation updater bot c72881f60d Localisation updates from https://translatewiki.net.
Change-Id: Ib12b065143c4ea92b292b47fca4a5facb0592509
2024-02-22 08:43:24 +01:00
Ed Sanders bf7dc0d983 ThreadItemStore: Only pass *Content*ThreadItemSet to insertThreadItems
We never a DatabaseThreadItem back into the database. If someone
wants to do this in the future they should be thinking very
hard about it first.

Change-Id: Ie073c030905e31d81cb75bc9c46d5bb7c5d85b04
2024-02-21 16:10:25 +00:00
Ed Sanders b4e4f30234 ThreadItemStore: Remove "ButTryHarder" from method name
This appears to reference the retry that happens due to
REPEATABLE_READ, but that seems like an implementation
detail so not really useful to have in in the function
name, nor does it disambiguate it from another function.

Change-Id: Iacc95b74f25c166545734818efb1b30e18a1754e
2024-02-21 15:56:32 +00:00
Translation updater bot 1bd3a78966 Localisation updates from https://translatewiki.net.
Change-Id: I7f73b9e8a4a1ed44476fc3bb2edd873fa8a229f6
2024-02-20 08:38:22 +01:00
Ed Sanders 5ba0bfa026 Remove temporary newsectionlink_enable config
This was intended as a temporary config to facilitate a
staged rollout (T331635) which has now completed.

Change-Id: I432ec0a24b8e8c12b62556ff6703abff32a2fced
2024-02-19 17:34:23 +00:00
Translation updater bot db5ced1db0 Localisation updates from https://translatewiki.net.
Change-Id: I602cd51c8f07b4dc1287788635d98e7574e873c2
2024-02-19 08:40:06 +01:00