Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-10-14 13:58:34 +0300
committerGitHub <noreply@github.com>2021-10-14 13:58:34 +0300
commitacbe4b46c39703f0d3c1e205d4609c7a2607b4b1 (patch)
tree02b3be4a00e255bc4e1ff426c19158c8e1362406
parented533bd128807ae4e41efb590d59afe05c26668c (diff)
parent2f38781c965904ad10da1953be445fa690adc2cd (diff)
Merge pull request #29157 from nextcloud/enh/opendocument
-rw-r--r--core/img/filetypes/x-office-drawing.svg1
-rw-r--r--core/js/mimetypelist.js7
-rw-r--r--lib/private/Repair/RepairMimeTypes.php15
-rw-r--r--resources/config/mimetypealiases.dist.json6
-rw-r--r--resources/config/mimetypemapping.dist.json4
-rw-r--r--tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js7
-rw-r--r--tests/lib/IntegrityCheck/CheckerTest.php16
-rw-r--r--version.php2
8 files changed, 55 insertions, 3 deletions
diff --git a/core/img/filetypes/x-office-drawing.svg b/core/img/filetypes/x-office-drawing.svg
new file mode 100644
index 00000000000..352347b6348
--- /dev/null
+++ b/core/img/filetypes/x-office-drawing.svg
@@ -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>
diff --git a/core/js/mimetypelist.js b/core/js/mimetypelist.js
index bd9b2bd69f1..a891aeec95c 100644
--- a/core/js/mimetypelist.js
+++ b/core/js/mimetypelist.js
@@ -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"
],
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php
index b5c17e85147..61512627258 100644
--- a/lib/private/Repair/RepairMimeTypes.php
+++ b/lib/private/Repair/RepairMimeTypes.php
@@ -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');
+ }
}
}
diff --git a/resources/config/mimetypealiases.dist.json b/resources/config/mimetypealiases.dist.json
index 9d0c070d1fa..891b9a72ce5 100644
--- a/resources/config/mimetypealiases.dist.json
+++ b/resources/config/mimetypealiases.dist.json
@@ -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",
diff --git a/resources/config/mimetypemapping.dist.json b/resources/config/mimetypemapping.dist.json
index b38046aef32..54bf073fb80 100644
--- a/resources/config/mimetypemapping.dist.json
+++ b/resources/config/mimetypemapping.dist.json
@@ -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"],
diff --git a/tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js b/tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js
index 66f5dbbe0f6..2625a3c3016 100644
--- a/tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js
+++ b/tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js
@@ -56,7 +56,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",
@@ -130,6 +136,7 @@ OC.MimeTypeList={
"text-vcard",
"video",
"x-office-document",
+ "x-office-drawing",
"x-office-presentation",
"x-office-spreadsheet"
],
diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php
index bc1987bedab..6f0c8e8ae85 100644
--- a/tests/lib/IntegrityCheck/CheckerTest.php
+++ b/tests/lib/IntegrityCheck/CheckerTest.php
@@ -833,7 +833,13 @@ class CheckerTest extends TestCase {
'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',
@@ -944,7 +950,13 @@ class CheckerTest extends TestCase {
'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',
@@ -1002,9 +1014,9 @@ class CheckerTest extends TestCase {
->willReturn(\OC::$SERVERROOT . '/tests/data/integritycheck/mimetypeListModified');
$signatureDataFile = '{
"hashes": {
- "mimetypelist.js": "23a3fa45757b26795f5cf8f94d9e5bce76fc916288a6458679311b312c167adcf4158ccb2c5c3db791fa0b87703b6c5863afb6c9d790b8cbac5ab3ae8c3418fb"
+ "core\/js\/mimetypelist.js": "94195a260a005dac543c3f6aa504f1b28e0078297fe94a4f52f012c16c109f0323eecc9f767d6949f860dfe454625fcaf1dc56f87bb8350975d8f006bbbdf14a"
},
- "signature": "rqdAbS1evGMhv5vQEhFwDoDgumY1La+xAEgF8TdJjyE1uEjV5442LgnIbolqH5WmGkU4EEjcIJWXEhxbtr7P1EO8WT0v7mVJBmAT0p5Gi3nxz9z9gp7mAbjfBH8McYxNzy92XbdYgiNMqi5tltYRCBXTVw1Rexh9dFc7jmLQIfpAFImR9sQG5eqGUGm+L70o34EToDnEg6Finqj4Ii5aGaGTf+DMz6wZRM2vfeegw5pxgv7EjW4R2dVTGSwwvjQbBSDzMqJHGPXkAlpnqgPDXfSLsRYXVYoRGfD6gXJ8WkjCtceQhW3FG7zMzGykogQtxWDgvbTZsz1PlzBR82UZj144ustqmCNf+ZFSwzjKpQil0hiNZmgmAGPn7frwKbDwE6TAqvqfNbpNy1GcP+eNmTn8C+tmKgyGSkqx67w8NgEn9mmPkubZk6Q/cQ/GIVprY27iPQc5irdV+COi6ZWl+WfO6BNRewlsiAYAe1XQwf4wJ5qGFzKNUd9ovWUfgh61ZthIZEVFcTGMmH4cjymnGxpbqiow4di7RQNuCKTRowmrKAWb58KUGEXxy5Nrr9M8SSn5N232iV6HSEWf5QwoKpZ2Zv9BdTXv0Rzx3MO/NWhj2O0UBmCqL1VI/uem9HoC0751GTnMSk36bIVWflJm6fimVvF7OAvZpZgNKBbtJVs=",
+ "signature": "BYPMrU+2vzSOOjSFcRPsWphv0uXQ+Vu6yC7FL6V0iM4WXcAkTK1e5OjkHFqUBNIDxg0AWB14ogUFRGDr+Qh+AqDRaX1u2ST2BhO1mgVh4JaqVOhlnDgWg8NPRMaVqvMy6Rfmyj57D1vmDmbVGQmnaIxEot84mOx4MP6sgZIVOMEe2itlm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tVZBPeHhvQtvOt0iXI\/XUxEWOa2F\r\nK2EqhErgMK\/N07U1JJJay5tYZRtvkGq46oP\/5kQG8hYST0MDK6VihJoPpvCmAm4E\r\npEYKQ96x6A4EH9Y9mZlYozH\/eqmxPbTK8n89\/p7Ydun4rI+B2iiLnY8REWWy6+UQ\r\nV204fGUkJqW5CrKy3P3XvY9X\r\n-----END CERTIFICATE-----"
}';
$this->fileAccessHelper
diff --git a/version.php b/version.php
index 045fa2866b6..d2bb661dba3 100644
--- a/version.php
+++ b/version.php
@@ -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';