unknownmimeextensionexception.php 895 B

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