Commit graph

2090 commits

Author SHA1 Message Date
C. Scott Ananian 33c69346fe Remove backward-compatibility with old Scribunto cached content
Old content in the ParserCache may have scribunto errors tagged using
the 'id' attribute instead of 'class'.  We don't need that compatibility
code once the content expires from the parser cache.

Bug: T375539
Follows-Up: I123a0f0046a616f63506f096651ae917bbc65cc5
Change-Id: I22ade9ec45971a96fbbd148fbd11ea9bbd2098cf
2024-11-11 21:46:21 +00:00
Ammarpad 756896edbb Ensure log report is always in valid UTF-8
Bug: T377473
Change-Id: Ica9bc98e100e169c6c4dd8398d410347c59ee2fd
2024-11-11 18:14:33 +00:00
Translation updater bot 726638268d
Localisation updates from https://translatewiki.net.
Change-Id: I55d4966fa793ee19e59bc4a4416edca5a8d295a7
2024-11-06 08:24:03 +01:00
libraryupgrader 715b700708 build: Updating mediawiki/mediawiki-codesniffer to 45.0.0
Change-Id: I1383cff61a406dd353bec407cea130fe8d72cb69
2024-11-03 04:17:30 +00:00
Fomafix 9a64973201 Inject services into ApiScribuntoConsole and Hooks
Change-Id: Iafb24d774c7cbc13b4856863bdd458fd08d1bedc
2024-10-30 19:36:26 +00:00
Translation updater bot 4e77f0e335
Localisation updates from https://translatewiki.net.
Change-Id: Iabd81406538837866c612bc58867fdbf23f77f39
2024-10-30 08:24:30 +01:00
Translation updater bot b345e04120
Localisation updates from https://translatewiki.net.
Change-Id: Ife676fd073988c7a8cfcead67db7d74d8bf8272f
2024-10-29 08:41:57 +01:00
Translation updater bot a829a55d18
Localisation updates from https://translatewiki.net.
Change-Id: Ide163e5bf1e71f45c98ca9fad9f308381913739a
2024-10-28 08:24:11 +01:00
Umherirrender 903e952604 Replace isset() with null check
isset() should only be used to suppress errors, not for null check.
When the variable is always defined, there is no need to use isset.
Found by a new phan plugin (2efea9f989)
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#isset

Change-Id: Ifba65aad2245b580f4361acf34ab46eabef60611
2024-10-27 12:25:57 +01:00
Andre Klapper 319d7bba52 Use explicit nullable type on parameter arguments (for PHP 8.4)
Implicitly marking parameter $... as nullable is deprecated in PHP
8.4. The explicit nullable type must be used instead.

Bug: T376276
Change-Id: I9cafaa51999fd2740da6c4fec9314fb9ace7c327
2024-10-26 15:10:35 +02:00
Umherirrender 9ab4776312 Use type-declaration on api module constructor
Parent class constructor gets type-declaration in 1145328459
Remove simple doc-blocks without further information

Change-Id: I124474e19ad4a0ceaad5104574bc9ed3102ce843
2024-10-25 20:20:36 +02:00
Translation updater bot 4b88b758d4
Localisation updates from https://translatewiki.net.
Change-Id: Ic2b04b9cb8ed96ef5b6601c78b7e098b4b8d96e3
2024-10-25 09:52:14 +02:00
Pppery 7f5d8d824c Add namespaces for Latin
Bug: T377984
Change-Id: I2aa00963597223183437d13b105c5105b4526436
2024-10-24 12:14:13 -04:00
Pppery 5b90a34f5e Translate module namespace to tdd
Bug: T377474
Change-Id: Ie9748e992154f146c660955c4baf636eefa02fbb
2024-10-22 17:25:18 -04:00
Translation updater bot 666c05dd6a
Localisation updates from https://translatewiki.net.
Change-Id: I88284a333809685adeed9a86ea227fa894ace53b
2024-10-21 09:20:50 +02:00
Umherirrender 9231163147 Use namespaced classes
Changes to the use statements done automatically via script

