From 0d2e05a0b57723b9f3dddc3ef2ad59c1844d7697 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Mon, 11 Oct 2021 09:03:01 +0200 Subject: Add OpenDocument flat mimetypes and x-office/drawing alias MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Repair/RepairMimeTypes.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/private') diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index b5c17e85147..61512627258 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -192,6 +192,17 @@ class RepairMimeTypes implements IRepairStep { return $this->updateMimetypes($updatedMimetypes); } + private function introduceFlatOpenDocumentType() { + $updatedMimetypes = [ + "fodt" => "application/vnd.oasis.opendocument.text-flat-xml", + "fods" => "application/vnd.oasis.opendocument.spreadsheet-flat-xml", + "fodg" => "application/vnd.oasis.opendocument.graphics-flat-xml", + "fodp" => "application/vnd.oasis.opendocument.presentation-flat-xml", + ]; + + return $this->updateMimetypes($updatedMimetypes); + } + private function introduceOrgModeType() { $updatedMimetypes = [ 'org' => 'text/org' @@ -245,5 +256,9 @@ class RepairMimeTypes implements IRepairStep { if (version_compare($ocVersionFromBeforeUpdate, '21.0.0.7', '<') && $this->introduceOrgModeType()) { $out->info('Fixed orgmode mime types'); } + + if (version_compare($ocVersionFromBeforeUpdate, '23.0.0.2', '<') && $this->introduceFlatOpenDocumentType()) { + $out->info('Fixed Flat OpenDocument mime types'); + } } } -- cgit v1.2.3