From 6d0c8ea7e4c15e2a4072e0951eac3c0f64b2fbdc Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 29 Jul 2011 01:36:31 +0200 Subject: use proper file icons for image and audio files --- lib/helper.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') 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"; } -- cgit v1.2.3