From f91c58aae407aeddfefc12a91291a224be9446ae Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sun, 31 Dec 2023 11:40:32 +0700 Subject: [PATCH] Update posting_attachments.php --- library/attach_mod/posting_attachments.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/attach_mod/posting_attachments.php b/library/attach_mod/posting_attachments.php index 68a80a46..a110fc0f 100644 --- a/library/attach_mod/posting_attachments.php +++ b/library/attach_mod/posting_attachments.php @@ -208,7 +208,7 @@ class attach_parent */ function handle_attachments($mode) { - global $is_auth, $attach_config, $refresh, $post_id, $submit, $preview, $error, $error_msg, $lang; + global $is_auth, $attach_config, $refresh, $update_attachment, $post_id, $submit, $preview, $error, $error_msg, $lang; // // ok, what shall we do ;) @@ -944,7 +944,9 @@ class attach_parent //bt // Block uploading more than one torrent file - if (!$error && $this->extension === TORRENT_EXT && in_array(TORRENT_EXT, $this->attachment_extension_list)) + global $update_attachment; + + if (!$error && $this->extension === TORRENT_EXT && in_array(TORRENT_EXT, $this->attachment_extension_list) && !$update_attachment) { $error = TRUE; if (!empty($error_msg))