Allow third party code to hook-up MIME type detection
authorrillke <rainerrillke@hotmail.com>
Sat, 21 Jun 2014 12:00:55 +0000 (14:00 +0200)
committerrillke <rainerrillke@hotmail.com>
Sun, 6 Jul 2014 11:38:14 +0000 (13:38 +0200)
Adding 3 hooks to MimeMagic.php

- MimeMagicInit: Add assignments of MIME types -> Media types
  and assignments of MIME types -> File extensions
- MimeMagicImproveFromExtension: Further improve the MIME type detected
  by considering the file extension
- MimeMagicGuessFromContent: Guess the MIME from file content

This is the successor of Icf9eec10bec7c0a7e.

PHP's own module fileinfo module is not capable detecting Chemical
table files. Instead, they are reported as text/plain.

MediaHandlers can be attached by MIME type only. That's why these
changes are required for [[Extension:MolHandler]] to work.

Clean up:
Do not create unused property MimeMagic::mToMime.

Change-Id: I67f3e4e83b47e6df0d9e8371f09a741a8aa77651


No differences found