aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_upload.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-09-06 13:54:16 +0200
committerTristan Darricau <github@nicofuma.fr>2014-09-06 13:54:16 +0200
commite0711b417fb9e9106af52dcde51ca20dd7b056f2 (patch)
tree4a866d9599bc802800fdb17420efd23bfc640f53 /phpBB/includes/functions_upload.php
parentbc38730ab5e7d59e8e0b1b13c0cd8f3fb32f271a (diff)
parent6387bf8d1399b9ccf995b8eb5a4b93425d27e873 (diff)
downloadforums-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.php7
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;