diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-07-29 01:36:31 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-07-29 01:37:08 +0200 |
commit | 6d0c8ea7e4c15e2a4072e0951eac3c0f64b2fbdc (patch) | |
tree | 5d412befba3f056821ce74ef0b4293b0b4fc8b3d /lib | |
parent | dbcebba8826be76eca141a28c29b4dd8d051291f (diff) | |
download | nextcloud-server-6d0c8ea7e4c15e2a4072e0951eac3c0f64b2fbdc.tar.gz nextcloud-server-6d0c8ea7e4c15e2a4072e0951eac3c0f64b2fbdc.zip |
use proper file icons for image and audio files
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/helper.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php index 1fbcc589d10..ffb25877433 100755 --- a/lib/helper.php +++ b/lib/helper.php @@ -110,6 +110,11 @@ class OC_HELPER { if( file_exists( "$SERVERROOT/core/img/mimetypes/$mimetype.png" )){ return "$WEBROOT/core/img/mimetypes/$mimetype.png"; } + //try only the first part of the mimetype + $mimetype=substr($mimetype,0,strpos($mimetype,'-')); + if( file_exists( "$SERVERROOT/core/img/mimetypes/$mimetype.png" )){ + return "$WEBROOT/core/img/mimetypes/$mimetype.png"; + } else{ return "$WEBROOT/core/img/mimetypes/file.png"; } |