Page MenuHomePhabricator

Special:Version for ParserFunctions could be slightly improved
Open, Needs TriagePublic

Description

As far as I know, some of the content of [[Special:Version]] is not exposed through an API. Having programmatic access to this would be useful to develop WikiApiary like features.
However it is easy to parse the Special:Version file, which forces looking a bit more at its structure. Once you do this, there are two slight improvements that could be done:
"Parser function hooks" could be all listed within their own HTML element for the whole list, and each within their own.
"Parser Extension Tags", are listed all within their own element but the whole list could be its own HTML element.

Event Timeline

Hi @pdehaye, if you'd like to work on this, the file is includes/specials/SpecialVersion.php in the mediawiki/core repository. You are very welcome to use developer access to submit the proposed code changes as a Git branch directly into Gerrit which makes it easier to review and provide feedback. If you don't want to set up Git/Gerrit, you can also use the Gerrit Patch Uploader.

As far as I know, some of the content of [[Special:Version]] is not exposed through an API.

Are you sure?

https://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=extensiontags and https://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=functionhooks and https://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=showhooks

https://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=general|extensiontags|functionhooks|showhooks should show th

Documentation is at https://en.wikipedia.org/w/api.php?action=help&modules=query%2Bsiteinfo

If there's anything else missing you need... Please file a task in MediaWiki-Action-API

FWIW, I'm not saying this task is invalid, there might still be benefit from making the suggested changes etc :)