Add setting to control the creation of NullRevision on upload
authorWMDE-Fisch <christoph.jauera@wikimedia.de>
Mon, 7 May 2018 13:41:53 +0000 (15:41 +0200)
committerThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Wed, 9 May 2018 16:17:06 +0000 (18:17 +0200)
commit6f44e5b690109a60e68db72a2c4dd88969aeb0a8
treec80e6244ac30a4493b751810da0285006d43a3f8
parenta63088d496c440e082009ef8c6901e364563db07
Add setting to control the creation of NullRevision on upload

When uploading multiple file revisions with fitting text revisions to
core the UploadRevisionImporter will create a unwanted NullRevision on
the file page.

This NullRevision originates from LocalFile:upload() and is added there
in recordUpload2 as part of the normal upload process. There it is meant
to leave a hint on the text revision history.

This whole area is in need of heavy refactoring. But since the issue is
blocking the current implementation of the FileImporter extension, a
parameter is added to control the creation of that NullRevision.

Bug: T193621
Change-Id: I57c947eb63a7627ab1eec850cdf5e076f5f62df5
includes/filerepo/file/LocalFile.php
includes/import/ImportableUploadRevisionImporter.php