mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
Block uploading more than one torrent file (#1293)
This commit is contained in:
parent
dfc79f8109
commit
09f352d2dd
1 changed files with 9 additions and 1 deletions
|
@ -824,9 +824,17 @@ class Attach
|
||||||
}
|
}
|
||||||
|
|
||||||
//bt
|
//bt
|
||||||
|
// Block uploading more than one torrent file
|
||||||
|
global $update_attachment;
|
||||||
|
if (!$error && !$update_attachment && $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
|
// Check if user can post torrent
|
||||||
global $post_data;
|
global $post_data;
|
||||||
|
|
||||||
if (!$error && $this->extension === TORRENT_EXT && !$post_data['first_post']) {
|
if (!$error && $this->extension === TORRENT_EXT && !$post_data['first_post']) {
|
||||||
$error = true;
|
$error = true;
|
||||||
if (!empty($error_msg)) {
|
if (!empty($error_msg)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue