From: Bryan Tong Minh Date: Fri, 7 Jan 2011 19:41:38 +0000 (+0000) Subject: Document how the mime<->extension map is supposed to work, to my best understanding... X-Git-Tag: 1.31.0-rc.0~32714 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=347dbed5a420c61a93ac8e10c1d8950c857307ab;p=lhc%2Fweb%2Fwiklou.git Document how the mime<->extension map is supposed to work, to my best understanding from reading the code. Fixed the built-in mini-mime.types according to this specification. Should fix bug 26367. --- diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php index 7d7fedd06a..018f601df3 100644 --- a/includes/MimeMagic.php +++ b/includes/MimeMagic.php @@ -10,6 +10,19 @@ * This is used as a fallback to mime.types files. * An extensive list of well known mime types is provided by * the file mime.types in the includes directory. + * + * This list concatenated with mime.types is used to create a mime <-> ext + * map. Each line contains a mime type followed by a space separated list of + * extensions. If multiple extensions for a single mime type exist or if + * multiple mime types exist for a single extension then in most cases + * MediaWiki assumes that the first extension following the mime type is the + * canonical extension, and the first time a mime type appears for a certain + * extension is considered the canonical mime type. + * + * (Note that appending $wgMimeTypeFile to the end of MM_WELL_KNOWN_MIME_TYPES + * sucks because you can't redefine canonical types. This could be fixed by + * appending MM_WELL_KNOWN_MIME_TYPES behind $wgMimeTypeFile, but who knows + * what will break? In practice this probably isn't a problem anyway -- Bryan) */ define('MM_WELL_KNOWN_MIME_TYPES',<<