Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I230ada2f4ad95f86593759e8320d47acdf06a749
Why:
* Temp accounts cannot thank other users, so do not add the "thank" link
in log entries.
What:
* Change condition to check if a user is not named, rather than if they
are anonymous
* Add an integration test to verify the behavior for anon, temp, and
named users
Bug: T375209
Change-Id: Idb772a3072a6dc8a9d052cebb306b558f49caf31
ChangesList is used on Special:Watchlist and Special:RecentChanges
HistoryPager on action=history
Bug: T367175
Change-Id: I12b92a94859300ab3bedd81c0e2399e203c1ad0f
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: If99e2c98969579306c7fdc626658bec5d6e26b5d
Echo hook BeforeCreateEchoEvent is triggered very early in
Setup.php. This causes all dependencies of Thanks/Hooks to be
initialized. One of the places that is affected is the `addWiki.php`
script that tries to redefine the RevisionStore service, but cannot
due to fact it's already initialized.
Both Echo hooks (BeforeCreateEchoEvent and EchoGetBundleRules) do
not require any dependencies, and due to fact that one of those is
initialized early, let's move them to a separate small EchoHooks
class that would handle Echo specific logic.
Bug: T358236
Change-Id: I0e348872ba5dc313325e3f4f296fd84bfb2c785b
This requires 1.42 for some new names
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I1b433ab02231087e0f84a734092751ce2cf28b2c
* BeforeCreateEchoEventHook and
* EchoGetBundleRulesHook from extension Echo and
* BeforeSpecialMobileDiffDisplayHook from extension MobileFrontend.
Change-Id: Icede5f70f988957f245fac1984a63f01fa1d0f44
Without this Thanks button will be unstyled on Minerva skin.
In the desktop Minerva diff page, the button should be a progressive button
for consistency with Special:MobileDiff
Testing:
* Check diff mode (AMC disabled)
* history page (AMC enabled)
Bug: T345768
Change-Id: I038cfab627eea2fdf558accbf390a8d2d02153a1
It has been decided to not allow temporary users to thank
other users (see task). This is because the transition
between anonymous and temporary account is nearly invisible,
and it might be confusing why the thanking ability appears
and hides.
Bug: T345679
Change-Id: I62e67327c9a80b3da9e98a2dccdd4ec2051f3026
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.
Bug: T338457
Change-Id: If844970f0c8d8f09d0de2a2140b080d1292530a1
As the revision is a local revision, the user identity can be used to
build a User. Not needed to use the id.
Same for the title/page id, where a PageIdentity already exists. Not
needed to use the id.
Change-Id: Ia088d964f75fb46bd0848c9aba8f5bc97ad7a067
Use methods provided by core to create (non)existing test pages and
editing them. Make sure that revId is not 1, or the test will fail due
to T344475. This is needed by core change Ie2f1809d.
Change-Id: Ib7ea8c566d330db27c8abfcb4a783ddbd31787e0
Replaced deprecated calls to User::newFromName
and User::getEditToken with their direct
replacements. Adjusted the code to make it
easier to parse visually and fixed a potentially
nullable references in getFormFields
Bug: T337002
Change-Id: I97a1266d094452ddaea43357d20bc0119b97576d
I've moved all API classes into a separate folder,
as I felt like grouping modules improves readability.
APIs themselves had storage logic which I extracted and put
in another folder. I was originally going with an interface
to the storage to allow for other storage methods than
log entries, but the code was too tightly coupled with it,
so I've left that for another day. Added dependency injection
for all services and used ServiceOptions for config vars.
Bug: T337002
Change-Id: Ie8a1f435d635e1d0e1286f673bfe96cc4fdfe4fe
In detail:
* Use more compact syntax to avoid a bit of code duplication.
* Use createMock() shortcut in tests.
* Avoid hiding code in strings.
* Remove a comment that literally repeats what the code says.
Change-Id: Ibedef380489451268e2e87f0864164e8f9737913
This is a temporary fix by not showing the thank action
on log entries for pages that use the new PagerTool.
There should be a follow up to allow PagerTool to call
a different hook that can take a reference to log entries
and properly generate the thank action depending on
the type (revision/log)
Bug: T325753
Change-Id: Icaaa044420baa26efdafc7f3fe049b9f58c72ee8