Page MenuHomePhabricator

Abstract SpecialCheckUser::addLogEntry()
Closed, ResolvedPublic

Description

Problem
In T245662 we started using SpecialCheckUser::addLogEntry() from SpecialInvestigate::addLogEntries(). This was a quick way to get the log entries added, but added a bit of Technical-Debt that should be fixed at some point.

Proposed Solution
Move the method to a new service that can be used by both special pages.

Event Timeline

Change 580123 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/CheckUser@master] Separate out SpecialCheckUser::addLogEntry

https://gerrit.wikimedia.org/r/580123

@dbarratt alternative solution, since its also used in the checkuser api: move it to a trait. See the patch

@dbarratt alternative solution, since its also used in the checkuser api: move it to a trait. See the patch

Oh that's true. The trait works. I suppose even a static class would be fine.

Since T222388, API modules can have services injected into them. :)

DannyS712 added a subscriber: DannyS712.

unlicking

Change 814297 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Move the function to log a check into a new CheckUserLogService

https://gerrit.wikimedia.org/r/814297

Dreamy_Jazz added a subscriber: Dreamy_Jazz.

Uploaded a patch to make it a service.

Change 580123 abandoned by Dreamy Jazz:

[mediawiki/extensions/CheckUser@master] Separate out SpecialCheckUser::addLogEntry

Reason:

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CheckUser/+/814297 merged instead of this.

https://gerrit.wikimedia.org/r/580123

Change 814297 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Move the function to log a check into a new CheckUserLogService

https://gerrit.wikimedia.org/r/814297

Patch merged and will be in the next train.