aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2014-08-07 12:06:49 +0200
committerNils Adermann <naderman@naderman.de>2014-08-07 12:06:49 +0200
commit89a6fed91d9344152f0b2a0779d3d458f3311ecf (patch)
tree7979f44c8d5bd6532491fe2261acc4fa348b8fe2 /phpBB/includes/functions_posting.php
parent57f9a96f4b64c323448dfb83ed0816a2abe727e7 (diff)
parentb203b4afa18e7e4774bec525620ec2a390ac374f (diff)
downloadforums-89a6fed91d9344152f0b2a0779d3d458f3311ecf.tar
forums-89a6fed91d9344152f0b2a0779d3d458f3311ecf.tar.gz
forums-89a6fed91d9344152f0b2a0779d3d458f3311ecf.tar.bz2
forums-89a6fed91d9344152f0b2a0779d3d458f3311ecf.tar.xz
forums-89a6fed91d9344152f0b2a0779d3d458f3311ecf.zip
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: [ticket/11148] Remove unneeded variable mimetype and use type octet-stream [ticket/11148] Change expected output with disallowed content in test [ticket/11148] Always use the output of the mimetype guesser in get_mimetype [ticket/11148] Get rid of extra line in mimetype guesser setter doc block [ticket/11148] Add missing parts to docblock of get_mimetype() method [ticket/11148] Default to application/octet-stream if no mimetype given [ticket/11148] Use mimetype guesser for uploaded avatars [ticket/11148] Pass mimetype guesser to upload_attachment() function [ticket/11148] Add mimetype guesser to filespec and fileupload class
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index b3f164a84d..f7e33725ec 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -398,11 +398,12 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
* @param string $local_storage The path to the local file
* @param bool $is_message Whether it is a PM or not
* @param \filespec $local_filedata A filespec object created for the local file
+* @param \phpbb\mimetype\guesser $mimetype_guesser The mimetype guesser object if used
* @param \phpbb\plupload\plupload $plupload The plupload object if one is being used
*
* @return object filespec
*/
-function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false, \phpbb\plupload\plupload $plupload = null)
+function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false, \phpbb\mimetype\guesser $mimetype_guesser = null, \phpbb\plupload\plupload $plupload = null)
{
global $auth, $user, $config, $db, $cache;
global $phpbb_root_path, $phpEx, $phpbb_dispatcher;
@@ -434,7 +435,7 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
$extensions = $cache->obtain_attach_extensions((($is_message) ? false : (int) $forum_id));
$upload->set_allowed_extensions(array_keys($extensions['_allowed_']));
- $file = ($local) ? $upload->local_upload($local_storage, $local_filedata) : $upload->form_upload($form_name, $plupload);
+ $file = ($local) ? $upload->local_upload($local_storage, $local_filedata, $mimetype_guesser) : $upload->form_upload($form_name, $mimetype_guesser, $plupload);
if ($file->init_error)
{