Skip to content

Commit

Permalink
Update posting_attachments.php
Browse files Browse the repository at this point in the history
  • Loading branch information
belomaxorka committed Nov 5, 2023
1 parent ac05661 commit 33bb006
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion library/attach_mod/posting_attachments.php
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,16 @@ function upload_attachment()
}

//bt
// Block uploading more than one torrent file
if (!$error && $this->extension === TORRENT_EXT && in_array(TORRENT_EXT, $this->attachment_extension_list))
{
$error = TRUE;
if (!empty($error_msg))
{
$error_msg .= '<br />';
}
$error_msg .= $lang['ONLY_1_TOR_PER_TOPIC'];
}
// Check if user can post torrent
global $post_data;

Expand Down Expand Up @@ -1355,4 +1365,4 @@ function execute_posting_attachment_handling()

$attachment_mod['posting'] = new attach_posting();
$attachment_mod['posting']->posting_attachment_mod();
}
}

0 comments on commit 33bb006

Please sign in to comment.