Index: trunk/phase3/includes/MimeMagic.php |
— | — | @@ -10,6 +10,19 @@ |
11 | 11 | * This is used as a fallback to mime.types files. |
12 | 12 | * An extensive list of well known mime types is provided by |
13 | 13 | * the file mime.types in the includes directory. |
| 14 | + * |
| 15 | + * This list concatenated with mime.types is used to create a mime <-> ext |
| 16 | + * map. Each line contains a mime type followed by a space separated list of |
| 17 | + * extensions. If multiple extensions for a single mime type exist or if |
| 18 | + * multiple mime types exist for a single extension then in most cases |
| 19 | + * MediaWiki assumes that the first extension following the mime type is the |
| 20 | + * canonical extension, and the first time a mime type appears for a certain |
| 21 | + * extension is considered the canonical mime type. |
| 22 | + * |
| 23 | + * (Note that appending $wgMimeTypeFile to the end of MM_WELL_KNOWN_MIME_TYPES |
| 24 | + * sucks because you can't redefine canonical types. This could be fixed by |
| 25 | + * appending MM_WELL_KNOWN_MIME_TYPES behind $wgMimeTypeFile, but who knows |
| 26 | + * what will break? In practice this probably isn't a problem anyway -- Bryan) |
14 | 27 | */ |
15 | 28 | define('MM_WELL_KNOWN_MIME_TYPES',<<<END_STRING |
16 | 29 | application/ogg ogx ogg ogm ogv oga spx |
— | — | @@ -41,9 +54,12 @@ |
42 | 55 | image/gif gif |
43 | 56 | image/jpeg jpeg jpg jpe |
44 | 57 | image/png png |
45 | | -image/svg+xml image/svg svg |
| 58 | +image/svg+xml svg |
| 59 | +image/svg svg |
46 | 60 | image/tiff tiff tif |
47 | | -image/vnd.djvu image/x.djvu image/x-djvu djvu |
| 61 | +image/vnd.djvu djvu |
| 62 | +image/x.djvu djvu |
| 63 | +image/x-djvu djvu |
48 | 64 | image/x-portable-pixmap ppm |
49 | 65 | image/x-xcf xcf |
50 | 66 | text/plain txt |