Change-Id: I28cb0daddf167e6e713b756e1f6ad0bbe98858ec
2024-10-20 11:54:11 +02:00
Translation updater bot f5f0eaf705
Localisation updates from https://translatewiki.net.
Change-Id: Ie4121863a5a7c7ce3621c9b0748ac48513106f3c
2024-10-18 09:25:34 +02:00
Msz2001 28f0a05717 Add namespace description for Special:NamespaceInfo
Bug: T373070
Change-Id: Iaa1389fff9235960e91a68cc6728eabd77da1e13
2024-10-17 20:36:42 +00:00
Pppery 273670ff92 Set namespaces for dtp
Bug: T371068
Change-Id: I6a74287a75ca84d7e571e688e7046fbb6dbc87f3
2024-10-17 16:55:22 +00:00
Translation updater bot b80e3eb747
Localisation updates from https://translatewiki.net.
Change-Id: I7df4fad8374d711e501991d508287f33d95dc259
2024-10-14 09:30:14 +02:00
Siddharth VP f354b0eceb debug console: remove unused CSS styles
Change-Id: I24a08a605a60f7e369b76c4a5c3b83330a01a054
2024-10-08 16:41:12 +00:00
Umherirrender cc9cdab7e6 build: Run stylelint for less file
less is used since 527c461110

Change-Id: I982471e66eb40d797c529d17a2b8441996757f87
2024-10-05 00:07:44 +02:00
Siddharth VP 527c461110 Support dark mode in Scribunto debug console
* Use Codex tokens instead of hardcoded colors, picking close ones where
 there's no exact match
* Remove unnecessary background styles that will be inherited.
* Add border on input box - looks a bit off (at least in dark mode)
without it.

Bug: T370701
Change-Id: I8076b00aff57dea177d23aaa3698471714ac4a93
2024-09-30 22:18:44 +05:30
Translation updater bot 8c3408f11b
Localisation updates from https://translatewiki.net.
Change-Id: I1a77ff33712c956b1555bebf5d9d47d28262bf21
2024-09-30 09:21:51 +02:00
C. Scott Ananian 248e886dc0 Use class instead of id for scribunto errors
This avoids having multiple HTML elements with the same `id` attribute
when certain Scribunto errors reoccur more than once on the same page.

Bug: T375539
Change-Id: I123a0f0046a616f63506f096651ae917bbc65cc5
2024-09-24 15:47:25 -04:00
Translation updater bot ba5588a2b9
Localisation updates from https://translatewiki.net.
Change-Id: I02495cb751d2fa20c45dee9c395153998b68f1cc
2024-09-24 09:29:48 +02:00
Umherirrender 7c1ea4284e build: Use inline ignore for MediaWiki.Usage.ForbiddenFunctions
This avoids addition of new code with the function,
or at least it gives extra attention on review when new code also uses
the inline ignore

Change-Id: I17981b52d9f96ee5f19ba46cf370c7477c81a72a
2024-09-23 17:40:51 +00:00
Siddharth VP 286add50b5 Don't record transclusion of current page from title methods
When the content or categories fields are accessed for the title object
of the current page, skip adding an entry in templatelinks.

* Cuts 5.9 million rows from enwiki templatelinks, where citation
templates use :getContent() to know what date format to use while
formatting citations.
* Prevents confusion about why a page is shown to transclude itself,
frequently brought up on technical support forums.

Change-Id: Id6a5e00572031f4a7258c99c6dc0f802385ee5fe
2024-09-23 16:28:03 +00:00
thiemowmde a630e3d129 Make use of ??=, ?: and similar operators where possible
The main benefit of these operators is that they avoid repeating
parts of the code.

Change-Id: I86ea0eb02715ad5b7c62a71849309ed7095c5972
2024-09-21 20:00:50 +00:00
Isabelle Hurbain-Palatin b1cc0225a9 Set language on ScribuntoContentHandler new ParserOutput
I have reproduced at least one instance of the message "ParserOutput
does not specify a language and no page language set in helper." by
trying to query a rest.php html endpoint on a module with the
scribunto-doc-page-does-not-exist message deactivated (which is the case
on wikidata).
I do not know if that path is the one that triggers the current large
amount of these messages coming from Wikidata, but it looks reasonable
to fix that one at least.
I'm also not sure this fix is the right one - I'll let people with more
Scribunto and ContentHandler experience chime on that :)

Bug: T362312
Change-Id: I26c1683c803f5cafd08de83e8b428031414d1c4e
2024-09-12 11:49:40 +02:00
Nemoralis a01cc2f2f8 Added Talysh namespaces
Bug: T367009
Change-Id: I5dd53d1d7f535169772833828aac5fe01dcdb6a9
2024-09-11 17:36:14 +00:00
Siddharth VP c08452684c Rename SyntaxHighlight RL module
Bug: T368166
Depends-On: I999937c1f6303ecc64adb6285e73a9ce10f67bd8
Change-Id: I68d13d6d3fed7c70d795b0864bf5fb9ef1409c0a
2024-09-09 19:35:26 +00:00
Ebrahim Byagowi 27136f2afa Avoid use of deprecated wfGetUrlUtils
Change-Id: Ia36e0cf4a390f32fad7da55a503ac15afa85317a
2024-09-08 09:47:06 +03:30
Translation updater bot 484338c20d
Localisation updates from https://translatewiki.net.
Change-Id: I3ca2ad1cc8b9bee16f10af115f3b32a7b2437e5a
2024-09-02 09:21:31 +02:00
libraryupgrader 8f4409c633 build: Updating micromatch to 4.0.8
* https://github.com/advisories/GHSA-952p-6rrq-rcjv

