diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-18 10:15:33 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-18 10:15:33 +0100 |
commit | 9e97bef935775b026410e54f5f1c549544186036 (patch) | |
tree | e11743ecb11d7375d1d1bae240a5671648d4fb12 /apps/files_trashbin | |
parent | 551e553bf4f6cda7c559429cc6f0c40d3eb15d0b (diff) | |
parent | ecdf88e41b898889fe8e05bb9c05415dd6b03a95 (diff) | |
download | nextcloud-server-9e97bef935775b026410e54f5f1c549544186036.tar.gz nextcloud-server-9e97bef935775b026410e54f5f1c549544186036.zip |
Merge pull request #21268 from owncloud/cleanup-OC_Helper-getFileNameMimeType
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, |