diff --git a/classes/class_torrent_form.php b/classes/class_torrent_form.php index 8c794ad3..c03968bf 100644 --- a/classes/class_torrent_form.php +++ b/classes/class_torrent_form.php @@ -22,6 +22,7 @@ class TORRENT_FORM { var $Error = false; var $TorrentID = false; var $Disabled = ''; + var $DisabledFlag = false; function TORRENT_FORM($Torrent = false, $Error = false, $NewTorrent = true) { @@ -39,6 +40,7 @@ function TORRENT_FORM($Torrent = false, $Error = false, $NewTorrent = true) { if($this->Torrent && $this->Torrent['GroupID']) { $this->Disabled = ' disabled="disabled"'; + $this->DisabledFlag = true; } } @@ -217,9 +219,11 @@ function music_form($GenreTags) { - +DisabledFlag) { ?> [+] [-] -
Remixer - [+] [-] -+] [-] + diff --git a/sections/torrents/takegroupedit.php b/sections/torrents/takegroupedit.php index 7a4b52d9..976fa09d 100644 --- a/sections/torrents/takegroupedit.php +++ b/sections/torrents/takegroupedit.php @@ -131,19 +131,21 @@ } $DB->query("SELECT ID FROM torrents WHERE GroupID = ".$GroupID); -$TorrentIDs = implode(",", $DB->collect('ID')); -$DB->query("SELECT DISTINCT uid FROM xbt_snatched WHERE fid IN (".$TorrentIDs.")"); -$Snatchers = $DB->collect('uid'); -foreach($Snatchers as $UserID) { - $RecentSnatches = $Cache->get_value('recent_snatches_'.$UserID); - if(is_array($RecentSnatches)) { - foreach($RecentSnatches as $Key => $Recent) { - if($Recent['ID'] == $GroupID) { - if($Recent['WikiImage'] != $Image) { - $Recent['WikiImage'] = $Image; - $Cache->begin_transaction('recent_snatches_'.$UserID); - $Cache->update_row($Key, $Recent); - $Cache->commit_transaction(0); +if($DB->record_count()) { + $TorrentIDs = implode(",", $DB->collect('ID')); + $DB->query("SELECT DISTINCT uid FROM xbt_snatched WHERE fid IN (".$TorrentIDs.")"); + $Snatchers = $DB->collect('uid'); + foreach($Snatchers as $UserID) { + $RecentSnatches = $Cache->get_value('recent_snatches_'.$UserID); + if(is_array($RecentSnatches)) { + foreach($RecentSnatches as $Key => $Recent) { + if($Recent['ID'] == $GroupID) { + if($Recent['WikiImage'] != $Image) { + $Recent['WikiImage'] = $Image; + $Cache->begin_transaction('recent_snatches_'.$UserID); + $Cache->update_row($Key, $Recent); + $Cache->commit_transaction(0); + } } } }