aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-11-10 23:49:29 +0100
committerAndreas Fischer <bantu@phpbb.com>2012-11-10 23:49:29 +0100
commite86ecc0f3bd6383d31a670896720a970b8faaaa9 (patch)
tree0bb5af4cffd3b53f3225ea2c72670e343709d86d /phpBB/includes/message_parser.php
parent847feb07e784ccbe646257553f1efba8c5032b7f (diff)
parent1f9bff2126bbec514c4a7b675723bfe7f26c432e (diff)
downloadforums-e86ecc0f3bd6383d31a670896720a970b8faaaa9.tar
forums-e86ecc0f3bd6383d31a670896720a970b8faaaa9.tar.gz
forums-e86ecc0f3bd6383d31a670896720a970b8faaaa9.tar.bz2
forums-e86ecc0f3bd6383d31a670896720a970b8faaaa9.tar.xz
forums-e86ecc0f3bd6383d31a670896720a970b8faaaa9.zip
Merge remote-tracking branch 'Fyorl/ticket/10939' into develop
* Fyorl/ticket/10939: [ticket/10939] Added documentation for phpbb_request::file [ticket/10939] Added tests for phpbb_request::file [ticket/10939] Modified the default return for $request->file [ticket/10939] Modified fileupload tests to deal with new behaviour [ticket/10939] Modified mock request class to handle deactivated $_FILES [ticket/10939] Modified acp_groups.php to not use $_FILES [ticket/10939] Modified ucp_groups.php to not use $_FILES [ticket/10939] Modified functions_user.php to not use $_FILES [ticket/10939] Modified message_parser.php to not use $_FILES [ticket/10939] Modified functions_upload to not use $_FILES [ticket/10939] Modified request test slightly to include $_FILES [ticket/10939] Added $_FILES handling to phpbb_request
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r--phpBB/includes/message_parser.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 6695047b56..1cd2a46fa1 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1363,13 +1363,14 @@ class parse_message extends bbcode_firstpass
*/
function parse_attachments($form_name, $mode, $forum_id, $submit, $preview, $refresh, $is_message = false)
{
- global $config, $auth, $user, $phpbb_root_path, $phpEx, $db;
+ global $config, $auth, $user, $phpbb_root_path, $phpEx, $db, $request;
$error = array();
$num_attachments = sizeof($this->attachment_data);
$this->filename_data['filecomment'] = utf8_normalize_nfc(request_var('filecomment', '', true));
- $upload_file = (isset($_FILES[$form_name]) && $_FILES[$form_name]['name'] != 'none' && trim($_FILES[$form_name]['name'])) ? true : false;
+ $upload = $request->file($form_name);
+ $upload_file = (!empty($upload) && $upload['name'] !== 'none' && trim($upload['name']));
$add_file = (isset($_POST['add_file'])) ? true : false;
$delete_file = (isset($_POST['delete_file'])) ? true : false;