(bug 7554) The correct MIME type for SVG images is now displayed on the image page (image/svg+xml, not image/svg). This is a hack because it only affects display, and doesn't correct the internal storage. I don't know how the latter works, so I wasn't confident touching it.

This commit is contained in:
Aryeh Gregor 2006-11-22 00:25:57 +00:00
parent 846cecd91e
commit 2b109a6dc4
2 changed files with 11 additions and 3 deletions

View file

@ -203,9 +203,11 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
* (bug 7970) Use current connection explicitly on Database::getServerVersion
* (bug 2001) Tables with class="sortable" can now be dynamically sorted via
JavaScript.
* Added autosummary for new pages with 500 or less characters, and refactor
the autosummary code so it's all done in one function. doEdit is getting too
* Added autosummary for new pages with 500 or less characters, and refactor
the autosummary code so it's all done in one function. doEdit is getting too
big!
* (bug 7554) The correct MIME type for SVG images is now displayed on the
image page (image/svg+xml, not image/svg).
== Languages updated ==

View file

@ -300,9 +300,15 @@ class ImagePage extends Article {
if ($showLink) {
$filename = wfEscapeWikiText( $this->img->getName() );
// Hacky workaround: for some reason we use the incorrect MIME type
// image/svg for SVG. This should be fixed internally, but at least
// make the displayed type right.
$mime = $this->img->getMimeType();
if ($mime == 'image/svg') $mime = 'image/svg+xml';
$info = wfMsg( 'fileinfo',
ceil($this->img->getSize()/1024.0),
$this->img->getMimeType() );
$mime );
global $wgContLang;
$dirmark = $wgContLang->getDirMark();