diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-09-06 13:54:16 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-09-06 13:54:16 +0200 |
commit | e0711b417fb9e9106af52dcde51ca20dd7b056f2 (patch) | |
tree | 4a866d9599bc802800fdb17420efd23bfc640f53 /phpBB/includes/functions_upload.php | |
parent | bc38730ab5e7d59e8e0b1b13c0cd8f3fb32f271a (diff) | |
parent | 6387bf8d1399b9ccf995b8eb5a4b93425d27e873 (diff) | |
download | forums-e0711b417fb9e9106af52dcde51ca20dd7b056f2.tar forums-e0711b417fb9e9106af52dcde51ca20dd7b056f2.tar.gz forums-e0711b417fb9e9106af52dcde51ca20dd7b056f2.tar.bz2 forums-e0711b417fb9e9106af52dcde51ca20dd7b056f2.tar.xz forums-e0711b417fb9e9106af52dcde51ca20dd7b056f2.zip |
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus:
[ticket/13031] Slightly change behavior of choose_mime_type and add unit tests
[ticket/13031] Guess with all mimetype guessers and pick best guess
[ticket/13031] Only use mimetype guesser guess if it helps us
Diffstat (limited to 'phpBB/includes/functions_upload.php')
-rw-r--r-- | phpBB/includes/functions_upload.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index a0a67ccf3d..f179b2fd70 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -232,7 +232,12 @@ class filespec { if ($this->mimetype_guesser !== null) { - $this->mimetype = $this->mimetype_guesser->guess($filename); + $mimetype = $this->mimetype_guesser->guess($filename, $this->uploadname); + + if ($mimetype !== 'application/octet-stream') + { + $this->mimetype = $mimetype; + } } return $this->mimetype; |