mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
Add OpenDocument flat mimetypes and x-office/drawing alias
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
62947867ce
commit
0d2e05a0b5
6 changed files with 34 additions and 1 deletions
1
core/img/filetypes/x-office-drawing.svg
Normal file
1
core/img/filetypes/x-office-drawing.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1c-.28 0-.5.22-.5.5v13c0 .28.22.5.5.5h11c.28 0 .5-.22.5-.5V4l-3-3H2.5zM4 6h2.8v1.2h2.4V6H12v3.2H9.2V8h-.8v3.2h.8V10H12v3.2H9.2V12H7.6V8h-.8v1.2H4V6z" style="fill:#ebc94a;fill-opacity:1"/></svg>
|
||||
|
After Width: | Height: | Size: 271 B |
|
|
@ -55,7 +55,13 @@ OC.MimeTypeList={
|
|||
"application/vnd.oasis.opendocument.text": "x-office/document",
|
||||
"application/vnd.oasis.opendocument.text-master": "x-office/document",
|
||||
"application/vnd.oasis.opendocument.text-template": "x-office/document",
|
||||
"application/vnd.oasis.opendocument.graphics": "x-office/drawing",
|
||||
"application/vnd.oasis.opendocument.graphics-template": "x-office/drawing",
|
||||
"application/vnd.oasis.opendocument.text-web": "x-office/document",
|
||||
"application/vnd.oasis.opendocument.text-flat-xml": "x-office/document",
|
||||
"application/vnd.oasis.opendocument.spreadsheet-flat-xml": "x-office/spreadsheet",
|
||||
"application/vnd.oasis.opendocument.graphics-flat-xml": "x-office/drawing",
|
||||
"application/vnd.oasis.opendocument.presentation-flat-xml": "x-office/presentation",
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "x-office/presentation",
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "x-office/presentation",
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.template": "x-office/presentation",
|
||||
|
|
@ -129,6 +135,7 @@ OC.MimeTypeList={
|
|||
"text-vcard",
|
||||
"video",
|
||||
"x-office-document",
|
||||
"x-office-drawing",
|
||||
"x-office-presentation",
|
||||
"x-office-spreadsheet"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,13 @@
|
|||
"application/vnd.oasis.opendocument.text": "x-office/document",
|
||||
"application/vnd.oasis.opendocument.text-master": "x-office/document",
|
||||
"application/vnd.oasis.opendocument.text-template": "x-office/document",
|
||||
"application/vnd.oasis.opendocument.graphics": "x-office/drawing",
|
||||
"application/vnd.oasis.opendocument.graphics-template": "x-office/drawing",
|
||||
"application/vnd.oasis.opendocument.text-web": "x-office/document",
|
||||
"application/vnd.oasis.opendocument.text-flat-xml": "x-office/document",
|
||||
"application/vnd.oasis.opendocument.spreadsheet-flat-xml": "x-office/spreadsheet",
|
||||
"application/vnd.oasis.opendocument.graphics-flat-xml": "x-office/drawing",
|
||||
"application/vnd.oasis.opendocument.presentation-flat-xml": "x-office/presentation",
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "x-office/presentation",
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "x-office/presentation",
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.template": "x-office/presentation",
|
||||
|
|
|
|||
|
|
@ -127,6 +127,10 @@
|
|||
"ots": ["application/vnd.oasis.opendocument.spreadsheet-template"],
|
||||
"otp": ["application/vnd.oasis.opendocument.presentation-template"],
|
||||
"otg": ["application/vnd.oasis.opendocument.graphics-template"],
|
||||
"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"],
|
||||
"oga": ["audio/ogg"],
|
||||
"ogg": ["audio/ogg"],
|
||||
"ogv": ["video/ogg"],
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
|
||||
// when updating major/minor version number.
|
||||
|
||||
$OC_Version = [23, 0, 0, 1];
|
||||
$OC_Version = [23, 0, 0, 2];
|
||||
|
||||
// The human readable string
|
||||
$OC_VersionString = '23.0.0 alpha';
|
||||
|
|
|
|||
Loading…
Reference in a new issue