diff options
author | Robin McCorkell <rmccorkell@owncloud.com> | 2015-09-03 19:48:42 +0100 |
---|---|---|
committer | Robin McCorkell <rmccorkell@owncloud.com> | 2015-09-04 17:28:20 +0100 |
commit | cdf01f04194a9de30e4247338a5b2675cb1c3ece (patch) | |
tree | 84a76c014b069b3e68f4b4983d7a2a9cd2a8e772 /apps | |
parent | 79fceeff338d262828cc977839b171999da0a7eb (diff) | |
download | nextcloud-server-cdf01f04194a9de30e4247338a5b2675cb1c3ece.tar.gz nextcloud-server-cdf01f04194a9de30e4247338a5b2675cb1c3ece.zip |
Split mimetype handling to new class
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']; } |