unknownextensionmimeexception.php 764 B

123456789101112131415161718192021222324252627
  1. <?php
  2. if (!defined('GNUSOCIAL')) { exit(1); }
  3. /**
  4. * Class for unknown extension MIME type exception
  5. *
  6. * Thrown when we don't know the MIME type for a given file extension.
  7. *
  8. * @category Exception
  9. * @package GNUsocial
  10. * @author Mikael Nordfeldth <mmn@hethane.se>
  11. * @license https://www.gnu.org/licenses/agpl-3.0.html
  12. * @link https://gnu.io/social
  13. */
  14. class UnknownExtensionMimeException extends ServerException
  15. {
  16. public function __construct($ext)
  17. {
  18. // TRANS: We accept the file type (we probably just accept all files)
  19. // TRANS: but don't know the file extension for it. %1$s is the extension.
  20. $msg = sprintf(_('Unknown MIME type for file extension: %1$s'), _ve($ext));
  21. parent::__construct($msg);
  22. }
  23. }