diff options
author | Fyorl <gaelreth@gmail.com> | 2012-08-15 15:06:37 +0100 |
---|---|---|
committer | Fyorl <gaelreth@gmail.com> | 2012-08-15 15:06:37 +0100 |
commit | 3eb88b026752512a79b641e3b55193972f221a45 (patch) | |
tree | e2dc688af56775bf4f2b05775896eb04dc4ff28d /phpBB/includes/message_parser.php | |
parent | 91b9cc90dd078fda135d975f0e5af798535d9014 (diff) | |
download | forums-3eb88b026752512a79b641e3b55193972f221a45.tar forums-3eb88b026752512a79b641e3b55193972f221a45.tar.gz forums-3eb88b026752512a79b641e3b55193972f221a45.tar.bz2 forums-3eb88b026752512a79b641e3b55193972f221a45.tar.xz forums-3eb88b026752512a79b641e3b55193972f221a45.zip |
[ticket/10939] Modified message_parser.php to not use $_FILES
PHPBB3-10939
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r-- | phpBB/includes/message_parser.php | 5 |
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; |