diff options
Diffstat (limited to 'lib/private/Repair/RepairMimeTypes.php')
-rw-r--r-- | lib/private/Repair/RepairMimeTypes.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index 715f7623440..3c9720b9e91 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -338,6 +338,21 @@ class RepairMimeTypes implements IRepairStep { } /** + * @throws Exception + * @since 32.0.0 + */ + private function introduceMusicxmlType(): IResult|int|null { + $updatedMimetypes = [ + 'mxl' => 'application/vnd.recordare.musicxml', + 'musicxml' => 'application/vnd.recordare.musicxml+xml', + ]; + + return $this->updateMimetypes($updatedMimetypes); + } + + + + /** * Check if there are any migrations available * * @throws Exception @@ -447,6 +462,10 @@ class RepairMimeTypes implements IRepairStep { $out->info('Fixed zst mime type'); } + if (version_compare($mimeTypeVersion, '32.0.0.0', '<') && $this->introduceMusicxmlType()) { + $out->info('Fixed musicxml mime type'); + } + if (!$this->dryRun) { $this->appConfig->setValueString('files', 'mimetype_version', $serverVersion); } |