diff --git a/src/IDF/Views/Source.php b/src/IDF/Views/Source.php index dc603e5..57c8fab 100644 --- a/src/IDF/Views/Source.php +++ b/src/IDF/Views/Source.php @@ -359,11 +359,11 @@ class IDF_Views_Source * Use /etc/mime.types to find the type. * * @param string Filename/Filepath - * @param string Path to the mime types database ('/etc/mime.types') * @param array Mime type found or 'application/octet-stream', basename, extension */ - public static function getMimeType($file, $src='/etc/mime.types') + public static function getMimeType($file) { + $src= Pluf::f('idf_mimetypes_db', '/etc/mime.types'); $mimes = preg_split("/\015\012|\015|\012/", file_get_contents($src)); $info = pathinfo($file); if (isset($info['extension'])) { diff --git a/src/IDF/conf/idf.php-dist b/src/IDF/conf/idf.php-dist index 78ad9cb..8990c19 100644 --- a/src/IDF/conf/idf.php-dist +++ b/src/IDF/conf/idf.php-dist @@ -175,5 +175,5 @@ $cfg['allowed_scm'] = array('git' => 'IDF_Scm_Git', 'mercurial' => 'IDF_Scm_Mercurial', ); - +$cfg['idf_mimetypes_db'] = '/etc/mime.types'; return $cfg;