mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
Merge pull request #5856 from mrgoldy/ticket/16356
[ticket/16356] Delete attachments on saving a draft
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user