This is a folloup to bug #3641: brion fixed my fix by requiring a matching mime
type only for types that are known to be recognized. How to determine which
types that are was left open. This patch adresses that caveat:
- The types recognized by PHPs GD library are always considered to be recognizable
- if an external command is used to determine the mime type via
$wgMimeDetectorCommand, the system's standard magic.mime file is parsed for
additional types. where that file can be found is determined by the
MM_MAGIC_MIME_FILE. The default value should work on most linux systems, but
would need to be overwritten by windows users.
- if the mime_magic or fileinfo extensions are present in PHP, the file
indicated by ini_get("mime_magic.magicfile") will be parsed for additional types.
I have tested this with and without $wgMimeDetectorCommand, but not with the
mime_magic or fileinfo extensions.
patch to folow in a minute.
Version: unspecified
Severity: enhancement