diff options
author | Olivier Paroz <github@oparoz.com> | 2015-04-02 21:37:57 +0200 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-04-02 21:37:57 +0200 |
commit | 70ec74e88b0b1b73fd0a60116864f9d81f382b15 (patch) | |
tree | 7faf73eeff919a9ade1e43f67fd9c4837b09d1b3 /lib/repair | |
parent | fa079a5959f1c67b1b6bd7b9d4aa98763b817394 (diff) | |
download | nextcloud-server-70ec74e88b0b1b73fd0a60116864f9d81f382b15.tar.gz nextcloud-server-70ec74e88b0b1b73fd0a60116864f9d81f382b15.zip |
Introducing media types for yml, yaml, cnf, conf
Diffstat (limited to 'lib/repair')
-rw-r--r-- | lib/repair/repairmimetypes.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/repair/repairmimetypes.php b/lib/repair/repairmimetypes.php index 3d39507b998..1b36894eed8 100644 --- a/lib/repair/repairmimetypes.php +++ b/lib/repair/repairmimetypes.php @@ -218,6 +218,24 @@ class RepairMimeTypes extends BasicEmitter implements \OC\RepairStep { self::updateMimetypes($updatedMimetypes); } + private function introduceConfMimeType() { + $updatedMimetypes = array( + 'conf' => 'text/plain', + 'cnf' => 'text/plain', + ); + + self::updateMimetypes($updatedMimetypes); + } + + private function introduceYamlMimeType() { + $updatedMimetypes = array( + 'yaml' => 'application/yaml', + 'yml' => 'application/yaml', + ); + + self::updateMimetypes($updatedMimetypes); + } + /** * Fix mime types */ @@ -245,5 +263,13 @@ class RepairMimeTypes extends BasicEmitter implements \OC\RepairStep { if ($this->introduce3dImagesMimeType()) { $this->emit('\OC\Repair', 'info', array('Fixed 3D images mime types')); } + + if ($this->introduceConfMimeType()) { + $this->emit('\OC\Repair', 'info', array('Fixed Conf/cnf mime types')); + } + + if ($this->introduceYamlMimeType()) { + $this->emit('\OC\Repair', 'info', array('Fixed Yaml/Yml mime types')); + } } } |