aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2015-07-08 19:09:10 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2015-07-10 10:17:49 +0200
commit032ffc969eeed452091646e35c31003297186b41 (patch)
tree2a22783ae512a2fe00b33e5d992c0da001f9ae04 /lib
parent87f3500fda04f76d97754185a71f285e9770c66c (diff)
downloadnextcloud-server-032ffc969eeed452091646e35c31003297186b41.tar.gz
nextcloud-server-032ffc969eeed452091646e35c31003297186b41.zip
Move mimetypealiases.json to mimetypealiases.dist.json
Diffstat (limited to 'lib')
-rw-r--r--lib/private/helper.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php
index a40b9a23202..825166b58a1 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -188,8 +188,13 @@ class OC_Helper {
// On first access load the list of mimetype aliases
if (empty(self::$mimeTypeAlias)) {
- $file = file_get_contents(OC::$SERVERROOT . '/config/mimetypealiases.json');
+ $file = file_get_contents(OC::$SERVERROOT . '/config/mimetypealiases.dist.json');
self::$mimeTypeAlias = get_object_vars(json_decode($file));
+
+ if (file_exists(\OC::$SERVERROOT . '/config/mimetypealiases.json')) {
+ $custom = get_object_vars(json_decode(file_get_contents(\OC::$SERVERROOT . '/config/mimetypealiases.json')));
+ self::$mimeTypeAlias = array_merge(self::$mimeTypeAlias, $custom);
+ }
}
if (isset(self::$mimeTypeAlias[$mimetype])) {