Commit graph

2804 commits

Author SHA1 Message Date
Fomafix 9c5ccf4b74 Remove redundant closure for all modules with packageFiles
Modules loaded with packageFiles are always executed in module scope
(with a closure), even in debug mode.

The behaviour of non-packageFiles debug mode is the only reason files
have closures.

https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Closure

Change-Id: I7ea2057029a63148a96333af7ff09a7885d2daa8
2024-10-05 06:49:13 +00:00
Fomafix 0eb9b7d86c Use ES6 features
Bug: T334853
Change-Id: I48eef3424f4b4028f4ac668a12692af95d79c288
2024-10-05 06:49:00 +00:00
jenkins-bot 5ba10fcef7 Merge "Make category links arrow link to actual categories" 2024-10-04 23:12:32 +00:00
Ebrahim Byagowi fcc3334125 Make category links arrow link to actual categories
I believe having arrows linked to the actual pages can
be much more useful than linking to '#' of the same
page. Linking to the correct page makes user to notice
if the page is already visited also using color of
the arrow.

If we didn't like link visited logic to be not used we
could've used a different link rather than color of links
and going makes us able to :visited logic of
If8b2b45b24351ee5c8fc9ee1380563f5d5b88678 also.

Personally however I'm in believe that having a useful
link that can be opened on a different tab using
Ctrl (or long click on phones) is always more useful.

Change-Id: Ib56fad0b711853d67b2d55617b36deff56141c74
2024-10-05 00:48:31 +03:30
Ebrahim Byagowi 451aeceba1 Use Codex provided arrow icons for the tree
It also adds an animation for the arrow matching other
recently Codex provided arrow icons adopted animations.

Change-Id: If8b2b45b24351ee5c8fc9ee1380563f5d5b88678
2024-10-05 00:07:05 +03:30
Fomafix 092797b0e2 Remove duplicate/unnecessary trim
CategoryTree::makeTitle also makes a trim and an early return.

A trim on the return value of renderChildren() is not needed.

Change-Id: I1fc2705277491797eb6c0d0900152b63913ca875
2024-10-04 19:55:50 +00:00
Fomafix 921e6fe3f9 Move all Parser handling to Hooks::parserHook
Change-Id: I5d35c6d87b610ffb566588a3d0c75067c1d06962
2024-10-04 19:55:24 +00:00
Fomafix a918bdea16 Remove $allowMissing and make the check directly on the hook
This change avoids a super category expand button on not existing
categories.

This change even avoids loading the modules if there are no valid
categories.

Change-Id: I38a2b49aaef7cf46d9f89e1cc9fd65e2382155f5
2024-10-04 19:53:37 +00:00
Ebrahim Byagowi fe71840c56 Replace use of getDirMark with HTML markup
Bug: T375975
Depends-On: I2ee6d8fb9161a5434eacad819c6d7784aee8aac3
Change-Id: Ia1ab65222c486ea89e6b916fd1d5a6860439205e
2024-10-04 22:06:26 +03:30
Fomafix b1e3b5f06d Update namespaces of PHP classes
Change-Id: I8c4e81631b4c3f7321837e12713a8a33762a8fcc
2024-10-03 19:55:44 +00:00
Translation updater bot 27dfa4bd86
Localisation updates from https://translatewiki.net.
Change-Id: Ie6a8690faf6c60bff7859356c74f2b126d792c7d
2024-10-02 09:23:44 +02:00
Translation updater bot f68f1e3fb9
Localisation updates from https://translatewiki.net.
Change-Id: I8e06484614807accb3583a8353341e3723dc4b78
2024-09-27 09:18:09 +02:00
Translation updater bot b7939a760f
Localisation updates from https://translatewiki.net.
Change-Id: Iee8ad6e404e8fa1e0e02c240d3636d5bab7b9f6a
2024-09-23 09:20:55 +02:00
Fomafix 5d3c9b7788 Use namespace for ServiceWiringTest
Change-Id: I4cebe9b0f28160a13f0cd8360c90b3463eaf94fb
2024-09-20 09:32:34 +00:00
Translation updater bot f6b9e3a473
Localisation updates from https://translatewiki.net.
Change-Id: I8e1acb6ee85709a65386912e384fc25f1dbaa09d
2024-09-16 09:25:21 +02:00
Translation updater bot dc39ac4b3a
Localisation updates from https://translatewiki.net.
Change-Id: Iece388102e7caad95c8bb901290de61f7e1d6458
2024-09-11 09:20:20 +02:00
jenkins-bot b0d8410812 Merge "Use IConnectionProvider instead of ILoadBalancer" 2024-09-10 16:41:38 +00:00
Translation updater bot 49bf9fbaed
Localisation updates from https://translatewiki.net.
Change-Id: I4a1c249022f1e9ac3aee02e437e9d2634a30f478
2024-09-09 09:22:05 +02:00
jenkins-bot 63fb60b3e4 Merge "Use new hook OutputPageRenderCategoryLink" 2024-09-05 20:51:09 +00:00
Translation updater bot 1ad442f05a
Localisation updates from https://translatewiki.net.
Change-Id: Ida20a831263b07ad9ad85eb4e24d763f8e80c6b6
2024-09-05 09:22:38 +02:00
Fomafix 58afeaf93c Use IConnectionProvider instead of ILoadBalancer
Change-Id: Id1071e0a61030c2ddd01fecebf6bf8a99c5948e0
2024-09-04 13:28:31 +00:00
Fomafix f5f1f7de39 Use new hook OutputPageRenderCategoryLink
The new hook OutputPageRenderCategoryLink gets triggered on rendering a
single category.