Change-Id: Iecb078280bd2e2b1698501d7374025618d6a5142
2024-08-31 07:19:52 +00:00
James D. Forrester bb71303a81 Replace use of deprecated global URL functions with wfGetUrlUtils()
This is a quick fix rather than the proper DI fix.

Bug: T319340
Change-Id: I9e3bd0049b28efc634e1f394a487f86e27ef9e0d
2024-08-29 13:35:12 -04:00
thiemowmde 40ebea2313 Make use of MainConfigNames constants in tests
Change-Id: I55aa25268b9d2f48f90b6f79ed4309c9b2355bd9
2024-08-27 20:36:11 +00:00
thiemowmde 5ced07c366 Improve a few PHPDoc type hints
Mostly unspecific arrays that can be made more specific. This patch
intentionally doesn't touch any code, only comments.

Change-Id: I5b4690e6160c6c543f9fcb2f62c41f6329d48bdb
2024-08-27 16:54:41 +00:00
thiemowmde ffafba0695 Remove meaningless return true from hook handler functions
Returning true is the same as returning nothing. It's only meaningful
when a hook handler can also return false. Some actually do this.
I'm not touching these.

See Icccf60b for the reasoning why the added `@return void` are
beneficial.

Change-Id: I6de7addee853ff183058e6c84e87a5b275c785e8
2024-08-27 08:47:46 +00:00
James D. Forrester 289c7004e0 build: Update MediaWiki requirement to 1.43
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I22ba3c032454a8a68331b1e373a353585569359f
2024-08-24 14:38:32 +00:00
C. Scott Ananian 13b7e5ab31 Add title.content alias for Title::getContent()
No other access in the Title class contains a `get` prefix, so this
makes the title methods consistent.

Bug: T373047
Change-Id: I4a3a7498462b7b3b6143dc61f529e526ccb112e2
2024-08-22 11:30:26 -04:00
Translation updater bot 9c4fc5a95c
Localisation updates from https://translatewiki.net.
Change-Id: Ife509bc2a69828bb34ab689773a3908dd3914fa5
2024-08-19 09:24:55 +02:00
Translation updater bot ee1383994c
Localisation updates from https://translatewiki.net.
Change-Id: Ie9d452501298d0c925e4e7cd2dc4f60a683d87ea
2024-08-14 09:23:38 +02:00
libraryupgrader 94b4f0463f build: Updating mediawiki/mediawiki-codesniffer to 44.0.0
Change-Id: Ic23a06fd70f599665371fa35e10cb4a1ca26caac
2024-08-12 16:16:21 +00:00
Translation updater bot a769c7410f
Localisation updates from https://translatewiki.net.
Change-Id: I400f98094ec979815c371de58aedfd741ccdb98f
2024-08-08 09:20:34 +02:00
dreamrimmer 22a86e47b1 Remove alias for the Module namespace in Hindi
Bug: T366235
Change-Id: I33ce7a5a9844ca031c675e4c8d7ca67da473701e
2024-08-07 18:33:29 +00:00
Siddharth VP a414aba445 Expose page categories to Lua
Added `categories` property in the lua title class which fetches page
categories. Analogous to getContent() which fetches page content. This
increments the expensive function count.

This enables category-specific editnotices (T85372) and other use-cases.

Bug: T50175
Change-Id: Ie8e0762c537374e6086abe9f9916b8200582776a
2024-08-07 16:50:07 +00:00
Translation updater bot db4691da48
Localisation updates from https://translatewiki.net.
Change-Id: Ic856b0d7efe0b0bc73540ceedb0d1941ea19b551
2024-08-06 09:48:36 +02:00
Amir E. Aharoni df6c79969d Add namespace translations in Iban (iba)
Provided by Song GK at
https://translatewiki.net/w/i.php?title=User_talk:Song_GK&oldid=12540720#Namespaces

Bug: T367991
Change-Id: Idc62fcbdc89dd20a2f56f07c5550020805bfbd46
2024-07-27 07:06:37 +00:00
Translation updater bot ec0b80e57e
Localisation updates from https://translatewiki.net.
Change-Id: Ib7bf8da35df80073a7d1d2a604ceaf01d80be0f7
2024-07-26 09:46:36 +02:00