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

Commit dbe5d72e authored by mattl's avatar mattl

If all file extensions are supported we have no list of comparisons

parent d07640ca
...@@ -1855,6 +1855,9 @@ function common_supported_ext_to_mime($fileext) ...@@ -1855,6 +1855,9 @@ function common_supported_ext_to_mime($fileext)
} }
$supported = common_config('attachments', 'supported'); $supported = common_config('attachments', 'supported');
if ($supported === true) {
throw new ServerException('Supported extension but unknown mimetype relation.');
}
foreach($supported as $type => $ext) { foreach($supported as $type => $ext) {
if ($ext === $fileext) { if ($ext === $fileext) {
return $type; return $type;
...@@ -2461,4 +2464,4 @@ function html_sprintf() ...@@ -2461,4 +2464,4 @@ function html_sprintf()
function _ve($var) function _ve($var)
{ {
return var_export($var, true); return var_export($var, true);
} }
\ No newline at end of file
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