mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 19:06:27 +00:00
Empty commit
This commit is contained in:
parent
f741915024
commit
48c9f14104
@ -576,10 +576,10 @@ function audiobook_form() {
|
||||
<table cellpadding="3" cellspacing="1" border="0" class="border slice" width="100%">
|
||||
<? if($this->NewTorrent){ ?>
|
||||
<tr id="title_tr">
|
||||
<td class="label">Artist - Title</td>
|
||||
<td class="label">Author - Title</td>
|
||||
<td>
|
||||
<input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title']) ?>" />
|
||||
<p class="min_padding">Should only include the artist if applicable</p>
|
||||
<p class="min_padding">Should only include the author if applicable</p>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
@ -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'");
|
||||
|
@ -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[] = '<a href="torrents.php?taglist='.$Tag.'">'.$Tag.'</a>';
|
||||
}
|
||||
$TorrentTags[] = '<a href="torrents.php?taglist='.$Tag.'">'.$Tag.'</a>';
|
||||
}
|
||||
$TorrentTags = implode(', ', $TorrentTags);
|
||||
$TorrentTags = '<br /><div class="tags">'.$TorrentTags.'</div>';
|
||||
|
@ -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()) {
|
||||
|
@ -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); }
|
||||
|
@ -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
|
||||
|
@ -306,7 +306,17 @@
|
||||
</td>
|
||||
</tr>
|
||||
<? }
|
||||
} ?>
|
||||
}
|
||||
if ($GroupID) {
|
||||
/*$Groups = get_groups(array($GroupID), true, true, false);
|
||||
$Group = $Groups['matches'][$GroupID];
|
||||
$GroupLink = display_artists($Group['ExtendedArtists']).'<a href="torrents.php?id='.$GroupID.'">'.$Group['Name'].'</a>';*/
|
||||
?>
|
||||
<tr>
|
||||
<td class="label">Torrent Group</td>
|
||||
<td><a href="torrents.php?id=<?=$GroupID?>">torrents.php?id=<?=$GroupID?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<tr>
|
||||
<td class="label">Votes</td>
|
||||
<td>
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
<tr valign="top">
|
||||
<td align="right">Key</td>
|
||||
<td align="left">
|
||||
<input type="text" name="key" id="key" class="inputtext" />
|
||||
<input type="text" name="key" id="key" class="inputtext" value="<?=$_GET['key']?>" />
|
||||
<select name="type">
|
||||
<option value="view">View</option>
|
||||
<option value="clear">Clear</option>
|
||||
|
@ -4,6 +4,8 @@ function compare($X, $Y){
|
||||
return($Y['score'] - $X['score']);
|
||||
}
|
||||
|
||||
define(MAX_PERS_COLLAGES, 3); // How many personal collages should be shown by default
|
||||
|
||||
include(SERVER_ROOT.'/sections/bookmarks/functions.php'); // has_bookmarked()
|
||||
include(SERVER_ROOT.'/classes/class_text.php');
|
||||
$Text = NEW TEXT;
|
||||
@ -658,6 +660,51 @@ function filelist($Str) {
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
$PersonalCollages = $Cache->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 = ' <a href="#" onClick="$(\'.personal_rows\').toggle(); return false;">(See all)</a>';
|
||||
} else {
|
||||
$Indices = range(0, count($PersonalCollages)-1);
|
||||
$SeeAll = '';
|
||||
}
|
||||
?>
|
||||
<table id="personal_collages">
|
||||
<tr class="colhead">
|
||||
<td width="85%">This album is in <?=count($PersonalCollages)?> personal collage<?=((count($PersonalCollages)>1)?'s':'')?><?=$SeeAll?></td>
|
||||
<td># torrents</td>
|
||||
</tr>
|
||||
<? foreach ($Indices as $i) {
|
||||
list($CollageName, $CollageTorrents, $CollageID) = $PersonalCollages[$i];
|
||||
unset($PersonalCollages[$i]);
|
||||
?>
|
||||
<tr>
|
||||
<td><a href="collages.php?id=<?=$CollageID?>"><?=$CollageName?></a></td>
|
||||
<td><?=$CollageTorrents?></td>
|
||||
</tr>
|
||||
<? }
|
||||
foreach ($PersonalCollages as $Collage) {
|
||||
list($CollageName, $CollageTorrents, $CollageID) = $Collage;
|
||||
?>
|
||||
<tr class="personal_rows hidden">
|
||||
<td><a href="collages.php?id=<?=$CollageID?>"><?=$CollageName?></a></td>
|
||||
<td><?=$CollageTorrents?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<div class="box">
|
||||
<div class="head"><strong><?=(!empty($ReleaseType) ? $ReleaseTypes[$ReleaseType].' info' : 'Info' )?></strong></div>
|
||||
|
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user