From 6538302daaf83e5befa778d7a9b580043a6d6e6b Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 14 Jun 2017 00:26:01 +0200 Subject: add gpx mimetype Signed-off-by: Arthur Schiwon --- resources/config/mimetypealiases.dist.json | 1 + resources/config/mimetypemapping.dist.json | 1 + 2 files changed, 2 insertions(+) diff --git a/resources/config/mimetypealiases.dist.json b/resources/config/mimetypealiases.dist.json index 602f70393ae..fef62ebebdb 100644 --- a/resources/config/mimetypealiases.dist.json +++ b/resources/config/mimetypealiases.dist.json @@ -12,6 +12,7 @@ "application/epub+zip": "text", "application/font-sfnt": "image", "application/font-woff": "image", + "application/gpx+xml": "location", "application/illustrator": "image", "application/javascript": "text/code", "application/json": "text/code", diff --git a/resources/config/mimetypemapping.dist.json b/resources/config/mimetypemapping.dist.json index 09be65dd86f..e06631a9ad8 100644 --- a/resources/config/mimetypemapping.dist.json +++ b/resources/config/mimetypemapping.dist.json @@ -58,6 +58,7 @@ "flac": ["audio/flac"], "flv": ["video/x-flv"], "gif": ["image/gif"], + "gpx": ["application/gpx+xml"], "gz": ["application/x-gzip"], "gzip": ["application/x-gzip"], "h": ["text/x-h"], -- cgit v1.2.3 From addcda9325b74a2c4462b1c5581aaff993bf35b6 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 14 Jun 2017 10:48:56 +0200 Subject: add geospatial mime types repair step Signed-off-by: Arthur Schiwon --- lib/private/Repair/RepairMimeTypes.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index d60b507e932..c384241b5ff 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -129,6 +129,14 @@ class RepairMimeTypes implements IRepairStep { $this->updateMimetypes($updatedMimetypes); } + private function introduceLocationTypes() { + $updatedMimetypes = [ + 'gpx' => 'application/gpx+xml' + ]; + + $this->updateMimetypes($updatedMimetypes); + } + /** * Fix mime types */ @@ -146,5 +154,9 @@ class RepairMimeTypes implements IRepairStep { if (version_compare($ocVersionFromBeforeUpdate, '12.0.0.13', '<') && $this->introduceWindowsProgramTypes()) { $out->info('Fixed windows program mime types'); } + + if (version_compare($ocVersionFromBeforeUpdate, '13.0.0.0', '<') && $this->introduceLocationTypes()) { + $out->info('Fixed geospatial mime types'); + } } } -- cgit v1.2.3 From c1d9565131e1dbc4b4928fc18d0b15ff9d1137a5 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 14 Jun 2017 11:02:05 +0200 Subject: added kml, kmz, tcx types as well while at it Signed-off-by: Arthur Schiwon --- lib/private/Repair/RepairMimeTypes.php | 5 ++++- resources/config/mimetypealiases.dist.json | 3 +++ resources/config/mimetypemapping.dist.json | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index c384241b5ff..0bf35c1d2ae 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -131,7 +131,10 @@ class RepairMimeTypes implements IRepairStep { private function introduceLocationTypes() { $updatedMimetypes = [ - 'gpx' => 'application/gpx+xml' + 'gpx' => 'application/gpx+xml', + 'kml' => 'application/vnd.google-earth.kml+xml', + 'kmz' => 'application/vnd.google-earth.kmz', + 'tcx' => 'application/vnd.garmin.tcx+xml', ]; $this->updateMimetypes($updatedMimetypes); diff --git a/resources/config/mimetypealiases.dist.json b/resources/config/mimetypealiases.dist.json index fef62ebebdb..daf75453dc8 100644 --- a/resources/config/mimetypealiases.dist.json +++ b/resources/config/mimetypealiases.dist.json @@ -26,6 +26,9 @@ "application/rss+xml": "application/xml", "application/vnd.android.package-archive": "package/x-generic", "application/vnd.lotus-wordpro": "x-office/document", + "application/vnd.garmin.tcx+xml": "location", + "application/vnd.google-earth.kml+xml": "location", + "application/vnd.google-earth.kmz": "location", "application/vnd.ms-excel": "x-office/spreadsheet", "application/vnd.ms-excel.addin.macroEnabled.12": "x-office/spreadsheet", "application/vnd.ms-excel.sheet.binary.macroEnabled.12": "x-office/spreadsheet", diff --git a/resources/config/mimetypemapping.dist.json b/resources/config/mimetypemapping.dist.json index e06631a9ad8..ae90a138a42 100644 --- a/resources/config/mimetypemapping.dist.json +++ b/resources/config/mimetypemapping.dist.json @@ -82,6 +82,8 @@ "kdc": ["image/x-dcraw"], "key": ["application/x-iwork-keynote-sffkey"], "keynote": ["application/x-iwork-keynote-sffkey"], + "kml": ["application/vnd.google-earth.kml+xml"], + "kmz": ["application/vnd.google-earth.kmz"], "kra": ["application/x-krita"], "ldif": ["text/x-ldif"], "lwp": ["application/vnd.lotus-wordpro"], @@ -160,6 +162,7 @@ "tar.bz2": ["application/x-bzip2"], "tar.gz": ["application/x-compressed"], "tbz2": ["application/x-bzip2"], + "tcx": ["application/vnd.garmin.tcx+xml"], "tex": ["application/x-tex"], "tgz": ["application/x-compressed"], "tiff": ["image/tiff"], -- cgit v1.2.3 From 4d692b69666e7fb74d18ec35365583a023106533 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 14 Jun 2017 11:46:00 +0200 Subject: add location filetype icon Signed-off-by: Arthur Schiwon --- core/img/filetypes/location.svg | 2 ++ core/js/mimetypelist.js | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 core/img/filetypes/location.svg diff --git a/core/img/filetypes/location.svg b/core/img/filetypes/location.svg new file mode 100644 index 00000000000..737b1dd662a --- /dev/null +++ b/core/img/filetypes/location.svg @@ -0,0 +1,2 @@ + + diff --git a/core/js/mimetypelist.js b/core/js/mimetypelist.js index 89558e21086..07ae0efee0a 100644 --- a/core/js/mimetypelist.js +++ b/core/js/mimetypelist.js @@ -12,6 +12,7 @@ OC.MimeTypeList={ "application/epub+zip": "text", "application/font-sfnt": "image", "application/font-woff": "image", + "application/gpx+xml": "location", "application/illustrator": "image", "application/javascript": "text/code", "application/json": "text/code", @@ -25,6 +26,9 @@ OC.MimeTypeList={ "application/rss+xml": "application/xml", "application/vnd.android.package-archive": "package/x-generic", "application/vnd.lotus-wordpro": "x-office/document", + "application/vnd.garmin.tcx+xml": "location", + "application/vnd.google-earth.kml+xml": "location", + "application/vnd.google-earth.kmz": "location", "application/vnd.ms-excel": "x-office/spreadsheet", "application/vnd.ms-excel.addin.macroEnabled.12": "x-office/spreadsheet", "application/vnd.ms-excel.sheet.binary.macroEnabled.12": "x-office/spreadsheet", @@ -104,6 +108,7 @@ OC.MimeTypeList={ "folder-shared", "folder-starred", "image", + "location", "package-x-generic", "text", "text-calendar", -- cgit v1.2.3 From 0f92a2c6fdce9130433d54f62725abfc6d692e9d Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 14 Jun 2017 11:47:44 +0200 Subject: bycatch, x-ldif entry was missing Signed-off-by: Arthur Schiwon --- core/js/mimetypelist.js | 2 +- resources/config/mimetypealiases.dist.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/js/mimetypelist.js b/core/js/mimetypelist.js index 07ae0efee0a..b0104b50bef 100644 --- a/core/js/mimetypelist.js +++ b/core/js/mimetypelist.js @@ -90,8 +90,8 @@ OC.MimeTypeList={ "text/x-c": "text/code", "text/x-c++src": "text/code", "text/x-h": "text/code", - "text/x-ldif": "text/code", "text/x-java-source": "text/code", + "text/x-ldif": "text/code", "text/x-python": "text/code", "text/x-shellscript": "text/code", "web": "text/code" diff --git a/resources/config/mimetypealiases.dist.json b/resources/config/mimetypealiases.dist.json index daf75453dc8..2c2ea28059c 100644 --- a/resources/config/mimetypealiases.dist.json +++ b/resources/config/mimetypealiases.dist.json @@ -91,6 +91,7 @@ "text/x-c++src": "text/code", "text/x-h": "text/code", "text/x-java-source": "text/code", + "text/x-ldif": "text/code", "text/x-python": "text/code", "text/x-shellscript": "text/code", "web": "text/code" -- cgit v1.2.3