diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-10-11 09:03:01 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2021-10-12 15:14:25 +0200 |
commit | 0d2e05a0b57723b9f3dddc3ef2ad59c1844d7697 (patch) | |
tree | df2763c4f7f4dcb3cbbfd85a0da88cc0ad0310a8 /lib/private/Repair | |
parent | 62947867ce6b7408e565f4cab0c788dfac8fb128 (diff) | |
download | nextcloud-server-0d2e05a0b57723b9f3dddc3ef2ad59c1844d7697.tar.gz nextcloud-server-0d2e05a0b57723b9f3dddc3ef2ad59c1844d7697.zip |
Add OpenDocument flat mimetypes and x-office/drawing alias
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Repair')
-rw-r--r-- | lib/private/Repair/RepairMimeTypes.php | 15 |
1 files changed, 15 insertions, 0 deletions
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'); + } } } |