Page MenuHomePhabricator

GlobalCssJs needs uses of global $wgUser removed
Open, Needs TriagePublic


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