From 22614e0cd5a35eb58f77a89e364fb8349b69a660 Mon Sep 17 00:00:00 2001 From: itismadness Date: Sat, 28 Aug 2021 06:40:32 +0000 Subject: [PATCH] Set musicInfo to null for JSON endpoints for non-music groups --- sections/ajax/request.php | 2 +- sections/ajax/torrentgroup.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sections/ajax/request.php b/sections/ajax/request.php index 4cd4ebf52..7af707225 100644 --- a/sections/ajax/request.php +++ b/sections/ajax/request.php @@ -116,7 +116,7 @@ 'bbDescription' => $Request['Description'], 'description' => Text::full_format($Request['Description']), 'musicInfo' => $CategoryName != "Music" - ? new stdClass : Requests::get_artist_by_type($requestId), + ? null : Requests::get_artist_by_type($requestId), 'catalogueNumber' => $Request['CatalogueNumber'], 'releaseType' => $Request['ReleaseType'], 'releaseTypeName' => $ReleaseName, diff --git a/sections/ajax/torrentgroup.php b/sections/ajax/torrentgroup.php index abf620a1a..94f73a76a 100644 --- a/sections/ajax/torrentgroup.php +++ b/sections/ajax/torrentgroup.php @@ -50,7 +50,7 @@ 'vanityHouse' => ($TorrentDetails['VanityHouse'] == 1), 'isBookmarked' => (new \Gazelle\Bookmark)->isTorrentBookmarked($Viewer->id(), $GroupID), 'musicInfo' => ($CategoryName != "Music") - ? [] + ? null : Artists::get_artist_by_type($GroupID), 'tags' => explode('|', $TorrentDetails['tagNames']), ];