aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Repair/RepairMimeTypes.php
diff options
context:
space:
mode:
authorThomas Ebert <thomas.ebert@usability.de>2017-08-31 16:20:21 +0200
committerThomas Ebert <thomas.ebert@usability.de>2017-08-31 16:53:07 +0200
commit93d539b0cf06249545bed413a71ffb50dfdcfb87 (patch)
tree38f929b43a73cd1cc468fe0e9889bb4c2ba95f26 /lib/private/Repair/RepairMimeTypes.php
parent84ea66dca8593a967d0114a7d0206260263f61f9 (diff)
downloadnextcloud-server-93d539b0cf06249545bed413a71ffb50dfdcfb87.tar.gz
nextcloud-server-93d539b0cf06249545bed413a71ffb50dfdcfb87.zip
Add mimetype support for .URL (Windows) and .webloc (macOS) files. Update places/link svg. Add filetype/link icon. Add repair step for mime types.
Signed-off-by: Thomas Ebert <thomas.ebert@te-online.net>
Diffstat (limited to 'lib/private/Repair/RepairMimeTypes.php')
-rw-r--r--lib/private/Repair/RepairMimeTypes.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php
index 0bf35c1d2ae..74d81be9834 100644
--- a/lib/private/Repair/RepairMimeTypes.php
+++ b/lib/private/Repair/RepairMimeTypes.php
@@ -100,7 +100,7 @@ class RepairMimeTypes implements IRepairStep {
// insert mimetype
\OC_DB::executeAudited(self::insertStmt(), array($mimetype));
}
-
+
// get target mimetype id
$result = \OC_DB::executeAudited(self::getIdStmt(), array($mimetype));
$mimetypeId = $result->fetchOne();
@@ -140,6 +140,15 @@ class RepairMimeTypes implements IRepairStep {
$this->updateMimetypes($updatedMimetypes);
}
+ private function introduceInternetShortcutTypes() {
+ $updatedMimetypes = [
+ 'url' => 'application/internet-shortcut',
+ 'webloc' => 'application/internet-shortcut'
+ ];
+
+ $this->updateMimetypes($updatedMimetypes);
+ }
+
/**
* Fix mime types
*/
@@ -161,5 +170,9 @@ class RepairMimeTypes implements IRepairStep {
if (version_compare($ocVersionFromBeforeUpdate, '13.0.0.0', '<') && $this->introduceLocationTypes()) {
$out->info('Fixed geospatial mime types');
}
+
+ if (version_compare($ocVersionFromBeforeUpdate, '13.0.0.3', '<') && $this->introduceInternetShortcutTypes()) {
+ $out->info('Fixed internet-shortcut mime types');
+ }
}
}