Page MenuHomePhabricator

AjaxResponse::checkLastModified uses $wgUser
Closed, ResolvedPublic

Description

AjaxResponse::checkLastModified uses global $wgUser
In looking into callers, I found that the whole system of ajax callable functions is deprecated[1]

I propose that the system be removed.
For WMF deployed extensions, this means updating Collection and FlaggedRevs to no longer use it (instead, whatever the intended replacement was)

My understanding is that, without Ajax functions, the entire AjaxResponse class can be removed, removing the use of $wgUser

Alternatively, since the function has no known callers[2] and no declared scope, I suggest it simply be removed without deprecation (i.e. breaking change)

I (DannyS712) have not assigned this to myself, since if the ajax system will be removed (option 1) its something I'm not familiar with

See also T42786 - does removing the dispatcher mean that the response can be removed as well?

[1] wgUseAjax was deprecated in 1.31 and ignored since 1.32; wgAjaxExportList was deprecated in 1.27 (T42786)
[2] Calls listed in the code search are for OutputPage::checkLastModified, which appears to be unrelated

Event Timeline

WDoranWMF added subscribers: cscott, aaron, WDoranWMF.

@DannyS712 Since it's deprecated it does seem reasonable that it be removed. Both of the listed component do not have explicit owners but @cscott and @aaron are associated with them historically. They would likely be best to give input.

For now we're going to move it to Icebox from our teams perspective.

Change 575400 had a related patch set uploaded (by Aaron Schulz; owner: Aaron Schulz):
[mediawiki/core@master] Deprecate various unused AjaxResponse methods

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

Change 575400 merged by jenkins-bot:
[mediawiki/core@master] Remove various unused AjaxResponse methods

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

DannyS712 assigned this task to aaron.

The specific method was removed, resolving the issue raised in this task.