Add repair steps for new image mime types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
eb7e4d48c9
commit
c9e08a6445
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue