diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-02-19 14:47:29 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-02-19 14:47:29 +0100 |
commit | 609a91a9b1bbee423a6bda2420dc4010b46757f6 (patch) | |
tree | 9def1e0df939d6015b2e4cbe4db5bcde9e907fbc /apps/files/lib | |
parent | f9d4780d27ca21d86d8dacf73eda52a73a479d61 (diff) | |
download | nextcloud-server-609a91a9b1bbee423a6bda2420dc4010b46757f6.tar.gz nextcloud-server-609a91a9b1bbee423a6bda2420dc4010b46757f6.zip |
Show svg mime icons when no preview is available
Diffstat (limited to 'apps/files/lib')
-rw-r--r-- | apps/files/lib/helper.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php index ac8a2ad3200..fec1297b180 100644 --- a/apps/files/lib/helper.php +++ b/apps/files/lib/helper.php @@ -36,14 +36,16 @@ class Helper } } } - return \OC_Helper::mimetypeIcon('dir'); + $icon = \OC_Helper::mimetypeIcon('dir'); + }else{ + if($file['isPreviewAvailable']) { + $pathForPreview = $file['directory'] . '/' . $file['name']; + return \OC_Helper::previewIcon($pathForPreview) . '&c=' . $file['etag']; + } + $icon = \OC_Helper::mimetypeIcon($file['mimetype']); } - if($file['isPreviewAvailable']) { - $pathForPreview = $file['directory'] . '/' . $file['name']; - return \OC_Helper::previewIcon($pathForPreview) . '&c=' . $file['etag']; - } - return \OC_Helper::mimetypeIcon($file['mimetype']); + return substr($icon, 0, -3) . 'svg'; } /** |