1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/16356] Delete attachments on saving a draft

PHPBB3-16356
This commit is contained in:
mrgoldy
2020-02-05 11:04:01 +01:00
parent 7de24bad2e
commit 582919804a
2 changed files with 8 additions and 0 deletions

View File

@@ -689,6 +689,10 @@ function compose_pm($id, $mode, $action, $user_folders = array())
);
$db->sql_query($sql);
/** @var \phpbb\attachment\manager $attachment_manager */
$attachment_manager = $phpbb_container->get('attachment.manager');
$attachment_manager->delete('attach', array_column($message_parser->attachment_data, 'attach_id'));
$redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&mode=$mode");
meta_refresh(3, $redirect_url);