Skip to content

Commit

Permalink
Set musicInfo to null for JSON endpoints for non-music groups
Browse files Browse the repository at this point in the history
  • Loading branch information
itismadness committed Oct 4, 2021
1 parent 97e989c commit 22614e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sections/ajax/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion sections/ajax/torrentgroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
];
Expand Down

0 comments on commit 22614e0

Please sign in to comment.