From 5541d3dd84f7dab0262fb597649cdbca342635d7 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 6 Jul 2018 15:16:21 +0200 Subject: Add visio mimetypes Signed-off-by: Joas Schilling --- lib/private/Repair/RepairMimeTypes.php | 17 +++++++++++++++++ resources/config/mimetypealiases.dist.json | 6 ++++++ resources/config/mimetypemapping.dist.json | 6 ++++++ version.php | 2 +- 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index 2b259175623..93104ce34e1 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -162,6 +162,19 @@ class RepairMimeTypes implements IRepairStep { return $this->updateMimetypes($updatedMimetypes); } + private function introduceVisioTypes() { + $updatedMimetypes = [ + 'vsdm' => 'application/vnd.visio', + 'vsdx' => 'application/vnd.visio', + 'vssm' => 'application/vnd.visio', + 'vssx' => 'application/vnd.visio', + 'vstm' => 'application/vnd.visio', + 'vstx' => 'application/vnd.visio', + ]; + + return $this->updateMimetypes($updatedMimetypes); + } + /** * Fix mime types */ @@ -191,5 +204,9 @@ class RepairMimeTypes implements IRepairStep { if (version_compare($ocVersionFromBeforeUpdate, '13.0.0.6', '<') && $this->introduceStreamingTypes()) { $out->info('Fixed streaming mime types'); } + + if (version_compare($ocVersionFromBeforeUpdate, '14.0.0.8', '<') && $this->introduceVisioTypes()) { + $out->info('Fixed visio mime types'); + } } } diff --git a/resources/config/mimetypealiases.dist.json b/resources/config/mimetypealiases.dist.json index 2c2ea28059c..eea7081dd71 100644 --- a/resources/config/mimetypealiases.dist.json +++ b/resources/config/mimetypealiases.dist.json @@ -40,6 +40,12 @@ "application/vnd.ms-powerpoint.presentation.macroEnabled.12": "x-office/presentation", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12": "x-office/presentation", "application/vnd.ms-powerpoint.template.macroEnabled.12": "x-office/presentation", + "application/vnd.ms-visio.drawing.macroEnabled.12": "application/vnd.visio", + "application/vnd.ms-visio.drawing": "application/vnd.visio", + "application/vnd.ms-visio.stencil.macroEnabled.12": "application/vnd.visio", + "application/vnd.ms-visio.stencil": "application/vnd.visio", + "application/vnd.ms-visio.template.macroEnabled.12": "application/vnd.visio", + "application/vnd.ms-visio.template": "application/vnd.visio", "application/vnd.ms-word.document.macroEnabled.12": "x-office/document", "application/vnd.ms-word.template.macroEnabled.12": "x-office/document", "application/vnd.oasis.opendocument.presentation": "x-office/presentation", diff --git a/resources/config/mimetypemapping.dist.json b/resources/config/mimetypemapping.dist.json index ef3de4d75dc..2f16e45a4a8 100644 --- a/resources/config/mimetypemapping.dist.json +++ b/resources/config/mimetypemapping.dist.json @@ -176,6 +176,12 @@ "vcf": ["text/vcard"], "vob": ["video/dvd"], "vsd": ["application/vnd.visio"], + "vsdm": ["application/vnd.ms-visio.drawing.macroEnabled.12"], + "vsdx": ["application/vnd.ms-visio.drawing"], + "vssm": ["application/vnd.ms-visio.stencil.macroEnabled.12"], + "vssx": ["application/vnd.ms-visio.stencil"], + "vstm": ["application/vnd.ms-visio.template.macroEnabled.12"], + "vstx": ["application/vnd.ms-visio.template"], "wav": ["audio/wav"], "webm": ["video/webm"], "webp": ["image/webp"], diff --git a/version.php b/version.php index f0a00a9e50b..13501453cc6 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 = array(14, 0, 0, 7); +$OC_Version = array(14, 0, 0, 8); // The human readable string $OC_VersionString = '14.0.0 alpha'; -- cgit v1.2.3