diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-12-17 17:07:48 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-12-17 17:07:48 +0100 |
commit | ecdf88e41b898889fe8e05bb9c05415dd6b03a95 (patch) | |
tree | 735f9198dad871e9dd6459f4ccd5dc986937c594 /apps/files_trashbin | |
parent | 3818a055b96a528263585b93f598fb479b5a1ec4 (diff) | |
download | nextcloud-server-ecdf88e41b898889fe8e05bb9c05415dd6b03a95.tar.gz nextcloud-server-ecdf88e41b898889fe8e05bb9c05415dd6b03a95.zip |
Use proper public API for OC_Helper::getFileNameMimeType
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r-- | apps/files_trashbin/ajax/preview.php | 2 | ||||
-rw-r--r-- | apps/files_trashbin/lib/helper.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_trashbin/ajax/preview.php b/apps/files_trashbin/ajax/preview.php index 49d6d93f574..ecb4971253f 100644 --- a/apps/files_trashbin/ajax/preview.php +++ b/apps/files_trashbin/ajax/preview.php @@ -62,7 +62,7 @@ try{ $fileName = substr($fileName, 0, $i); } } - $mimetype = \OC_Helper::getFileNameMimeType($fileName); + $mimetype = \OC::$server->getMimeTypeDetector()->detectPath($fileName); } $preview->setMimetype($mimetype); $preview->setMaxX($maxX); diff --git a/apps/files_trashbin/lib/helper.php b/apps/files_trashbin/lib/helper.php index d14e97285c5..0ccf15cd2bc 100644 --- a/apps/files_trashbin/lib/helper.php +++ b/apps/files_trashbin/lib/helper.php @@ -87,7 +87,7 @@ class Helper $i = array( 'name' => $id, 'mtime' => $timestamp, - 'mimetype' => $view->is_dir($dir . '/' . $entryName) ? 'httpd/unix-directory' : \OC_Helper::getFileNameMimeType($id), + 'mimetype' => $view->is_dir($dir . '/' . $entryName) ? 'httpd/unix-directory' : \OC::$server->getMimeTypeDetector()->detectPath($id), 'type' => $view->is_dir($dir . '/' . $entryName) ? 'dir' : 'file', 'directory' => ($dir === '/') ? '' : $dir, 'size' => $size, |