Commit graph

3 commits

Author SHA1 Message Date
DannyS712
e156a2f078 TableCleanup: stop writing to $wgUser
This class is not stable to extend, nor does codesearch reveal
any classes extending it outside of core, so we can just evaluate
if $wgUser needs to be set for this class and subclasses in core.

TableCleanup is not set up to be run directly, it requires that it
be subclassed and the subclass run as a maintenance script. Within
TableCleanup itself, nothing depends on $wgUser. Looking at the
subclasses in core:
* CleanupCaps overrides the execute method, so the code to set
$wgUser in TableCleanup::execute() is not being run
* CleanupImages, TitleCleanup, and ClenupWatchlist do not
appear to have any code that relies on anything related to the
current user or context

Since nothing is using the user in any form, simply remove the
write to $wgUser, no need to replace it with setting the context
user

Bug: T243708
Change-Id: I1a22f2ebab028822e663ab1fdcbd6c7b02331fef
2021-06-02 07:04:23 +00:00
DannyS712
cf5fd868cd Reduce some references to $wgUser
Should be a no-op

Bug: T243708
Change-Id: I7b204cdc629c6c33e6a84b5c7a4e0e7ac321f19d
2020-10-13 15:07:27 +00:00
James D. Forrester
74ee16732e maintenance: Move cleanupTable from .inc to .php
… and fix the name.

Bug: T184782
Change-Id: I670af00baed690ef57413e721b8f5f615ea46502
2020-09-25 17:36:39 +01:00
Renamed from maintenance/cleanupTable.inc (Browse further)