aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_upload.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-04-22 16:18:40 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-04-22 16:18:40 +0000
commit856650861f0c454b800fe816ba2592444ef13894 (patch)
treed73a41902d1d58784c7502c94ce4d03998131e0a /phpBB/includes/functions_upload.php
parent68c349fdc1ad29ff3c80961297db31b1e725973f (diff)
downloadforums-856650861f0c454b800fe816ba2592444ef13894.tar
forums-856650861f0c454b800fe816ba2592444ef13894.tar.gz
forums-856650861f0c454b800fe816ba2592444ef13894.tar.bz2
forums-856650861f0c454b800fe816ba2592444ef13894.tar.xz
forums-856650861f0c454b800fe816ba2592444ef13894.zip
- removed group settings from roles
- added forum icon in front of forums in permissions acp - added trace permissions in permission masks (thanks naderman for writing the first code and for the idea... :)) - some bugfixes - PHP6 fix git-svn-id: file:///svn/phpbb/trunk@5824 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_upload.php')
-rw-r--r--phpBB/includes/functions_upload.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index 46449ff722..8b67769847 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -169,19 +169,15 @@ class filespec
*/
function get_mimetype($filename)
{
+ $mimetype = '';
+
if (function_exists('mime_content_type'))
{
$mimetype = mime_content_type($filename);
}
- else
- {
- $mimetype = 'application/octetstream';
- }
-
- // Opera adds the name to the mime type
- $mimetype = (strpos($mimetype, '; name') !== false) ? str_replace(strstr($mimetype, '; name'), '', $mimetype) : $mimetype;
- if (!$mimetype)
+ // Some browsers choke on a mimetype of application/octet-stream
+ if (!$mimetype || $mimetype == 'application/octet-stream')
{
$mimetype = 'application/octetstream';
}