diff options
Diffstat (limited to 'phpBB/includes/ucp')
| -rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index edee64bd18..cf82925e1d 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -665,7 +665,22 @@ function compose_pm($id, $mode, $action) } // Parse Attachments - before checksum is calculated - $message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true); + if ($action == 'edit') + { + $message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true, $msg_id); + if (sizeof($message_parser->attachment_data)) + { + // Update attachment indicators for pms having attachments now, as a precaution if the pm does not get stored by submit + $sql = 'UPDATE ' . PRIVMSGS_TABLE . ' + SET message_attachment = 1 + WHERE msg_id = ' . $msg_id; + $db->sql_query($sql); + } + } + else + { + $message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true); + } if (sizeof($message_parser->warn_msg) && !($remove_u || $remove_g || $add_to || $add_bcc)) { |
