Indefero

Indefero Commit Details


Date:2008-11-26 04:12:25 (16 years 26 days ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:28b650f8416872d39de43abedc3ad47564a70064
Parents: 628b01faf4c59ccbcf55145a297e750ba8d21178
Message:Added the ability to configure the path to the mime types db.

Changes:

File differences

src/IDF/Views/Source.php
359359
360360
361361
362
363362
364363
365
364
366365
366
367367
368368
369369
* 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'])) {
src/IDF/conf/idf.php-dist
175175
176176
177177
178
178
179179
'mercurial' => 'IDF_Scm_Mercurial',
);
$cfg['idf_mimetypes_db'] = '/etc/mime.types';
return $cfg;

Archive Download the corresponding diff file

Page rendered in 0.08592s using 13 queries.