Commit graph

8 commits

Author SHA1 Message Date
Gergő Tisza
12a336d0a1
resourceloader: Do not load user scripts/styles for temp users
Temp users do not have preferences access, so they should not be
able to customize the site via user scripts/styles either.

This does not have a lot of practical significance because (with
the default config) temp users can't edit their script/style
subpages anyway, but it's good form.

Bug: T355377
Change-Id: Iaae99909b7bac9a32bcedd61b4b8b29ad1376fa1
2024-02-29 12:31:59 +01:00
James D. Forrester
21d8d9863b Drop old ResourceLoader class aliases, deprecated since 1.39
Depends-On: Iff15a2e13a3507ef1ab5cfa504ca1a1c8d2b2a60
Depends-On: Icf8331e35acf6fe51a8303ee639921b9e4f3e6bb
Depends-On: I5a5af003026db69b279ddde0b0dedbfcfe7d70fd
Change-Id: I5929a2f760c8d21c1cb2542a19220a91ac7240e4
2024-01-31 18:24:37 -05:00
James D. Forrester
94ece673b2 Namespace TitleValue under \MediaWiki\Title
One of the big ones, so doing this alone.

Bug: T166010
Change-Id: I4c901d5c32696d8334ec30cede7d9b6f3d8d645e
2023-09-18 18:24:39 +01:00
Kosta Harlan
78916de4aa ResourceLoader: Define targets in a single location
All the *Module classes end up inheriting from ResourceLoader/Module, so
we only need to define the targets there.

Bug: T127268
Bug: T328497
Change-Id: I12b126377cea78b88269e6efe68f92f3586c4ecc
2023-02-02 16:27:08 +00:00
Derick Alangi
4648d6c74d ResourceLoader: Remove support for UserModule "excludepage" parameter
Per Codesearch:
https://codesearch.wmcloud.org/search/?q=%5B%27%22%5Dexcludepage%5B%27%22%5D

There are no uses of the "excludepage" query parameter in our codebases
left. These were migrated in 2018 (change Ib9d2ce42931c1de8372e2) to
the parent class (WikiModule) via RL\Context::getContentOverrideCallback
and RL\DerivativeContext::setContentOverrideCallback.

Bug: T112474
Change-Id: I1cb4426308f4ebb1dfbd0ee1b2cd58512006ed99
2022-06-26 22:58:13 +00:00
Tim Starling
3e2653f83b ResourceLoader namespace (attempt 2)
Move ResourceLoader classes to their own namespace. Strip the
"ResourceLoader" prefix from all except ResourceLoader itself.

Move the tests by analogy.

I used a namespace alias "RL" in some callers since RL\Module is less
ambiguous at the call site than just "Module".

I did not address DependencyStore which continues to have a non-standard
location and namespace.

Revert of a241d83e0a.

Bug: T308718
Change-Id: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
2022-05-24 15:41:46 +00:00
Lucas Werkmeister (WMDE)
a241d83e0a Revert "ResourceLoader namespace"
This reverts commit e08ea8ccb9.

Reason for revert: Breaks Phan in extensions, and as far as I’m aware,
this change isn’t urgently needed for anything, so the simplest fix is
to revert it again for now. After PHP 7.4 it should be safer to try this
again (we hopefully won’t need the two “hack” classes by then).

Bug: T308443
Change-Id: Iff3318cbf97a67f821f78e60da62a583f63e389e
2022-05-16 14:43:33 +00:00
Tim Starling
e08ea8ccb9 ResourceLoader namespace
Move ResourceLoader classes to their own namespace. Strip the
"ResourceLoader" prefix from all except ResourceLoader and
ResourceLoaderContext.

Move the tests by analogy.

I used a namespace alias "RL" in some callers since RL\Module is less
ambiguous at the call site than just "Module".

I did not address DependencyStore which continues to have a non-standard
location and namespace.

Change-Id: I92998ae6a82e0b935c13e02a183e7c324fa410a3
2022-05-16 14:41:27 +10:00
Renamed from includes/resourceloader/ResourceLoaderUserStylesModule.php (Browse further)