aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Repair/RepairMimeTypes.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-07-10 21:27:35 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-07-10 21:27:35 +0200
commit0fe115a536c496afe91f5908a50b3fd473d2ba01 (patch)
tree29afa78eb421ab0cf67fb4be915c673c6b0985e1 /lib/private/Repair/RepairMimeTypes.php
parent489103eede395b5a89e2241032a9d0cc2eb7b73e (diff)
downloadnextcloud-server-0fe115a536c496afe91f5908a50b3fd473d2ba01.tar.gz
nextcloud-server-0fe115a536c496afe91f5908a50b3fd473d2ba01.zip
Add repair step
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Repair/RepairMimeTypes.php')
-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');
+ }
}
}