Recognizes Open Document Database
authorAntoine Musso <hashar@free.fr>
Mon, 31 Dec 2018 17:30:00 +0000 (18:30 +0100)
committerAntoine Musso <hashar@free.fr>
Tue, 9 Jul 2019 11:42:07 +0000 (13:42 +0200)
commitc40d76e23b7a56f816a802750fd7300aebf6a1e8
tree019f01c29cca8366885e3fe8cb34570dad255bcf
parent434015880aab5b155cc7edd6fcddf1883d0395eb
Recognizes Open Document Database

Mediawiki does not recognizes the mime type of an OpenOffice / Libre
Office Database Frontend Document and thus uses application/zip.

Our MimeAnalyzer::detectZipType() looks at the Zip files to detect known
signatures, however it is based on a reference from 2005 which did not
have the Database type yet.

OASIS Open Document Format v1.2 specify non normative MIME types, the
reference supposedly being the ones registered with the IANA, but we
have some dispredancy: ODF recommends 'base' while the IANA got
'database' registered: https://www.iana.org/assignments/media-types/

I supposed the format got approved as is, the Database mime type being
'recommended' probably because the IANA registration was pending.

Add the 'base' type which is being used by OpenOffice 3.x and later as
well as at least Libre Office 5.x.
Document my findings in code comments.
Add a test.

Bug: T35515
Change-Id: If0210a87067358612ecb8b3edd001fb05d01653d
includes/libs/mime/MimeAnalyzer.php
tests/phpunit/includes/libs/mime/MimeAnalyzerTest.php