Page MenuHomePhabricator

Remove or document MW_HTML_FOR_DUMP checks
Closed, ResolvedPublic

Description

In FlaggedRevsUIHooks.php, 6 hook handlers return immediately if the MW_HTML_FOR_DUMP constant is defined. Those seem to be the only usages of this constant, for which I could find no other occurrence on codesearch, phabricator, mw.org, and google. This check was first introduced in 2008 by @aaron, then moved around a bunch of times. It seems to me that this is just ancient code that can go away. If that is not the case, and this constant is actually somehow defined in some foolish undetectable way, this should be documented to avoid more WTF moments to developers.

Event Timeline

Maybe @ArielGlenn knows more? I suggest just dropping it if it's unused, it's useless and confusing.

This setting was defined in the DumpHTML extension, which was archived in April 2021. Given that, I think that references to it in FlaggedRevs can safely be removed.

Change 831491 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/extensions/FlaggedRevs@master] Drop MW_HTML_FOR_DUMP checks

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

Change 831491 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] Drop MW_HTML_FOR_DUMP checks

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

Ladsgroup claimed this task.