Browse Source

Remove duplicate torrent file check

Source field insertion makes every infohash different so this doesn't do
anything
spaghetti 3 years ago
parent
commit
93cdab9891
1 changed files with 0 additions and 15 deletions
  1. 0
    15
      sections/upload/upload_handle.php

+ 0
- 15
sections/upload/upload_handle.php View File

@@ -267,21 +267,6 @@ $UnsourcedTorrent = $Tor->make_sourced(); // The torrent now has the source fiel
267 267
 $TorEnc = $Tor->encode();
268 268
 $InfoHash = pack('H*', $Tor->info_hash());
269 269
 
270
-$DB->query("
271
-  SELECT ID
272
-  FROM torrents
273
-  WHERE info_hash = '".db_string($InfoHash)."'");
274
-if ($DB->has_results()) {
275
-  list($ID) = $DB->next_record();
276
-  if (file_exists(TORRENT_STORE.$ID.'.torrent')) {
277
-    $Err = '<a href="torrents.php?torrentid='.$ID.'">The exact same torrent file already exists on the site!</a>';
278
-  } else {
279
-    // A lost torrent
280
-    file_put_contents(TORRENT_STORE.$ID.'.torrent', $TorEnc);
281
-    $Err = '<a href="torrents.php?torrentid='.$ID.'">Thank you for fixing this torrent</a>';
282
-  }
283
-}
284
-
285 270
 if (isset($Tor->Dec['encrypted_files'])) {
286 271
   $Err = 'This torrent contains an encrypted file list which is not supported here.';
287 272
 }

Loading…
Cancel
Save