Merge pull request #22552 from nextcloud/bugfix/noid/opendocument-templates
Add opendocument templates to mimetype mappings
This commit is contained in:
commit
9708b004f7
|
@ -191,6 +191,17 @@ class RepairMimeTypes implements IRepairStep {
|
|||
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 @@ class RepairMimeTypes implements IRepairStep {
|
|||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"],
|
||||
|
|
Loading…
Reference in New Issue