From 8c71e1fb9a0c252dfcfd4ae7ee914c1b310e9998 Mon Sep 17 00:00:00 2001 From: Ivailo Karamanolev Date: Thu, 18 Sep 2014 18:03:34 -0400 Subject: [PATCH] Add tags without AS alias. --- sections/ajax/torrent.php | 5 ++++- sections/ajax/torrentgroup.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sections/ajax/torrent.php b/sections/ajax/torrent.php index 67d51114..dedafeea 100644 --- a/sections/ajax/torrent.php +++ b/sections/ajax/torrent.php @@ -62,6 +62,8 @@ $JsonMusicInfo = null; } +$TagList = explode('|', $TorrentDetails['GROUP_CONCAT(DISTINCT tags.Name SEPARATOR \'|\')']); + $JsonTorrentDetails = array( 'wikiBody' => Text::full_format($TorrentDetails['WikiBody']), 'wikiImage' => $TorrentDetails['WikiImage'], @@ -76,7 +78,8 @@ 'time' => $TorrentDetails['Time'], 'vanityHouse' => $TorrentDetails['VanityHouse'] == 1, 'isBookmarked' => Bookmarks::has_bookmarked('torrent', $GroupID), - 'musicInfo' => $JsonMusicInfo + 'musicInfo' => $JsonMusicInfo, + 'tags' => $TagList ); $Torrent = $TorrentList[$TorrentID]; diff --git a/sections/ajax/torrentgroup.php b/sections/ajax/torrentgroup.php index 336ac82a..e95658cd 100644 --- a/sections/ajax/torrentgroup.php +++ b/sections/ajax/torrentgroup.php @@ -56,6 +56,8 @@ $JsonMusicInfo = null; } +$TagList = explode('|', $TorrentDetails['GROUP_CONCAT(DISTINCT tags.Name SEPARATOR \'|\')']); + $JsonTorrentDetails = array( 'wikiBody' => Text::full_format($TorrentDetails['WikiBody']), 'wikiImage' => $TorrentDetails['WikiImage'], @@ -70,7 +72,8 @@ 'time' => $TorrentDetails['Time'], 'vanityHouse' => ($TorrentDetails['VanityHouse'] == 1), 'isBookmarked' => Bookmarks::has_bookmarked('torrent', $GroupID), - 'musicInfo' => $JsonMusicInfo + 'musicInfo' => $JsonMusicInfo, + 'tags' => $TagList ); $JsonTorrentList = array();