diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/cache.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php index c25dc92409f..377c9f02253 100644 --- a/apps/files_sharing/lib/cache.php +++ b/apps/files_sharing/lib/cache.php @@ -47,6 +47,7 @@ class Shared_Cache extends Cache { * @param \OC\Files\Storage\Shared $storage */ public function __construct($storage) { + parent::__construct($storage); $this->storage = $storage; } @@ -94,6 +95,7 @@ class Shared_Cache extends Cache { * @return array|false */ public function get($file) { + $mimetypeLoader = \OC::$server->getMimeTypeLoader(); if (is_string($file)) { $cache = $this->getSourceCache($file); if ($cache) { @@ -130,8 +132,8 @@ class Shared_Cache extends Cache { $data['mtime'] = (int)$data['mtime']; $data['storage_mtime'] = (int)$data['storage_mtime']; $data['encrypted'] = (bool)$data['encrypted']; - $data['mimetype'] = $this->getMimetype($data['mimetype']); - $data['mimepart'] = $this->getMimetype($data['mimepart']); + $data['mimetype'] = $mimetypeLoader->getMimetypeById($data['mimetype']); + $data['mimepart'] = $mimetypeLoader->getMimetypeById($data['mimepart']); if ($data['storage_mtime'] === 0) { $data['storage_mtime'] = $data['mtime']; } |