diff options
author | Stefan Weil <sw@weilnetz.de> | 2017-04-25 18:56:23 +0200 |
---|---|---|
committer | Stefan Weil <sw@weilnetz.de> | 2017-04-25 18:56:23 +0200 |
commit | c9e08a6445b50259d4450b65cf4ddb1515f762f2 (patch) | |
tree | e45f545ffb6b15d7a987749139dcd07163848b64 /lib | |
parent | eb7e4d48c9f016575863ab4449ccf45ac31fa3a4 (diff) | |
download | nextcloud-server-c9e08a6445b50259d4450b65cf4ddb1515f762f2.tar.gz nextcloud-server-c9e08a6445b50259d4450b65cf4ddb1515f762f2.zip |
Add repair steps for new image mime types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Repair/RepairMimeTypes.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index 534b5ce2c28..d60b507e932 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -110,6 +110,15 @@ class RepairMimeTypes implements IRepairStep { } } + private function introduceImageTypes() { + $updatedMimetypes = array( + 'jp2' => 'image/jp2', + 'webp' => 'image/webp', + ); + + $this->updateMimetypes($updatedMimetypes); + } + private function introduceWindowsProgramTypes() { $updatedMimetypes = array( 'htaccess' => 'text/plain', @@ -130,6 +139,10 @@ class RepairMimeTypes implements IRepairStep { // NOTE TO DEVELOPERS: when adding new mime types, please make sure to // add a version comparison to avoid doing it every time + if (version_compare($ocVersionFromBeforeUpdate, '12.0.0.14', '<') && $this->introduceImageTypes()) { + $out->info('Fixed image mime types'); + } + if (version_compare($ocVersionFromBeforeUpdate, '12.0.0.13', '<') && $this->introduceWindowsProgramTypes()) { $out->info('Fixed windows program mime types'); } |