We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 8c28e54c authored by mattl's avatar mattl

same as previous, but for mime_to_ext

parent dbe5d72e
......@@ -1871,6 +1871,9 @@ function common_supported_ext_to_mime($fileext)
function common_supported_mime_to_ext($mimetype)
$supported = common_config('attachments', 'supported');
if ($supported === true) {
throw new ServerException('Supported mimetype but unknown extension relation.');
foreach($supported as $type => $ext) {
if ($mimetype === $type) {
return $ext;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment