]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - lib/unknownmimeextensionexception.php
Some mimetype madness!
[quix0rs-gnu-social.git] / lib / unknownmimeextensionexception.php
1 <?php
2 if (!defined('GNUSOCIAL')) { exit(1); }
3
4 /**
5  * Class for unknown MIME extension exception
6  *
7  * Thrown when we don't know the file extension for a given MIME type.
8  * This generally means that all files are accepted since if we have
9  * a list of known MIMEs then they have extensions coupled to them.
10  *
11  * @category Exception
12  * @package  GNUsocial
13  * @author   Mikael Nordfeldth <mmn@hethane.se>
14  * @license  https://www.gnu.org/licenses/agpl-3.0.html
15  * @link     https://gnu.io/social
16  */
17
18 class UnknownMimeExtensionException extends ServerException
19 {
20     public function __construct($msg=null)
21     {
22         if ($msg === null) {
23             // TRANS: We accept the file type (we probably just accept all files)
24             // TRANS: but don't know the file extension for it.
25             $msg = _('Supported mimetype but unknown extension relation.');
26         }
27
28         parent::__construct($msg);
29     }
30 }