summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-07-11 09:21:29 +0200
committerGitHub <noreply@github.com>2018-07-11 09:21:29 +0200
commitaf20f1dd4b3637f514837df6a2e1c683b7ef775b (patch)
treea89ac2c7d68e7018ebb942311139f8b8762cfaea /lib
parent029219a9e7778a95f4c627ec0bc24dae9c7881a2 (diff)
parent0fe115a536c496afe91f5908a50b3fd473d2ba01 (diff)
downloadnextcloud-server-af20f1dd4b3637f514837df6a2e1c683b7ef775b.tar.gz
nextcloud-server-af20f1dd4b3637f514837df6a2e1c683b7ef775b.zip
Merge pull request #10125 from nextcloud/feature/9496/comic_mimetypes
Add comicbook mimetypes
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Repair/RepairMimeTypes.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php
index 93104ce34e1..9df11231e7a 100644
--- a/lib/private/Repair/RepairMimeTypes.php
+++ b/lib/private/Repair/RepairMimeTypes.php
@@ -175,6 +175,19 @@ class RepairMimeTypes implements IRepairStep {
return $this->updateMimetypes($updatedMimetypes);
}
+ private function introduceComicbookTypes() {
+ $updatedMimetypes = [
+ 'cb7' => 'application/comicbook+7z',
+ 'cba' => 'application/comicbook+ace',
+ 'cbr' => 'application/comicbook+rar',
+ 'cbt' => 'application/comicbook+tar',
+ 'cbtc' => 'application/comicbook+truecrypt',
+ 'cbz' => 'application/comicbook+zip',
+ ];
+
+ return $this->updateMimetypes($updatedMimetypes);
+ }
+
/**
* Fix mime types
*/
@@ -208,5 +221,9 @@ class RepairMimeTypes implements IRepairStep {
if (version_compare($ocVersionFromBeforeUpdate, '14.0.0.8', '<') && $this->introduceVisioTypes()) {
$out->info('Fixed visio mime types');
}
+
+ if (version_compare($ocVersionFromBeforeUpdate, '14.0.0.10', '<') && $this->introduceComicbookTypes()) {
+ $out->info('Fixed comicbook mime types');
+ }
}
}