mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 02:46:30 +00:00
Empty commit
This commit is contained in:
parent
779df50017
commit
985a8769a4
@ -45,7 +45,7 @@ public static function update_sphinx_requests($RequestID) {
|
|||||||
WHERE ID = $RequestID");
|
WHERE ID = $RequestID");
|
||||||
G::$DB->set_query_id($QueryID);
|
G::$DB->set_query_id($QueryID);
|
||||||
|
|
||||||
G::$Cache->delete_value("requests_$RequestID");
|
G::$Cache->delete_value("request_$RequestID");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,7 +173,11 @@ function compare($X, $Y) {
|
|||||||
$JsonTorrents = array();
|
$JsonTorrents = array();
|
||||||
$Tags = array();
|
$Tags = array();
|
||||||
$NumTorrents = $NumSeeders = $NumLeechers = $NumSnatches = 0;
|
$NumTorrents = $NumSeeders = $NumLeechers = $NumSnatches = 0;
|
||||||
foreach ($TorrentList as $GroupID => $Group) {
|
foreach ($GroupIDs as $GroupID) {
|
||||||
|
if (!isset($TorrentList[$GroupID])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$Group = $TorrentList[$GroupID];
|
||||||
extract(Torrents::array_group($Group));
|
extract(Torrents::array_group($Group));
|
||||||
|
|
||||||
foreach ($Artists as &$Artist) {
|
foreach ($Artists as &$Artist) {
|
||||||
|
@ -19,7 +19,11 @@
|
|||||||
$Results = Torrents::get_groups(array_keys($GroupIDs));
|
$Results = Torrents::get_groups(array_keys($GroupIDs));
|
||||||
|
|
||||||
$JsonResults = array();
|
$JsonResults = array();
|
||||||
foreach ($Results as $GroupID => $Group) {
|
foreach ($GroupIDs as $GroupID) {
|
||||||
|
if (!isset($Results[$GroupID])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$Group = $Results[$GroupIDs];
|
||||||
extract(Torrents::array_group($Group));
|
extract(Torrents::array_group($Group));
|
||||||
$FlacID = $GroupIDs[$GroupID]['TorrentID'];
|
$FlacID = $GroupIDs[$GroupID]['TorrentID'];
|
||||||
|
|
||||||
|
@ -29,45 +29,49 @@ function compare($X, $Y) {
|
|||||||
|
|
||||||
$JsonBookmarks = array();
|
$JsonBookmarks = array();
|
||||||
|
|
||||||
list(, $CollageDataList, $TorrentList) = Users::get_bookmarks($UserID);
|
list($GroupIDs, $CollageDataList, $GroupList) = Users::get_bookmarks($UserID);
|
||||||
foreach ($TorrentList as $Torrent) {
|
foreach($GroupIDs as $GroupID) {
|
||||||
|
if (!isset($GroupList[$GroupID])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$Group = $GroupList[$GroupID];
|
||||||
$JsonTorrents = array();
|
$JsonTorrents = array();
|
||||||
foreach ($Torrent['Torrents'] as $GroupTorrents) {
|
foreach ($Group['Torrents'] as $Torrent) {
|
||||||
$JsonTorrents[] = array(
|
$JsonTorrents[] = array(
|
||||||
'id' => (int)$GroupTorrents['ID'],
|
'id' => (int)$Torrent['ID'],
|
||||||
'groupId' => (int)$GroupTorrents['GroupID'],
|
'groupId' => (int)$Torrent['GroupID'],
|
||||||
'media' => $GroupTorrents['Media'],
|
'media' => $Torrent['Media'],
|
||||||
'format' => $GroupTorrents['Format'],
|
'format' => $Torrent['Format'],
|
||||||
'encoding' => $GroupTorrents['Encoding'],
|
'encoding' => $Torrent['Encoding'],
|
||||||
'remasterYear' => (int)$GroupTorrents['RemasterYear'],
|
'remasterYear' => (int)$Torrent['RemasterYear'],
|
||||||
'remastered' => $GroupTorrents['Remastered'] == 1,
|
'remastered' => $Torrent['Remastered'] == 1,
|
||||||
'remasterTitle' => $GroupTorrents['RemasterTitle'],
|
'remasterTitle' => $Torrent['RemasterTitle'],
|
||||||
'remasterRecordLabel' => $GroupTorrents['RemasterRecordLabel'],
|
'remasterRecordLabel' => $Torrent['RemasterRecordLabel'],
|
||||||
'remasterCatalogueNumber' => $GroupTorrents['RemasterCatalogueNumber'],
|
'remasterCatalogueNumber' => $Torrent['RemasterCatalogueNumber'],
|
||||||
'scene' => $GroupTorrents['Scene'] == 1,
|
'scene' => $Torrent['Scene'] == 1,
|
||||||
'hasLog' => $GroupTorrents['HasLog'] == 1,
|
'hasLog' => $Torrent['HasLog'] == 1,
|
||||||
'hasCue' => $GroupTorrents['HasCue'] == 1,
|
'hasCue' => $Torrent['HasCue'] == 1,
|
||||||
'logScore' => (float)$GroupTorrents['LogScore'],
|
'logScore' => (float)$Torrent['LogScore'],
|
||||||
'fileCount' => (int)$GroupTorrents['FileCount'],
|
'fileCount' => (int)$Torrent['FileCount'],
|
||||||
'freeTorrent' => $GroupTorrents['FreeTorrent'] == 1,
|
'freeTorrent' => $Torrent['FreeTorrent'] == 1,
|
||||||
'size' => (float)$GroupTorrents['Size'],
|
'size' => (float)$Torrent['Size'],
|
||||||
'leechers' => (int)$GroupTorrents['Leechers'],
|
'leechers' => (int)$Torrent['Leechers'],
|
||||||
'seeders' => (int)$GroupTorrents['Seeders'],
|
'seeders' => (int)$Torrent['Seeders'],
|
||||||
'snatched' => (int)$GroupTorrents['Snatched'],
|
'snatched' => (int)$Torrent['Snatched'],
|
||||||
'time' => $GroupTorrents['Time'],
|
'time' => $Torrent['Time'],
|
||||||
'hasFile' => (int)$GroupTorrents['HasFile']
|
'hasFile' => (int)$Torrent['HasFile']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$JsonBookmarks[] = array(
|
$JsonBookmarks[] = array(
|
||||||
'id' => (int)$Torrent['ID'],
|
'id' => (int)$Group['ID'],
|
||||||
'name' => $Torrent['Name'],
|
'name' => $Group['Name'],
|
||||||
'year' => (int)$Torrent['Year'],
|
'year' => (int)$Group['Year'],
|
||||||
'recordLabel' => $Torrent['RecordLabel'],
|
'recordLabel' => $Group['RecordLabel'],
|
||||||
'catalogueNumber' => $Torrent['CatalogueNumber'],
|
'catalogueNumber' => $Group['CatalogueNumber'],
|
||||||
'tagList' => $Torrent['TagList'],
|
'tagList' => $Group['TagList'],
|
||||||
'releaseType' => $Torrent['ReleaseType'],
|
'releaseType' => $Group['ReleaseType'],
|
||||||
'vanityHouse' => $Torrent['VanityHouse'] == 1,
|
'vanityHouse' => $Group['VanityHouse'] == 1,
|
||||||
'image' => $CollageDataList[$Torrent['ID']]['WikiImage'],
|
'image' => $Group['WikiImage'],
|
||||||
'torrents' => $JsonTorrents
|
'torrents' => $JsonTorrents
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,11 @@
|
|||||||
<td>Torrent</td>
|
<td>Torrent</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?
|
<?
|
||||||
foreach ($Results as $GroupID => $Group) {
|
foreach ($GroupIDs as $GroupID) {
|
||||||
|
if (!isset($Results[$GroupID])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$Group = $Results[$GroupID];
|
||||||
extract(Torrents::array_group($Group));
|
extract(Torrents::array_group($Group));
|
||||||
$TorrentTags = new Tags($TagList);
|
$TorrentTags = new Tags($TagList);
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
$EditType = isset($_GET['type']) ? $_GET['type'] : 'torrents';
|
$EditType = isset($_GET['type']) ? $_GET['type'] : 'torrents';
|
||||||
|
|
||||||
list(, $CollageDataList, $TorrentList) = Users::get_bookmarks($UserID);
|
list(, $CollageDataList, $TorrentList) = Users::get_bookmarks($UserID); // TODO: $TorrentList might not have the correct order, use the $GroupIDs instead
|
||||||
|
|
||||||
$TT = new MASS_USER_TORRENTS_TABLE_VIEW($TorrentList, $CollageDataList, $EditType, 'Organize Torrent Bookmarks');
|
$TT = new MASS_USER_TORRENTS_TABLE_VIEW($TorrentList, $CollageDataList, $EditType, 'Organize Torrent Bookmarks');
|
||||||
$TT->render_all();
|
$TT->render_all();
|
||||||
|
@ -36,8 +36,12 @@ function compare($X, $Y) {
|
|||||||
$NumGroups = 0;
|
$NumGroups = 0;
|
||||||
$ArtistCount = array();
|
$ArtistCount = array();
|
||||||
|
|
||||||
list(, $CollageDataList, $TorrentList) = Users::get_bookmarks($UserID);
|
list($GroupIDs, $CollageDataList, $TorrentList) = Users::get_bookmarks($UserID);
|
||||||
foreach ($TorrentList as $GroupID => $Group) {
|
foreach ($GroupIDs as $GroupID) {
|
||||||
|
if (!isset($TorrentList[$GroupID])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$Group = $TorrentList[$GroupID];
|
||||||
extract(Torrents::array_group($Group));
|
extract(Torrents::array_group($Group));
|
||||||
list(, $Sort, $AddedTime) = array_values($CollageDataList[$GroupID]);
|
list(, $Sort, $AddedTime) = array_values($CollageDataList[$GroupID]);
|
||||||
|
|
||||||
|
@ -80,7 +80,11 @@
|
|||||||
<?
|
<?
|
||||||
|
|
||||||
$Number = 0;
|
$Number = 0;
|
||||||
foreach ($TorrentList as $GroupID => $Group) {
|
foreach ($GroupIDs as $GroupID) {
|
||||||
|
if (!isset($TorrentList[$GroupID])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$Group = $TorrentList[$GroupID];
|
||||||
extract(Torrents::array_group($Group));
|
extract(Torrents::array_group($Group));
|
||||||
list(, $UserID, $Username, $Sort, $CatNum) = array_values($CollageDataList[$GroupID]);
|
list(, $UserID, $Username, $Sort, $CatNum) = array_values($CollageDataList[$GroupID]);
|
||||||
|
|
||||||
|
@ -34,7 +34,11 @@ function compare($X, $Y) {
|
|||||||
$UserAdditions = array();
|
$UserAdditions = array();
|
||||||
$Number = 0;
|
$Number = 0;
|
||||||
|
|
||||||
foreach ($TorrentList as $GroupID => $Group) {
|
foreach ($GroupIDs as $GroupID) {
|
||||||
|
if (!isset($TorrentList[$GroupID])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$Group = $TorrentList[$GroupID];
|
||||||
extract(Torrents::array_group($Group));
|
extract(Torrents::array_group($Group));
|
||||||
$UserID = $Contributors[$GroupID];
|
$UserID = $Contributors[$GroupID];
|
||||||
$TorrentTags = new Tags($TagList);
|
$TorrentTags = new Tags($TagList);
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
ORDER BY Time DESC
|
ORDER BY Time DESC
|
||||||
LIMIT 20");
|
LIMIT 20");
|
||||||
$Blog = $DB->to_array();
|
$Blog = $DB->to_array();
|
||||||
$Cache->cache_value('Blog', $Blog, 1209600);
|
$Cache->cache_value('blog', $Blog, 1209600);
|
||||||
}
|
}
|
||||||
foreach ($Blog as $BlogItem) {
|
foreach ($Blog as $BlogItem) {
|
||||||
list($BlogID, $Author, $AuthorID, $Title, $Body, $BlogTime, $ThreadID) = $BlogItem;
|
list($BlogID, $Author, $AuthorID, $Title, $Body, $BlogTime, $ThreadID) = $BlogItem;
|
||||||
|
@ -46,7 +46,11 @@
|
|||||||
|
|
||||||
$Groups = Torrents::get_groups($Top10Groups, true, true, false);
|
$Groups = Torrents::get_groups($Top10Groups, true, true, false);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($Groups as $MatchGroupID => $MatchGroup) {
|
foreach ($Top10Groups as $MatchGroupID) {
|
||||||
|
if (!isset($Groups[$MatchGroupID])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$MatchGroup = $Groups[$MatchGroupID];
|
||||||
$i++;
|
$i++;
|
||||||
$Str = Artists::display_artists($MatchGroup['ExtendedArtists']).'<a href="torrents.php?id='.$MatchGroupID.'">'.$MatchGroup['Name'].'</a>';
|
$Str = Artists::display_artists($MatchGroup['ExtendedArtists']).'<a href="torrents.php?id='.$MatchGroupID.'">'.$MatchGroup['Name'].'</a>';
|
||||||
?>
|
?>
|
||||||
|
@ -424,14 +424,14 @@
|
|||||||
|| (check_perms('users_edit_own_ratio') && $UserID == $LoggedUser['ID']))) {
|
|| (check_perms('users_edit_own_ratio') && $UserID == $LoggedUser['ID']))) {
|
||||||
$UpdateSet[] = "Uploaded = '$Uploaded'";
|
$UpdateSet[] = "Uploaded = '$Uploaded'";
|
||||||
$EditSummary[] = "uploaded changed from ".Format::get_size($Cur['Uploaded']).' to '.Format::get_size($Uploaded);
|
$EditSummary[] = "uploaded changed from ".Format::get_size($Cur['Uploaded']).' to '.Format::get_size($Uploaded);
|
||||||
$Cache->delete_value("users_stats_$UserID");
|
$Cache->delete_value("user_stats_$UserID");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Downloaded != $Cur['Downloaded'] && $Downloaded != $_POST['OldDownloaded'] && (check_perms('users_edit_ratio')
|
if ($Downloaded != $Cur['Downloaded'] && $Downloaded != $_POST['OldDownloaded'] && (check_perms('users_edit_ratio')
|
||||||
|| (check_perms('users_edit_own_ratio') && $UserID == $LoggedUser['ID']))) {
|
|| (check_perms('users_edit_own_ratio') && $UserID == $LoggedUser['ID']))) {
|
||||||
$UpdateSet[] = "Downloaded = '$Downloaded'";
|
$UpdateSet[] = "Downloaded = '$Downloaded'";
|
||||||
$EditSummary[] = "downloaded changed from ".Format::get_size($Cur['Downloaded']).' to '.Format::get_size($Downloaded);
|
$EditSummary[] = "downloaded changed from ".Format::get_size($Cur['Downloaded']).' to '.Format::get_size($Downloaded);
|
||||||
$Cache->delete_value("users_stats_$UserID");
|
$Cache->delete_value("user_stats_$UserID");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($FLTokens != $Cur['FLTokens'] && (check_perms('users_edit_ratio') || (check_perms('users_edit_own_ratio') && $UserID == $LoggedUser['ID']))) {
|
if ($FLTokens != $Cur['FLTokens'] && (check_perms('users_edit_ratio') || (check_perms('users_edit_own_ratio') && $UserID == $LoggedUser['ID']))) {
|
||||||
@ -714,8 +714,8 @@
|
|||||||
$UpdateSet[] = "Uploaded = Uploaded + '$MergeUploaded'";
|
$UpdateSet[] = "Uploaded = Uploaded + '$MergeUploaded'";
|
||||||
$UpdateSet[] = "Downloaded = Downloaded + '$MergeDownloaded'";
|
$UpdateSet[] = "Downloaded = Downloaded + '$MergeDownloaded'";
|
||||||
$EditSummary[] = 'stats merged from '.site_url()."user.php?id=$MergeID ($MergeStatsFrom) (previous stats: Uploaded: ".Format::get_size($Cur['Uploaded']).', Downloaded: '.Format::get_size($Cur['Downloaded']).', Ratio: '.Format::get_ratio($Cur['Uploaded'], $Cur['Downloaded']).')';
|
$EditSummary[] = 'stats merged from '.site_url()."user.php?id=$MergeID ($MergeStatsFrom) (previous stats: Uploaded: ".Format::get_size($Cur['Uploaded']).', Downloaded: '.Format::get_size($Cur['Downloaded']).', Ratio: '.Format::get_ratio($Cur['Uploaded'], $Cur['Downloaded']).')';
|
||||||
$Cache->delete_value("users_stats_$UserID");
|
$Cache->delete_value("user_stats_$UserID");
|
||||||
$Cache->delete_value("users_stats_$MergeID");
|
$Cache->delete_value("user_stats_$MergeID");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,11 @@
|
|||||||
$Artists = Artists::get_artists($GroupIDs);
|
$Artists = Artists::get_artists($GroupIDs);
|
||||||
$Number = 0;
|
$Number = 0;
|
||||||
|
|
||||||
foreach ($TorrentList as $GroupID => $Group) {
|
foreach ($GroupIDs as $GroupID) {
|
||||||
|
if (!isset($TorrentList[$GroupID])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$Group = $TorrentList[$GroupID];
|
||||||
extract(Torrents::array_group($Group));
|
extract(Torrents::array_group($Group));
|
||||||
|
|
||||||
$DisplayName = '';
|
$DisplayName = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user