mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 02:46:30 +00:00
84 changes from Sun Aug 21 14:42:15 2011 -0400 to Mon Sep 5 00:15:20 2011 +0000
Fixes a bug showing the Disable Avatars box for users with the "Can disable users' posting rights" permission Revert "#trying to fix mono" fix unknown release (try 1) trying to roll this out with dirty cache support Go back to memcached's internal incr/decr functions fixed nextElementSibling() patappatch g [patapper]
This commit is contained in:
parent
8b4454b09d
commit
1a22e4247c
@ -1618,7 +1618,7 @@ function get_groups($GroupIDs, $Return = true, $GetArtists = true) {
|
||||
|
||||
foreach($GroupIDs as $GroupID) {
|
||||
$Data = $Cache->get_value('torrent_group_'.$GroupID, true);
|
||||
if(!empty($Data) && (@$Data['ver'] >= 2)) {
|
||||
if(!empty($Data) && (@$Data['ver'] >= 4)) {
|
||||
unset($NotFound[$GroupID]);
|
||||
$Found[$GroupID] = $Data['d'];
|
||||
}
|
||||
@ -1645,11 +1645,11 @@ function get_groups($GroupIDs, $Return = true, $GetArtists = true) {
|
||||
|
||||
$DB->query("SELECT
|
||||
ID, GroupID, Media, Format, Encoding, RemasterYear, Remastered, RemasterTitle, RemasterRecordLabel, RemasterCatalogueNumber, Scene, HasLog, HasCue, LogScore, FileCount, FreeTorrent, Size, Leechers, Seeders, Snatched, Time, ID AS HasFile
|
||||
FROM torrents AS t WHERE GroupID IN($IDs) ORDER BY GroupID, RemasterYear, RemasterTitle, RemasterRecordLabel, RemasterCatalogueNumber, Media, Format, Encoding");
|
||||
FROM torrents AS t WHERE GroupID IN($IDs) ORDER BY GroupID, Remastered, (RemasterYear <> 0) DESC, RemasterYear, RemasterTitle, RemasterRecordLabel, RemasterCatalogueNumber, Media, Format, Encoding, ID");
|
||||
while($Torrent = $DB->next_record(MYSQLI_ASSOC, true)) {
|
||||
$Found[$Torrent['GroupID']]['Torrents'][$Torrent['ID']] = $Torrent;
|
||||
|
||||
$Cache->cache_value('torrent_group_'.$Torrent['GroupID'], array('ver'=>2, 'd'=>$Found[$Torrent['GroupID']]), 0);
|
||||
$Cache->cache_value('torrent_group_'.$Torrent['GroupID'], array('ver'=>4, 'd'=>$Found[$Torrent['GroupID']]), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,9 +180,7 @@ function compare($X, $Y){
|
||||
foreach ($TorrentList as $GroupID=>$Group) {
|
||||
list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $Artists) = array_values($Group);
|
||||
$GroupVanityHouse = $Importances[$GroupID]['VanityHouse'];
|
||||
|
||||
|
||||
|
||||
|
||||
$TagList = explode(' ',str_replace('_','.',$TagList));
|
||||
|
||||
$TorrentTags = array();
|
||||
@ -225,7 +223,7 @@ function compare($X, $Y){
|
||||
<? } ?>
|
||||
<table class="torrent_table" id="torrents_<?=$ReleaseTypeLabel?>">
|
||||
<tr class="colhead_dark">
|
||||
<td><!-- expand/collapse --></td>
|
||||
<td class="small"><!-- expand/collapse --></td>
|
||||
<td width="70%"><a href="#">↑</a> <strong><?=$DisplayName?></strong> (<a href="#" onclick="$('.releases_<?=$ReleaseType?>').toggle();return false;">View</a>)</td>
|
||||
<td>Size</td>
|
||||
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" alt="Snatches" title="Snatches" /></td>
|
||||
@ -270,9 +268,14 @@ function compare($X, $Y){
|
||||
$LastMedia = '';
|
||||
|
||||
$EditionID = 0;
|
||||
unset($FirstUnknown);
|
||||
|
||||
foreach ($Torrents as $TorrentID => $Torrent) {
|
||||
$NumTorrents++;
|
||||
|
||||
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
|
||||
$FirstUnknown = !isset($FirstUnknown);
|
||||
}
|
||||
|
||||
$Torrent['Seeders'] = (int)$Torrent['Seeders'];
|
||||
$Torrent['Leechers'] = (int)$Torrent['Leechers'];
|
||||
@ -283,11 +286,11 @@ function compare($X, $Y){
|
||||
$NumSnatches+=$Torrent['Snatched'];
|
||||
|
||||
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
|
||||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $Torrent['Media'] != $LastMedia) {
|
||||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
|
||||
|
||||
$EditionID++;
|
||||
|
||||
if($Torrent['RemasterTitle'] || $Torrent['RemasterYear'] || $Torrent['RemasterRecordLabel'] || $Torrent['RemasterCatalogueNumber']) {
|
||||
if($Torrent['Remastered'] && $Torrent['RemasterYear'] != 0) {
|
||||
|
||||
$RemasterName = $Torrent['RemasterYear'];
|
||||
$AddExtra = " - ";
|
||||
@ -302,10 +305,14 @@ function compare($X, $Y){
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
$MasterName = "Original Release";
|
||||
$AddExtra = " / ";
|
||||
if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; }
|
||||
if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; }
|
||||
if (!$Torrent['Remastered']) {
|
||||
$MasterName = "Original Release";
|
||||
if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; }
|
||||
if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; }
|
||||
} else {
|
||||
$MasterName = "Unknown Release(s)";
|
||||
}
|
||||
$MasterName .= $AddExtra.display_str($Torrent['Media']);
|
||||
?>
|
||||
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition group_torrent <?=$HideDiscog?>">
|
||||
|
@ -135,14 +135,19 @@ function compare($X, $Y){
|
||||
$LastMedia = '';
|
||||
|
||||
$EditionID = 0;
|
||||
unset($FirstUnknown);
|
||||
|
||||
foreach ($Torrents as $TorrentID => $Torrent) {
|
||||
|
||||
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
|
||||
$FirstUnknown = !isset($FirstUnknown);
|
||||
}
|
||||
|
||||
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
|
||||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $Torrent['Media'] != $LastMedia) {
|
||||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
|
||||
|
||||
$EditionID++;
|
||||
if($Torrent['RemasterTitle'] || $Torrent['RemasterYear'] || $Torrent['RemasterRecordLabel'] || $Torrent['RemasterCatalogueNumber']) {
|
||||
if($Torrent['Remastered'] && $Torrent['RemasterYear'] != 0) {
|
||||
|
||||
$RemasterName = $Torrent['RemasterYear'];
|
||||
$AddExtra = " - ";
|
||||
@ -157,10 +162,14 @@ function compare($X, $Y){
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
$MasterName = "Original Release";
|
||||
$AddExtra = " / ";
|
||||
if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; }
|
||||
if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; }
|
||||
if (!$Torrent['Remastered']) {
|
||||
$MasterName = "Original Release";
|
||||
if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; }
|
||||
if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; }
|
||||
} else {
|
||||
$MasterName = "Unknown Release(s)";
|
||||
}
|
||||
$MasterName .= $AddExtra.display_str($Torrent['Media']);
|
||||
?>
|
||||
<tr class="group_torrent groupid_<?=$GroupID?> edition<? if (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1) { echo ' hidden'; }?>">
|
||||
|
@ -155,12 +155,17 @@ function compare($X, $Y){
|
||||
$LastMedia = '';
|
||||
|
||||
$EditionID = 0;
|
||||
unset($FirstUnknown);
|
||||
|
||||
foreach ($Torrents as $TorrentID => $Torrent) {
|
||||
|
||||
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
|
||||
$FirstUnknown = !isset($FirstUnknown);
|
||||
}
|
||||
|
||||
if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
|
||||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $Torrent['Media'] != $LastMedia) {
|
||||
if($Torrent['RemasterTitle'] || $Torrent['RemasterYear'] || $Torrent['RemasterRecordLabel'] || $Torrent['RemasterCatalogueNumber']) {
|
||||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
|
||||
if($Torrent['Remastered'] && $Torrent['RemasterYear'] != 0) {
|
||||
|
||||
$EditionID++;
|
||||
|
||||
@ -177,10 +182,14 @@ function compare($X, $Y){
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
$MasterName = "Original Release";
|
||||
$AddExtra = " / ";
|
||||
if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; }
|
||||
if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; }
|
||||
if (!$Torrent['Remastered']) {
|
||||
$MasterName = "Original Release";
|
||||
if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; }
|
||||
if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; }
|
||||
} else {
|
||||
$MasterName = "Unknown Release(s)";
|
||||
}
|
||||
$MasterName .= $AddExtra.display_str($Torrent['Media']);
|
||||
?>
|
||||
<tr class="group_torrent groupid_<?=$GroupID?> edition<? if (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1) { echo ' hidden'; }?>">
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
while(list($GroupID,$Seeders,$Leechers,$Snatched) = $DB->next_record(MYSQLI_NUM)) {
|
||||
$Data = $Cache->get_value('torrent_group_'.$GroupID);
|
||||
if (!(is_array($Data) && (@$Data['ver'] >= 2))) { continue; }
|
||||
if (!(is_array($Data) && (@$Data['ver'] >= 4))) { continue; }
|
||||
$Data = $Data['d'];
|
||||
|
||||
$Changed = false;
|
||||
@ -74,7 +74,7 @@
|
||||
$TotalSnatched=$Val;
|
||||
}
|
||||
if($Changed) {
|
||||
$Cache->cache_value('torrent_group_'.$GroupID, $Data, 0);
|
||||
$Cache->cache_value('torrent_group_'.$GroupID, array('ver'=>4,'d'=>$Data), 0);
|
||||
}
|
||||
unset($Data);
|
||||
}
|
||||
|
@ -734,6 +734,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
$LastMedia = '';
|
||||
|
||||
$EditionID = 0;
|
||||
unset($FirstUnknown);
|
||||
|
||||
foreach($Torrents as $TorrentID => $Data) {
|
||||
// All of the individual torrents in the group
|
||||
@ -828,10 +829,15 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($Data['Remastered'] && !$Data['RemasterYear']) {
|
||||
$FirstUnknown = !isset($FirstUnknown);
|
||||
}
|
||||
|
||||
if($CategoryID == 1 && ($Data['RemasterTitle'] != $LastRemasterTitle || $Data['RemasterYear'] != $LastRemasterYear ||
|
||||
$Data['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Data['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber) || $Data['Media'] != $LastMedia) {
|
||||
if($Data['RemasterTitle'] || $Data['RemasterYear'] || $Data['RemasterRecordLabel'] || $Data['RemasterCatalogueNumber']) {
|
||||
$EditionID++;
|
||||
$Data['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Data['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber) || $FirstUnknown || $Data['Media'] != $LastMedia) {
|
||||
$EditionID++;
|
||||
|
||||
if($Data['Remastered'] && $Data['RemastedYear'] != 0) {
|
||||
|
||||
$RemasterName = $Data['RemasterYear'];
|
||||
$AddExtra = " - ";
|
||||
@ -846,10 +852,14 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
$MasterName = "Original Release";
|
||||
$AddExtra = " / ";
|
||||
if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; }
|
||||
if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; }
|
||||
if (!$Data['Remastered']) {
|
||||
$MasterName = "Original Release";
|
||||
if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; }
|
||||
if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; }
|
||||
} else {
|
||||
$MasterName = "Unknown Release(s)";
|
||||
}
|
||||
$MasterName .= $AddExtra.display_str($Data['Media']);
|
||||
?>
|
||||
<tr class="group_torrent groupid_<?=$GroupID?> edition<? if (!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping']==1) { echo ' hidden'; }?>">
|
||||
|
@ -294,11 +294,7 @@ function filelist($Str) {
|
||||
$BadTags, $BadFolders, $BadFiles, $CassetteApproved, $LossymasterApproved, $LastReseedRequest, $LogInDB, $HasFile) = $Torrent;
|
||||
|
||||
if($Remastered && !$RemasterYear) {
|
||||
if(!isset($FirstUnknown)) {
|
||||
$FirstUnknown = true;
|
||||
} else {
|
||||
$FirstUnknown = false;
|
||||
}
|
||||
$FirstUnknown = !isset($FirstUnknown);
|
||||
}
|
||||
|
||||
$Reported = false;
|
||||
@ -397,24 +393,20 @@ function filelist($Str) {
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
$AddExtra = " / ";
|
||||
if(!$Remastered) {
|
||||
$MasterName = "Original Release";
|
||||
$AddExtra = " / ";
|
||||
if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; }
|
||||
if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; }
|
||||
$MasterName .= $AddExtra.display_str($Media);
|
||||
} else {
|
||||
$MasterName = "Unknown Release(s)";
|
||||
}
|
||||
$MasterName .= $AddExtra.display_str($Media);
|
||||
?>
|
||||
<tr class="releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition group_torrent">
|
||||
<td colspan="5" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?=$GroupID?>, <?=$EditionID?>, this, event)" title="Collapse this edition">−</a> <?=$MasterName?></strong></td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
?>
|
||||
<tr class="group_torrent">
|
||||
<td colspan="5" class="edition_info"><strong>Unknown Release(s)</strong></td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
}
|
||||
}
|
||||
$LastRemasterTitle = $RemasterTitle;
|
||||
|
@ -37,7 +37,6 @@
|
||||
include('search.php');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
include('edit.php');
|
||||
break;
|
||||
|
@ -1081,10 +1081,11 @@ function check_paranoia_here($Setting) {
|
||||
<tr>
|
||||
<td class="label">Disable:</td>
|
||||
<td>
|
||||
<input type="checkbox" name="DisableAvatar" id="DisableAvatar"<? if ($DisableAvatar==1) { ?>checked="checked"<? } ?> /> <label for="DisableAvatar">Avatar</label>
|
||||
<input type="checkbox" name="DisablePosting" id="DisablePosting"<? if ($DisablePosting==1) { ?>checked="checked"<? } ?> /> <label for="DisablePosting">Posting</label>
|
||||
<? if (check_perms('users_disable_any')) { ?> |
|
||||
<input type="checkbox" name="DisableAvatar" id="DisableAvatar"<? if ($DisableAvatar==1) { ?>checked="checked"<? } ?> /> <label for="DisableAvatar">Avatar</label> |
|
||||
<input type="checkbox" name="DisableInvites" id="DisableInvites"<? if ($DisableInvites==1) { ?>checked="checked"<? } ?> /> <label for="DisableInvites">Invites</label> |
|
||||
<input type="checkbox" name="DisablePosting" id="DisablePosting"<? if ($DisablePosting==1) { ?>checked="checked"<? } ?> /> <label for="DisablePosting">Posting</label> |
|
||||
|
||||
<input type="checkbox" name="DisableForums" id="DisableForums"<? if ($DisableForums==1) { ?>checked="checked"<? } ?> /> <label for="DisableForums">Forums</label> |
|
||||
<input type="checkbox" name="DisableTagging" id="DisableTagging"<? if ($DisableTagging==1) { ?>checked="checked"<? } ?> /> <label for="DisableTagging">Tagging</label> |
|
||||
<input type="checkbox" name="DisableRequests" id="DisableRequests"<? if ($DisableRequests==1) { ?>checked="checked"<? } ?> /> <label for="DisableRequests">Requests</label>
|
||||
|
@ -496,14 +496,18 @@ table[width="100%"] .colhead td,table[width="100%"] .colhead_dark td,.torrent_ta
|
||||
border: 1px solid #aeaeae !important;
|
||||
}
|
||||
|
||||
#bookmarks .torrent_table .colhead_dark td:nth-child(3) {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
#bookmarks .torrent_table .colhead_dark td:first-child, #bookmarks .torrent_table .colhead_dark td:nth-child(2) {
|
||||
width: 5%;
|
||||
}
|
||||
/*
|
||||
.torrent_table .colhead_dark td:first-child {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
#bookmarks .torrent_table .colhead_dark td:first-child {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
*/
|
||||
table[width="100%"] td:first-child,.torrent_table td:first-child,#requests td:first-child,#collages td:first-child,.forum_index td:first-child,#torrent_table td:first-child,table.border td:first-child,.linkbox+table td:first-child,form#messageform table td:first-child,#inbox form table td:first-child {
|
||||
border-left: 1px solid #aeaeae;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user