diff --git a/classes/class_torrent_form.php b/classes/class_torrent_form.php index 9d882858..2480b6c6 100644 --- a/classes/class_torrent_form.php +++ b/classes/class_torrent_form.php @@ -576,10 +576,10 @@ function audiobook_form() { NewTorrent){ ?> - + diff --git a/classes/script_start.php b/classes/script_start.php index 48cd6bf7..5ed7cda9 100644 --- a/classes/script_start.php +++ b/classes/script_start.php @@ -1223,6 +1223,14 @@ function delete_group($GroupID) { } } + // Requests + $DB->query("SELECT ID FROM requests WHERE GroupID='$GroupID'"); + $Requests = $DB->collect('ID'); + $DB->query("UPDATE requests SET GroupID = NULL WHERE GroupID = '$GroupID'"); + foreach ($Requests as $RequestID) { + $Cache->delete_value('request_'.$RequestID); + } + $DB->query("DELETE FROM torrents_group WHERE ID='$GroupID'"); $DB->query("DELETE FROM torrents_tags WHERE GroupID='$GroupID'"); $DB->query("DELETE FROM torrents_tags_votes WHERE GroupID='$GroupID'"); diff --git a/sections/artist/artist.php b/sections/artist/artist.php index 5358512e..e8249deb 100644 --- a/sections/artist/artist.php +++ b/sections/artist/artist.php @@ -106,8 +106,8 @@ function compare($X, $Y){ FROM torrents_artists AS ta JOIN torrents_group AS tg ON tg.ID=ta.GroupID WHERE ta.ArtistID='$ArtistID' - ORDER BY IF(ta.Importance IN ('2', '3', '4', '7'),ta.Importance, 1), - tg.ReleaseType ASC, tg.Year DESC, tg.Name DESC"); + ORDER BY IF(ta.Importance IN ('2', '3', '4', '7'),1000 + ta.Importance, tg.ReleaseType) ASC, + tg.Year DESC, tg.Name DESC"); $GroupIDs = $DB->collect('GroupID'); $Importances = $DB->to_array('GroupID', MYSQLI_BOTH, false); @@ -217,14 +217,16 @@ function compare($X, $Y){ $TorrentTags = array(); - // $Tags array is for the sidebar on the right - foreach($TagList as $Tag) { - if(!isset($Tags[$Tag])) { - $Tags[$Tag] = array('name'=>$Tag, 'count'=>1); - } else { - $Tags[$Tag]['count']++; + // $Tags array is for the sidebar on the right. Skip compilations and soundtracks. + if (!in_array($ReleaseType, array(7, 3))) { + foreach($TagList as $Tag) { + if(!isset($Tags[$Tag])) { + $Tags[$Tag] = array('name'=>$Tag, 'count'=>1); + } else { + $Tags[$Tag]['count']++; + } + $TorrentTags[] = ''.$Tag.''; } - $TorrentTags[] = ''.$Tag.''; } $TorrentTags = implode(', ', $TorrentTags); $TorrentTags = '
'.$TorrentTags.'
'; diff --git a/sections/collages/add_torrent.php b/sections/collages/add_torrent.php index f1b631eb..73082286 100644 --- a/sections/collages/add_torrent.php +++ b/sections/collages/add_torrent.php @@ -23,6 +23,7 @@ function AddTorrent($CollageID, $GroupID) { $Cache->delete_value('collage_'.$CollageID); $Cache->delete_value('torrents_details_'.$GroupID); $Cache->delete_value('torrent_collages_'.$GroupID); + $Cache->delete_value('torrent_collages_personal_'.$GroupID); $DB->query("SELECT UserID FROM users_collage_subs WHERE CollageID=$CollageID"); while (list($CacheUserID) = $DB->next_record()) { diff --git a/sections/collages/manage_handle.php b/sections/collages/manage_handle.php index a1cfd716..3eda8e76 100644 --- a/sections/collages/manage_handle.php +++ b/sections/collages/manage_handle.php @@ -18,6 +18,7 @@ $DB->query("UPDATE collages SET NumTorrents=NumTorrents-$Rows WHERE ID='$CollageID'"); $Cache->delete_value('torrents_details_'.$GroupID); $Cache->delete_value('torrent_collages_'.$GroupID); + $Cache->delete_value('torrent_collages_personal_'.$GroupID); } else { $Sort = $_POST['sort']; if(!is_number($Sort)) { error(404); } diff --git a/sections/collages/take_delete.php b/sections/collages/take_delete.php index 4ece3973..8eceaf13 100644 --- a/sections/collages/take_delete.php +++ b/sections/collages/take_delete.php @@ -22,6 +22,8 @@ $DB->query("SELECT GroupID FROM collages_torrents WHERE CollageID='$CollageID'"); while(list($GroupID) = $DB->next_record()) { $Cache->delete_value('torrents_details_'.$GroupID); + $Cache->delete_value('torrent_collages_'.$GroupID); + $Cache->delete_value('torrent_collages_personal_'.$GroupID); } //Personal collages have CategoryID 0 diff --git a/sections/requests/request.php b/sections/requests/request.php index bdb25955..30c400a7 100644 --- a/sections/requests/request.php +++ b/sections/requests/request.php @@ -306,7 +306,17 @@ + } + if ($GroupID) { + /*$Groups = get_groups(array($GroupID), true, true, false); + $Group = $Groups['matches'][$GroupID]; + $GroupLink = display_artists($Group['ExtendedArtists']).''.$Group['Name'].'';*/ +?> + + + + +
Artist - TitleAuthor - Title -

