summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Douma <rullzer@users.noreply.github.com>2015-09-06 16:56:35 +0200
committerRoeland Douma <rullzer@users.noreply.github.com>2015-09-06 16:56:35 +0200
commit24f5f50b20c4f49bcd602a3c322f2ee2deb0f95b (patch)
treeb5ba1876566dfa1cc39341e8f58e419bc137d722 /apps
parent3642fb701a7fc0caba779de9f5d53bf12c27f5aa (diff)
parentc6314fc699c7316973fa79f75b7d585e620323e9 (diff)
downloadnextcloud-server-24f5f50b20c4f49bcd602a3c322f2ee2deb0f95b.tar.gz
nextcloud-server-24f5f50b20c4f49bcd602a3c322f2ee2deb0f95b.zip
Merge pull request #18742 from owncloud/mimetype-updatedb
Introduce mimetype DB update occ command
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/cache.php6
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'];
}