r66069 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66068‎ | r66069 | r66070 >
Date:14:01, 8 May 2010
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* (bug 23422) mp3 files can now be moved
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/mime.info (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/mime.info
@@ -27,7 +27,7 @@
2828 application/x-dia-diagram [DRAWING]
2929
3030
31 -audio/mp3 audio/mpeg3 audio/mpeg [AUDIO]
 31+audio/mpeg audio/mp3 audio/mpeg3 [AUDIO]
3232 audio/wav audio/x-wav audio/wave [AUDIO]
3333 audio/midi audio/mid [AUDIO]
3434 audio/basic [AUDIO]
Index: trunk/phase3/RELEASE-NOTES
@@ -155,6 +155,7 @@
156156 new version.
157157 * (bug 23240) Add ID to namespace selector form on Special:Watchlist
158158 * The pipe | character in urls is now escaped.
 159+* (bug 23422) mp3 files can now be moved
159160
160161 === API changes in 1.17 ===
161162 * (bug 22738) Allow filtering by action type on query=logevent

Comments

#Comment by Happy-melon (talk | contribs)   15:00, 15 December 2010

Can you explain why this reshuffle fixes the bug? It seems a very subtle behaviour which should probably be documented somehow.

#Comment by Krinkle (talk | contribs)   00:13, 29 December 2010

+1, This doesn't make sense.

#Comment by IAlex (talk | contribs)   13:54, 29 December 2010

The first item in the list is the "canonical" mime types, others are aliases. When I uploaded an mp3 file on my development wiki, it had its mime type set to "audio/mp3", but mime.types has "audio/mpeg" mime type for mp3 files (line 65 of mime.types), so audio/mp3 has to be changed to "audio/mpeg" to check for a correct extension and not the opposite.

#Comment by Bryan (talk | contribs)   20:09, 29 December 2010

Would anybody mind if I change MimeMagic::getExtensionsForType to search all mime types instead of the canonical type?

#Comment by MarkAHershberger (talk | contribs)   20:21, 14 February 2011

I think making it check for all mime types, not just "canonical" ones, makes sense. But it would be good to check and make sure there are no dupes in mime.info, first. Your fix would probably also fix bug #25523.

Status & tagging log