From: Mikael Nordfeldth Date: Sat, 8 Mar 2014 01:02:26 +0000 (+0100) Subject: We only allow (and have) MIME types in supported list X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0eb38b8f8400a86c9f2f864fb656d5c89e757c5b;p=quix0rs-gnu-social.git We only allow (and have) MIME types in supported list $config['attachment']['supported'] may not use only the file extension. --- diff --git a/lib/mediafile.php b/lib/mediafile.php index e01d2eaeab..a2cb21ea45 100644 --- a/lib/mediafile.php +++ b/lib/mediafile.php @@ -325,15 +325,6 @@ class MediaFile } $supported = common_config('attachments', 'supported'); - if (is_array($supported)) { - // Normalize extensions to mime types - foreach ($supported as $i => $entry) { - if (strpos($entry, '/') === false) { - common_log(LOG_INFO, "sample.$entry"); - $supported[$i] = $mte->getMIMEType("sample.$entry"); - } - } - } if ($supported === true || in_array($filetype, $supported)) { // Restore PEAR error handlers for our DB code... $_PEAR->staticPopErrorHandling();