Current code in torrents-upload.php is adding duplicate torrents and wasting the space of web server in advance.
This is a simple fix which will create a new file duplicate.torrent and store / erase there every duplicated torrent without making multiple of them.
1. Open torrents-upload.php and find the following part:
Replace with:
This is a simple fix which will create a new file duplicate.torrent and store / erase there every duplicated torrent without making multiple of them.
1. Open torrents-upload.php and find the following part:
if (mysqli_errno($GLOBALS["DBconnector"]) == 1062)
show_error_msg(T_("UPLOAD_FAILED"), T_("UPLOAD_ALREADY_UPLOADED"), 1);Replace with:
if (mysqli_errno($GLOBALS["DBconnector"]) == 1062) {
rename("$torrent_dir/$fname", "$torrent_dir/duplicate.torrent");
show_error_msg(T_("UPLOAD_FAILED"), T_("UPLOAD_ALREADY_UPLOADED"), 1);
}
