aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnupam Kumar <kyteinsky@gmail.com>2024-03-15 22:19:43 +0530
committerGitHub <noreply@github.com>2024-03-15 22:19:43 +0530
commit1111c3fafbca80af684456073cad831a0bf0fe89 (patch)
treea2a10ca6a0b8a2f84b19a181f2cc55c5d02a8dd7 /lib
parent4159ba8d8f0afa2a2619181652929da6f0aa068d (diff)
parent8b0d49327a4c8ab95f93dbdbc67f57ea351c7757 (diff)
downloadnextcloud-server-1111c3fafbca80af684456073cad831a0bf0fe89.tar.gz
nextcloud-server-1111c3fafbca80af684456073cad831a0bf0fe89.zip
Merge pull request #41684 from nextcloud/feat/rst-mimetype
feat(mimetypes): Add mimetype for ReStructuredText
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Repair/RepairMimeTypes.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php
index b204c27a9a2..b8254c890a7 100644
--- a/lib/private/Repair/RepairMimeTypes.php
+++ b/lib/private/Repair/RepairMimeTypes.php
@@ -254,6 +254,14 @@ class RepairMimeTypes implements IRepairStep {
return $this->updateMimetypes($updatedMimetypes);
}
+ private function introduceReStructuredTextFormatType() {
+ $updatedMimetypes = [
+ 'rst' => 'text/x-rst',
+ ];
+
+ return $this->updateMimetypes($updatedMimetypes);
+ }
+
/**
* Fix mime types
*/
@@ -322,5 +330,9 @@ class RepairMimeTypes implements IRepairStep {
if (version_compare($ocVersionFromBeforeUpdate, '29.0.0.6', '<') && $this->introduceAacAudioType()) {
$out->info('Fixed aac mime type');
}
+
+ if (version_compare($ocVersionFromBeforeUpdate, '29.0.0.10', '<') && $this->introduceReStructuredTextFormatType()) {
+ $out->info('Fixed ReStructured Text mime type');
+ }
}
}