This change prevents wgCategories = [] on
$wgCategoryTreeHijackPageCategories = true.

Bug: T372155
Depends-On: Id82a77a57d1f12233d974ea4c1b093f50c5ab74f
Change-Id: Ic86f210474cbc0e2dcebf664cf2309a4a4408f60
2024-09-03 09:50:34 +00:00
Translation updater bot be2605a0d5
Localisation updates from https://translatewiki.net.
Change-Id: I6dff50f467056b25a1b708acdda95f5b9ba0a89c
2024-09-02 09:20:14 +02:00
Translation updater bot 4f85dbeb90
Localisation updates from https://translatewiki.net.
Change-Id: I12d5f6f2579e1e285cb2b1aeaa0e7280b51a52a3
2024-08-29 09:17:26 +02:00
libraryupgrader b9f6a39991 build: Updating micromatch to 4.0.8
* https://github.com/advisories/GHSA-952p-6rrq-rcjv

Change-Id: Ibda27ed23e65f2be66f6d7009770d4d480d88ca8
2024-08-26 00:36:33 +00:00
jenkins-bot 90621845e1 Merge "build: Update MediaWiki requirement to 1.43" 2024-08-24 13:00:48 +00:00
Translation updater bot 57d9670593
Localisation updates from https://translatewiki.net.
Change-Id: I6fae70658c2c8cacb3f9f9a64d1443fe7697aaf6
2024-08-23 09:45:33 +02:00
James D. Forrester 258ca90fdf build: Update MediaWiki requirement to 1.43
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I33895ec2c2087d8dc2f6c1880f4fc8f2b7ef5040
2024-08-22 16:38:28 -04:00
Fomafix 033b9cc159 Use namespaced FormatJson class
This change requires MediaWiki 1.43+.

Change-Id: I5a9a0eb10372b6464985e5a9cd564ff12536fea1
2024-08-22 12:53:23 +00:00
jenkins-bot ab8c7c15cb Merge "ApiCategoryTree: Use config from $this->getConfig()." 2024-08-21 20:25:52 +00:00
Fomafix 6b65422769 ApiCategoryTree: Use config from $this->getConfig().
An injection of ConfigFactory/Config and the ConfigRegistry are not
needed anymore.