Should only include the artist if applicable

+

Should only include the author if applicable

Torrent Grouptorrents.php?id=
Votes diff --git a/sections/staffpm/staff_inbox.php b/sections/staffpm/staff_inbox.php index a90c9479..2e7d0bb9 100644 --- a/sections/staffpm/staff_inbox.php +++ b/sections/staffpm/staff_inbox.php @@ -27,13 +27,13 @@ $WhereCondition = "WHERE (Level = $UserLevel OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'"; break; default: - if ($IsStaff) { + if ($UserLevel >= 700) { $ViewString = "My unanswered"; - $WhereCondition = "WHERE ((Level >= ".$Classes[MOD]['Level']." AND Level <= $UserLevel) OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'"; + $WhereCondition = "WHERE ((Level >= ".max($Classes[MOD]['Level'],700)." AND Level <= $UserLevel) OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'"; } else { - // FLS + // FLS and Forum Mods $ViewString = "Unanswered"; - $WhereCondition = "WHERE (Level <= $UserLevel OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'"; + $WhereCondition = "WHERE (Level = $UserLevel OR AssignedToUser='".$LoggedUser['ID']."') AND Status='Unanswered'"; } break; } diff --git a/sections/tools/misc/clear_cache.php b/sections/tools/misc/clear_cache.php index 8706158e..8a63eabf 100644 --- a/sections/tools/misc/clear_cache.php +++ b/sections/tools/misc/clear_cache.php @@ -26,7 +26,7 @@
Key - +
get_value('torrent_collages_personal_'.$GroupID); +if(!is_array($PersonalCollages)) { + $DB->query("SELECT c.Name, c.NumTorrents, c.ID FROM collages AS c JOIN collages_torrents AS ct ON ct.CollageID=c.ID WHERE ct.GroupID='$GroupID' AND Deleted='0' AND CategoryID='0'"); + $PersonalCollages = $DB->to_array(false, MYSQL_NUM); + $Cache->cache_value('torrent_collages_personal_'.$GroupID, $PersonalCollages, 3600*6); +} + +if(count($PersonalCollages)>0) { + if (count($PersonalCollages) > MAX_PERS_COLLAGES) { + // Pick 5 at random + $Range = range(0,count($PersonalCollages) - 1); + shuffle($Range); + $Indices = array_slice($Range, 0, MAX_PERS_COLLAGES); + $SeeAll = ' (See all)'; + } else { + $Indices = range(0, count($PersonalCollages)-1); + $SeeAll = ''; + } +?> + + + + + + + + + + + + + + + + +
This album is in personal collage1)?'s':'')?># torrents
+
diff --git a/sections/torrents/merge.php b/sections/torrents/merge.php index 0898f6a4..c5355a92 100644 --- a/sections/torrents/merge.php +++ b/sections/torrents/merge.php @@ -69,6 +69,13 @@ $Cache->delete_value('collage_'.$CollageID); } + //Requests + $DB->query("SELECT ID FROM requests WHERE GroupID='$OldGroupID'"); + $Requests = $DB->collect('ID'); + $DB->query("UPDATE requests SET GroupID = 'NewGroupID' WHERE GroupID = '$OldGroupID'"); + foreach ($Requests as $RequestID) { + $Cache->delete_value('request_'.$RequestID); + } $DB->query("SELECT ID FROM torrents WHERE GroupID='$OldGroupID'"); while(list($TorrentID) = $DB->next_record()) {