2016-07-06 15:59:16 +09:00
|
|
|
<?php
|
|
|
|
if (!defined('GNUSOCIAL')) { exit(1); }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class for unknown MIME extension exception
|
|
|
|
*
|
|
|
|
* Thrown when we don't know the file extension for a given MIME type.
|
|
|
|
* This generally means that all files are accepted since if we have
|
|
|
|
* a list of known MIMEs then they have extensions coupled to them.
|
|
|
|
*
|
|
|
|
* @category Exception
|
|
|
|
* @package GNUsocial
|
|
|
|
* @author Mikael Nordfeldth <mmn@hethane.se>
|
|
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.html
|
|
|
|
* @link https://gnu.io/social
|
|
|
|
*/
|
|
|
|
|
|
|
|
class UnknownMimeExtensionException extends ServerException
|
|
|
|
{
|
2016-07-06 16:14:59 +09:00
|
|
|
public function __construct($mimetype)
|
2016-07-06 15:59:16 +09:00
|
|
|
{
|
2016-07-06 16:14:59 +09:00
|
|
|
// TRANS: We accept the file type (we probably just accept all files)
|
|
|
|
// TRANS: but don't know the file extension for it.
|
|
|
|
$msg = sprintf(_('Supported mimetype but unknown extension relation: %1$s'), _ve($mimetype));
|
2016-07-06 15:59:16 +09:00
|
|
|
parent::__construct($msg);
|
|
|
|
}
|
|
|
|
}
|