aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-12-07 18:11:38 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2012-12-07 18:11:38 -0600
commit92ec214537d041076187cc013d08175e8cff3fe8 (patch)
tree24ccc13c2205faf1a2ba98ae159078ddbe1d90f4 /phpBB/includes/message_parser.php
parentb25efd744db56f7565453caccf26630404db07c7 (diff)
parent108a6c35a6d718166a8bfd17042cac5f2ccc6d20 (diff)
downloadforums-92ec214537d041076187cc013d08175e8cff3fe8.tar
forums-92ec214537d041076187cc013d08175e8cff3fe8.tar.gz
forums-92ec214537d041076187cc013d08175e8cff3fe8.tar.bz2
forums-92ec214537d041076187cc013d08175e8cff3fe8.tar.xz
forums-92ec214537d041076187cc013d08175e8cff3fe8.zip
Merge branch 'develop' of git://github.com/phpbb/phpbb3 into ticket/8323
Conflicts: phpBB/viewtopic.php
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;