Optionally add change tags to MediaWiki's export XML dumps
In MediaWiki, each revision of a page and entry in a log can have "change tags" applied. Change tags are custom attributes that describe the revision or log entry in some way (e.g. "made using VisualEditor", "possible vandalism").
In https://phabricator.wikimedia.org/T22691, users would like to be able to transport change tags using the import and export functionality of MediaWiki. Your goal is to include change tags for each revision in the exported XML dumps. Tags should not be exported by default -- only when the user requests it by setting a flag on WikiExporter.
Even though the Phabricator task asks for this functionality to be available from Special:Export, you will not add this there. Instead, you will add a parameter --change-tags
to the dumpBackup.php
maintenance script, which will cause change tags to be exported in the XML dump.
You will also modify the export XSD schema to include the new elements you add to the XML dump.
Suggested XML schema:
<revision>
...
<comment>...</comment>
<tags>
<tag>Tag number one</tag>
<tag>Tag number two</tag>
</tags>
...
</revision>