diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-09-04 11:55:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-04 11:55:05 +0200 |
commit | e33aa460f1d2fabc25b38d1de6a748c437717761 (patch) | |
tree | be30743814c2b9ca94437fe9f2bd7b40a9633c29 /lib | |
parent | d21713d52627a267881b8a426aa613d3ac2d14d9 (diff) | |
parent | 93d539b0cf06249545bed413a71ffb50dfdcfb87 (diff) | |
download | nextcloud-server-e33aa460f1d2fabc25b38d1de6a748c437717761.tar.gz nextcloud-server-e33aa460f1d2fabc25b38d1de6a748c437717761.zip |
Merge pull request #6297 from te-online/add-mimetype-internet-shortcut
Add mimetype application/internet-shortcut for .url files
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Repair/RepairMimeTypes.php | 15 |
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'); + } } } |