query("SELECT Name FROM torrents_group WHERE ID = ".$OldGroupID); if($DB->record_count() < 1) { //Trying to move to an empty group? I think not! set_message("That group doesn't exist!"); header('Location: '.$_SERVER['HTTP_REFERER']); die(); } list($Name) = $DB->next_record(); $DB->query("SELECT Name FROM torrents_group WHERE ID = ".$GroupID); list($NewName) = $DB->next_record(); $Artists = get_artists(array($OldGroupID, $GroupID)); show_header(); ?>

Change Group Confirm!

You are attempting to move the torrent with ID from the group:

  • -

Into the group:

  • -
query("UPDATE torrents SET GroupID='$GroupID' WHERE ID=$TorrentID"); // Delete old torrent group if it's empty now $DB->query("SELECT COUNT(ID) FROM torrents WHERE GroupID='$OldGroupID'"); list($TorrentsInGroup) = $DB->next_record(); if($TorrentsInGroup == 0) { delete_group($OldGroupID); } else { update_hash($OldGroupID); } update_hash($GroupID); // Clear artist caches $DB->query("SELECT DISTINCT ArtistID FROM torrents_artists WHERE GroupID IN ('$GroupID', '$OldGroupID')"); while(list($ArtistID) = $DB->next_record()) { $Cache->delete_value('artist_'.$ArtistID); } write_log("Torrent $TorrentID was edited by " . $LoggedUser['Username']); // TODO: this is probably broken $Cache->delete_value('torrents_details_'.$GroupID); $Cache->delete_value('torrent_download_'.$TorrentID); header("Location: torrents.php?id=$GroupID"); } ?>