From 3560aa80f018eb2caf55de572e88110d5a633ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 3 Sep 2020 08:53:23 +0200 Subject: [PATCH 1/2] Add opendocument templates to mimetype mappings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- resources/config/mimetypemapping.dist.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/config/mimetypemapping.dist.json b/resources/config/mimetypemapping.dist.json index c59dfaefd30dd..dd0a4942db31e 100644 --- a/resources/config/mimetypemapping.dist.json +++ b/resources/config/mimetypemapping.dist.json @@ -123,6 +123,10 @@ "odp": ["application/vnd.oasis.opendocument.presentation"], "ods": ["application/vnd.oasis.opendocument.spreadsheet"], "odt": ["application/vnd.oasis.opendocument.text"], + "ott": ["application/vnd.oasis.opendocument.text-template"], + "ots": ["application/vnd.oasis.opendocument.spreadsheet-template"], + "otp": ["application/vnd.oasis.opendocument.presentation-template"], + "otg": ["application/vnd.oasis.opendocument.graphics-template"], "oga": ["audio/ogg"], "ogg": ["audio/ogg"], "ogv": ["video/ogg"], From b0970f86f03cf5f13f2550ae2521f87cf2806072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 4 Sep 2020 08:42:32 +0200 Subject: [PATCH 2/2] Update repair step apply new opendocument template mimes 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 +++++++++++++++ version.php | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index b6b6ceed104ca..60a7df25f6395 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -191,6 +191,17 @@ private function introduceComicbookTypes() { return $this->updateMimetypes($updatedMimetypes); } + private function introduceOpenDocumentTemplates() { + $updatedMimetypes = [ + 'ott' => 'application/vnd.oasis.opendocument.text-template', + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', + 'otp' => 'application/vnd.oasis.opendocument.presentation-template', + 'otg' => 'application/vnd.oasis.opendocument.graphics-template', + ]; + + return $this->updateMimetypes($updatedMimetypes); + } + /** * Fix mime types */ @@ -227,5 +238,9 @@ public function run(IOutput $out) { if (version_compare($ocVersionFromBeforeUpdate, '14.0.0.10', '<') && $this->introduceComicbookTypes()) { $out->info('Fixed comicbook mime types'); } + + if (version_compare($ocVersionFromBeforeUpdate, '20.0.0.5', '<') && $this->introduceOpenDocumentTemplates()) { + $out->info('Fixed OpenDocument template mime types'); + } } } diff --git a/version.php b/version.php index da3c3477ae403..9457db90c7cd5 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ // between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel // when updating major/minor version number. -$OC_Version = [20, 0, 0, 4]; +$OC_Version = [20, 0, 0, 5]; // The human readable string $OC_VersionString = '20.0.0 Beta 2';