Add repair steps for new image mime types

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2017-04-25 18:56:23 +02:00
parent eb7e4d48c9
commit c9e08a6445
1 changed files with 13 additions and 0 deletions

View File

@ -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');
}