X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=blobdiff_plain;f=includes%2Flibs%2FCSSMin.php;h=bba07e263b5c243a1a277b353a803754152c1cbd;hb=f02454b12ca961aee2fa6e9085a0918cd24ce523;hp=b1cece84886b1cf4f956255547440487390adb2b;hpb=1df6b21c90965ec7bb204d6fbab6082cc5805c3a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php index b1cece8488..bba07e263b 100644 --- a/includes/libs/CSSMin.php +++ b/includes/libs/CSSMin.php @@ -176,6 +176,12 @@ class CSSMin { * @return bool|string */ public static function getMimeType( $file ) { + // Infer the MIME-type from the file extension + $ext = strtolower( pathinfo( $file, PATHINFO_EXTENSION ) ); + if ( isset( self::$mimeTypes[$ext] ) ) { + return self::$mimeTypes[$ext]; + } + $realpath = realpath( $file ); if ( $realpath @@ -186,12 +192,6 @@ class CSSMin { return finfo_file( finfo_open( FILEINFO_MIME_TYPE ), $realpath ); } - // Infer the MIME-type from the file extension - $ext = strtolower( pathinfo( $file, PATHINFO_EXTENSION ) ); - if ( isset( self::$mimeTypes[$ext] ) ) { - return self::$mimeTypes[$ext]; - } - return false; }