Change-Id: Ie20675981a019fe300cf84e7a16a191c0431b922
2024-08-21 18:09:26 +00:00
Translation updater bot a280b49f7e
Localisation updates from https://translatewiki.net.
Change-Id: I5fb1eacd9c6909fda1ae5f935c3a689358898902
2024-08-21 09:22:56 +02:00
Fomafix 42e31c3054 Use MainConfigNames
Change-Id: I81eb011f303dbaacc30ee3d8ac27c4a7bf10615a
2024-08-20 20:14:05 +00:00
jenkins-bot 7b7c051df0 Merge "Use PHP types" 2024-08-20 19:40:02 +00:00
Fomafix b1920c9f94 Add link to T290062 on onlyroot deprecation message
Maybe this helps to find public reachable wikis in a public search
engine by using the search pattern "T290062":
https://duckduckgo.com/?q=%22T290062%22

Bug: T290062
Change-Id: Ifc4e8bc39a0f58fde4e5e023ad4c091842661363
2024-08-20 12:14:07 +00:00
Fomafix 8fe224cd60 Use PHP types
* Add PHP type hints where possible.
* Remove @var, @param and @return if redundant to type declaration
* Remove redundant type conversions which are now enforced by type
  hints.
* Enforce that decodeBoolean returns only a bool.

Change-Id: I8da84ed4dc778dd9d84f8d9eec0a399f5ed26405
2024-08-20 08:16:37 +00:00
Translation updater bot 0925d56a2a
Localisation updates from https://translatewiki.net.
Change-Id: Ia37d75caab4cc43bf748e7f88f8fbcd083cdec09
2024-08-19 09:22:22 +02:00
libraryupgrader cc2b1f21e2 build: Updating mediawiki/mediawiki-codesniffer to 44.0.0
Change-Id: I6504fa58324bb435a762f0187c12f07066b60011
2024-08-11 03:15:07 +00:00
Translation updater bot 3375e65f34
Localisation updates from https://translatewiki.net.
Change-Id: Ibcfb1589a46137b6cda43db156eda2f77794dcb3
2024-08-08 09:19:12 +02:00
Translation updater bot e83e572961
Localisation updates from https://translatewiki.net.
Change-Id: If6fd94f9dc6f5e7d220a0f6424e038db905f7a79
2024-08-05 09:24:36 +02:00
Translation updater bot e66f69e0da
Localisation updates from https://translatewiki.net.
Change-Id: I927836bab6731723884653522bd360b98f53d776
2024-07-30 09:42:34 +02:00
Translation updater bot bd798a63fc
Localisation updates from https://translatewiki.net.
Change-Id: I52f4d271ebb6bd4fd70ccba43431ce7b606ce11c
2024-07-29 09:26:04 +02:00
Translation updater bot 3ef8c01678
Localisation updates from https://translatewiki.net.
Change-Id: Id52e45c1a2058d88e9c0f9408f6c889cae9f2e6e
2024-07-26 09:43:16 +02:00
Translation updater bot 780ca63841
Localisation updates from https://translatewiki.net.
Change-Id: I95474c3bddf3e0619118a80ed1026380e432c922
2024-07-22 09:23:56 +02:00
Translation updater bot efa2b133c3
Localisation updates from https://translatewiki.net.
Change-Id: I236f0a5f138404070bfd24549e9d7c147385885e
2024-07-18 09:22:15 +02:00
Translation updater bot 182fc66bbe
Localisation updates from https://translatewiki.net.
Change-Id: I6a27295b005e005dc2736790d9e9cf5d3315d10b
2024-07-15 09:23:31 +02:00
Translation updater bot 9dffa7c54c
Localisation updates from https://translatewiki.net.
Change-Id: If14e28c38b85a50a7b54f62ad7003d1fe5b6bf79
2024-07-11 09:29:31 +02:00
Translation updater bot ecaabc9f02
Localisation updates from https://translatewiki.net.
Change-Id: I25c316a53ec3d80ffd77953916fa8efa6fd3128a
2024-07-09 09:42:19 +02:00
Translation updater bot 57e3556571
Localisation updates from https://translatewiki.net.
Change-Id: I4dcb7fe997189165e664b8639b4e07c6349f7d16
2024-07-08 09:32:19 +02:00
Translation updater bot cde070a220
Localisation updates from https://translatewiki.net.
Change-Id: I82bae8aebb8c0c699bf4f08722ec1c8c511e1033
2024-07-05 09:47:16 +02:00