diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-07-15 10:04:34 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-07-27 14:59:49 +0200 |
commit | 9cdd637050a3a60ff58f78fff84088adce37051e (patch) | |
tree | 686ef9cd3fb1b68268294bc6906685cb5863e4c4 /lib/private/server.php | |
parent | 141a0f0f476a6675c0db9044afc7447342197f45 (diff) | |
download | nextcloud-server-9cdd637050a3a60ff58f78fff84088adce37051e.tar.gz nextcloud-server-9cdd637050a3a60ff58f78fff84088adce37051e.zip |
Loading of mapping/aliases is done in class
Diffstat (limited to 'lib/private/server.php')
-rw-r--r-- | lib/private/server.php | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/private/server.php b/lib/private/server.php index b835fbd4cbf..82b2d6765dc 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -445,19 +445,7 @@ class Server extends SimpleContainer implements IServerContainer { return new \OC\Files\Mount\Manager(); }); $this->registerService('MimeTypeDetector', function(Server $c) { - $mimeTypeDetector = new \OC\Files\Type\Detection($c->getURLGenerator()); - $dist = file_get_contents(\OC::$configDir . '/mimetypemapping.dist.json'); - $mimetypemapping = get_object_vars(json_decode($dist)); - - //Check if need to load custom mappings - if (file_exists(\OC::$configDir . '/mimetypemapping.json')) { - $custom = file_get_contents(\OC::$configDir . '/mimetypemapping.json'); - $custom_mapping = get_object_vars(json_decode($custom)); - $mimetypemapping = array_merge($mimetypemapping, $custom_mapping); - } - - $mimeTypeDetector->registerTypeArray($mimetypemapping); - return $mimeTypeDetector; + return new \OC\Files\Type\Detection($c->getURLGenerator()); }); } |