*/
$xml = new XmlTypeCheck( $file );
if( $xml->wellFormed ) {
- global $wgAdditionalXMLTypes;
- $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] ) ) {
- return $types[$xml->rootElement];
- } elseif( isset( $wgAdditionalXMLTypes[$xml->rootElement] ) ) {
- return $wgAdditionalXMLTypes[$xml->rootElement];
+ global $wgXMLMimeTypes;
+ if( isset( $wgXMLMimeTypes[$xml->rootElement] ) ) {
+ return $wgXMLMimeTypes[$xml->rootElement];
} else {
return 'application/xml';
}