|
@@ -47,7 +47,26 @@ class FEED {
|
47
|
47
|
global $Cache;
|
48
|
48
|
$Entries = $Cache->get_value($CacheKey);
|
49
|
49
|
if (!$Entries) {
|
50
|
|
- $Entries = [];
|
|
50
|
+ require(SERVER_ROOT.'/classes/mysql.class.php');
|
|
51
|
+ $DB = NEW DB_MYSQL; //Load the database wrapper
|
|
52
|
+
|
|
53
|
+ $DB->query("
|
|
54
|
+ SELECT t.*,
|
|
55
|
+ (SELECT Name from artists_group ag WHERE ag.ArtistID=ta.ArtistID) AS ArtistName,
|
|
56
|
+ tg.Name AS GroupName,
|
|
57
|
+ tg.WikiBody AS WikiBody
|
|
58
|
+ FROM `torrents` t
|
|
59
|
+ LEFT JOIN torrents_artists ta ON t.GroupID=ta.GroupID
|
|
60
|
+ LEFT JOIN torrents_group tg ON tg.ID=ta.GroupID
|
|
61
|
+ ORDER BY ID DESC
|
|
62
|
+ LIMIT 50");
|
|
63
|
+ while ($torrent = $DB->next_record()) {
|
|
64
|
+ $Title = $torrent['ArtistName'].' - '.$torrent['GroupName'].' - '.$torrent['Recorded'].' | '.$torrent['Codec'].' / '.$torrent['Media'].' / '.$torrent['Container'].' / '.$torrent['Resolution'].' / '.$torrent['AudioFormat'];
|
|
65
|
+
|
|
66
|
+ $Item = self::item($Title, Text::strip_bbcode($torrent['WikiBody']), 'torrents.php?action=download&authkey=[[AUTHKEY]]&torrent_pass=[[PASSKEY]]&id='.$torrent['ID'], $torrent['UserID'], 'torrents.php?id='.$torrent['GroupID']);
|
|
67
|
+ self::populate('torrents_all', $Item);
|
|
68
|
+ echo str_replace(array('[[PASSKEY]]', '[[AUTHKEY]]'), array(display_str($PassKey), display_str($AuthKey)), $Item);
|
|
69
|
+ }
|
51
|
70
|
} else {
|
52
|
71
|
foreach ($Entries as $Item) {
|
53
|
72
|
echo str_replace(array('[[PASSKEY]]', '[[AUTHKEY]]'), array(display_str($PassKey), display_str($AuthKey)), $Item);
|