diff options
Diffstat (limited to 'lib/private')
-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'); + } } } |