Split Confirm!

You are attempting to split the torrent off into a new group:

  • - []
query(" SELECT ArtistID, Name FROM artists_group WHERE Name = '$ArtistName'"); if (!$DB->has_results()) { $DB->query(" INSERT INTO artists_group (Name) VALUES ('$ArtistName')"); $ArtistID = $DB->inserted_id(); } else { list($ArtistID, $ArtistName) = $DB->next_record(); } $DB->query(" SELECT CategoryID FROM torrents_group WHERE ID = $OldGroupID"); list($CategoryID) = $DB->next_record(); $DB->query(" INSERT INTO torrents_group (CategoryID, Name, Year, Time, WikiBody, WikiImage) VALUES ('$CategoryID', '$Title', '$Year', '".sqltime()."', '', '')"); $GroupID = $DB->inserted_id(); $DB->query(" INSERT INTO torrents_artists (GroupID, ArtistID, UserID) VALUES ('$GroupID', '$ArtistID', '$LoggedUser[ID]')"); $DB->query(" UPDATE torrents SET GroupID = '$GroupID' WHERE ID = '$TorrentID'"); // Delete old group if needed $DB->query(" SELECT ID FROM torrents WHERE GroupID = '$OldGroupID'"); if (!$DB->has_results()) { Torrents::delete_group($OldGroupID); } else { Torrents::update_hash($OldGroupID); } Torrents::update_hash($GroupID); $Cache->delete_value("torrent_download_$TorrentID"); Misc::write_log("Torrent $TorrentID was edited by " . $LoggedUser['Username']); header("Location: torrents.php?id=$GroupID"); } ?>