* the file mime.types in the includes directory.
*/
define('MM_WELL_KNOWN_MIME_TYPES',<<<END_STRING
-application/ogg ogg ogm
+application/ogg ogg ogm ogv
application/pdf pdf
application/x-javascript js
application/x-shockwave-flash swf
image/x-xcf xcf
text/plain txt
text/html html htm
-video/ogg ogm ogg
+video/ogg ogm ogg ogv
video/mpeg mpg mpeg
END_STRING
);
'xbm',
// Formats we recognize magic numbers for
- 'djvu', 'ogg', 'mid', 'pdf', 'wmf', 'xcf',
+ 'djvu', 'ogg', 'ogv', 'mid', 'pdf', 'wmf', 'xcf',
// XML formats we sure hope we recognize reliably
'svg',
*/
$xml = new XmlTypeCheck( $file );
if( $xml->wellFormed ) {
- $types = array(
- 'http://www.w3.org/2000/svg:svg' => 'image/svg+xml',
- 'svg' => 'image/svg+xml',
- 'http://www.lysator.liu.se/~alla/dia/:diagram' => 'application/x-dia-diagram',
- 'http://www.w3.org/1999/xhtml:html' => 'text/html', // application/xhtml+xml?
- 'html' => 'text/html', // application/xhtml+xml?
- );
- if( isset( $types[$xml->rootElement] ) ) {
- $mime = $types[$xml->rootElement];
- return $mime;
+ global $wgXMLMimeTypes;
+ if( isset( $wgXMLMimeTypes[$xml->rootElement] ) ) {
+ return $wgXMLMimeTypes[$xml->rootElement];
} else {
- /// Fixme -- this would be the place to allow additional XML type checks
return 'application/xml';
}
}