Page MenuHomePhabricator

GlobalCssJs needs uses of global $wgUser removed
Closed, ResolvedPublic

Description

See parent task:

The only use is in the removeOldManualUserPages maintenance script, and is accompanied by a comment explaining that it is used to set $wgUser "For hooks not using RequestContext (e.g. AbuseFilter)".

What hooks remain that still need this?

Event Timeline

DannyS712 added a subscriber: Daimona.

@Daimona does AbuseFilter still require this?

@Daimona does AbuseFilter still require this?

No. Most usages of $wgUser were removed with r460335.

Nowadays, AF only needs $wgUser to compute old_wikitext and new_wikitext for a RecentChanges row [1], which is unrelated to what that script is doing. However, that doesn't exclude other hook handlers (in other extensions) needing $wgUser. In general, all code that *writes* to $wgUser should be removed last.

[1] - Which in turn is blocked on a huge amount of tech debt, outlined at T213006.

Looking at current hook handlers, I don't see any that use $wgUser

Change 569396 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/GlobalCssJs@master] Remove use of global $wgUser

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

Removing task assignee due to inactivity, as this open task has been assigned for more than two years. See the email sent to the task assignee on February 06th 2022 (and T295729).

Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.

If this task has been resolved in the meantime, or should not be worked on ("declined"), please update its task status via "Add Action… 🡒 Change Status".

Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.

DannyS712 changed the task status from Open to Stalled.Mar 14 2022, 1:18 AM
DannyS712 claimed this task.

Hasn't been done yet because it writes to $wgUser, will do in 1.39 as part of the removal of $wgUser from everywhere

Change 569396 abandoned by Jforrester:

[mediawiki/extensions/GlobalCssJs@master] Remove use of global $wgUser

Reason:

This script was dropped in I1f6e8dda556f14828112fefaa1e8261df349f150.

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

Jdforrester-WMF subscribed.

Done in I1f6e8dda556f14828112fefaa1e8261df349f150.