mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-10 18:54:08 +02:00
Fix bug #48265 - Correctly set attachment flag for topics, posts and pms after deleting attachments - Patch by WorldWar and nickvergessen
Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9843 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
Reference in New Issue
Block a user