Skip to content

Commit

Permalink
Add visio mimetypes
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Jul 6, 2018
1 parent 422c805 commit 5541d3d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
17 changes: 17 additions & 0 deletions lib/private/Repair/RepairMimeTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,19 @@ private function introduceStreamingTypes() {
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
*/
Expand Down Expand Up @@ -191,5 +204,9 @@ public function run(IOutput $out) {
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');
}
}
}
6 changes: 6 additions & 0 deletions resources/config/mimetypealiases.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions resources/config/mimetypemapping.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 5541d3d

Please sign in to comment.