mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 04:01:35 +00:00
Empty commit
This commit is contained in:
parent
c9a8095b5a
commit
c5e5105cca
@ -932,5 +932,26 @@ public static function edition_string(array $Torrent, array $Group) {
|
||||
}
|
||||
return $EditionName;
|
||||
}
|
||||
|
||||
//Used to get reports info on a unison cache in both browsing pages and torrent pages.
|
||||
public static function get_reports($TorrentID) {
|
||||
$Reports = G::$Cache->get_value("reports_torrent_$TorrentID");
|
||||
if ($Reports === false) {
|
||||
G::$DB->query("
|
||||
SELECT
|
||||
r.ID,
|
||||
r.ReporterID,
|
||||
r.Type,
|
||||
r.UserComment,
|
||||
r.ReportedTime
|
||||
FROM reportsv2 AS r
|
||||
WHERE TorrentID = $TorrentID
|
||||
AND Type != 'edited'
|
||||
AND Status != 'Resolved'");
|
||||
$Reports = G::$DB->to_array();
|
||||
G::$Cache->cache_value("reports_torrent_$TorrentID", $Reports, 0);
|
||||
}
|
||||
return $Reports;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -105,7 +105,7 @@
|
||||
'leechers' => (int)$Torrent['Leechers'],
|
||||
'snatched' => (int)$Torrent['Snatched'],
|
||||
'freeTorrent' => ($Torrent['FreeTorrent'] == 1),
|
||||
'reported' => $Torrent['Reported'],
|
||||
'reported' => (count(Torrents::get_reports((int)$Torrent['ID'])) > 0),
|
||||
'time' => $Torrent['Time']
|
||||
);
|
||||
}
|
||||
|
@ -83,7 +83,7 @@
|
||||
|
||||
$Torrent = $TorrentList[$TorrentID];
|
||||
|
||||
$Reports = get_reports($TorrentID);
|
||||
$Reports = Torrents::get_reports($TorrentID);
|
||||
if (count($Reports) > 0) {
|
||||
$Torrent['Reported'] = true;
|
||||
} else {
|
||||
|
@ -86,7 +86,7 @@
|
||||
unset($File);
|
||||
$FileList = implode('|||', $FileList);
|
||||
$Userinfo = Users::user_info($Torrent['UserID']);
|
||||
$Reports = get_reports($Torrent['ID']);
|
||||
$Reports = Torrents::get_reports($Torrent['ID']);
|
||||
if (count($Reports) > 0) {
|
||||
$Torrent['Reported'] = true;
|
||||
} else {
|
||||
|
@ -171,13 +171,13 @@
|
||||
?>
|
||||
<input type="text" id="artist" name="artists[]" <? Users::has_autocomplete_enabled('other'); ?> size="45" value="<?=display_str($Artist['name']) ?>" />
|
||||
<select id="importance" name="importance[]" >
|
||||
<option value="1"<?=($Importance === '1' ? ' selected="selected"' : '')?>>Main</option>
|
||||
<option value="2"<?=($Importance === '2' ? ' selected="selected"' : '')?>>Guest</option>
|
||||
<option value="4"<?=($Importance === '4' ? ' selected="selected"' : '')?>>Composer</option>
|
||||
<option value="5"<?=($Importance === '5' ? ' selected="selected"' : '')?>>Conductor</option>
|
||||
<option value="6"<?=($Importance === '6' ? ' selected="selected"' : '')?>>DJ / Compiler</option>
|
||||
<option value="3"<?=($Importance === '3' ? ' selected="selected"' : '')?>>Remixer</option>
|
||||
<option value="7"<?=($Importance === '7' ? ' selected="selected"' : '')?>>Producer</option>
|
||||
<option value="1"<?=($Importance == '1' ? ' selected="selected"' : '')?>>Main</option>
|
||||
<option value="2"<?=($Importance == '2' ? ' selected="selected"' : '')?>>Guest</option>
|
||||
<option value="4"<?=($Importance == '4' ? ' selected="selected"' : '')?>>Composer</option>
|
||||
<option value="5"<?=($Importance == '5' ? ' selected="selected"' : '')?>>Conductor</option>
|
||||
<option value="6"<?=($Importance == '6' ? ' selected="selected"' : '')?>>DJ / Compiler</option>
|
||||
<option value="3"<?=($Importance == '3' ? ' selected="selected"' : '')?>>Remixer</option>
|
||||
<option value="7"<?=($Importance == '7' ? ' selected="selected"' : '')?>>Producer</option>
|
||||
</select>
|
||||
<? if ($First) { ?><a href="#" onclick="AddArtistField(); return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField(); return false;" class="brackets">−</a><? } $First = false; ?>
|
||||
<br />
|
||||
|
@ -538,7 +538,7 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
|
||||
|
||||
//Get report info, use the cache if available, if not, add to it.
|
||||
$Reported = false;
|
||||
$Reports = get_reports($TorrentID);
|
||||
$Reports = Torrents::get_reports($TorrentID);
|
||||
if (count($Reports) > 0) {
|
||||
$Reported = true;
|
||||
}
|
||||
|
@ -250,7 +250,7 @@
|
||||
foreach ($Torrents as $TorrentID => $Torrent) :
|
||||
//Get report info, use the cache if available, if not, add to it.
|
||||
$Reported = false;
|
||||
$Reports = get_reports($TorrentID);
|
||||
$Reports = Torrents::get_reports($TorrentID);
|
||||
if (count($Reports) > 0) {
|
||||
$Reported = true;
|
||||
}
|
||||
|
@ -1071,7 +1071,7 @@ function header_link($SortKey, $DefaultWay = 'desc') {
|
||||
|
||||
//Get report info for each torrent, use the cache if available, if not, add to it.
|
||||
$Reported = false;
|
||||
$Reports = get_reports($TorrentID);
|
||||
$Reports = Torrents::get_reports($TorrentID);
|
||||
if (count($Reports) > 0) {
|
||||
$Reported = true;
|
||||
}
|
||||
|
@ -259,28 +259,6 @@ function get_group_requests($GroupID) {
|
||||
return $Requests['matches'];
|
||||
}
|
||||
|
||||
//Used to get reports info on a unison cache in both browsing pages and torrent pages.
|
||||
function get_reports($TorrentID) {
|
||||
global $Cache, $DB;
|
||||
$Reports = $Cache->get_value("reports_torrent_$TorrentID");
|
||||
if ($Reports === false) {
|
||||
$DB->query("
|
||||
SELECT
|
||||
r.ID,
|
||||
r.ReporterID,
|
||||
r.Type,
|
||||
r.UserComment,
|
||||
r.ReportedTime
|
||||
FROM reportsv2 AS r
|
||||
WHERE TorrentID = $TorrentID
|
||||
AND Type != 'edited'
|
||||
AND Status != 'Resolved'");
|
||||
$Reports = $DB->to_array();
|
||||
$Cache->cache_value("reports_torrent_$TorrentID", $Reports, 0);
|
||||
}
|
||||
return $Reports;
|
||||
}
|
||||
|
||||
//Used by both sections/torrents/details.php and sections/reportsv2/report.php
|
||||
function build_torrents_table($Cache, $DB, $LoggedUser, $GroupID, $GroupName, $GroupCategoryID, $ReleaseType, $TorrentList, $Types, $Text, $Username, $ReportedTimes) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user