mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-22 10:08:31 -05:00
fix: ci
`featured` is both an attribute and a relation. Using `getAttribute`, we always prioritize the attribute, which seems to satisfy CI.
This commit is contained in:
@@ -319,12 +319,12 @@ class TorrentController extends BaseController
|
||||
|
||||
Unit3dAnnounce::addTorrent($torrent);
|
||||
|
||||
if ($torrent->featured) {
|
||||
if ($torrent->getAttribute('featured')) {
|
||||
Unit3dAnnounce::addFeaturedTorrent($torrent->id);
|
||||
}
|
||||
|
||||
// Set torrent to featured
|
||||
if ($torrent->featured == 1) {
|
||||
if ($torrent->getAttribute('featured')) {
|
||||
$featuredTorrent = new FeaturedTorrent();
|
||||
$featuredTorrent->user_id = $user->id;
|
||||
$featuredTorrent->torrent_id = $torrent->id;
|
||||
@@ -375,7 +375,7 @@ class TorrentController extends BaseController
|
||||
$user = $torrent->user;
|
||||
$username = $user->username;
|
||||
$anon = $torrent->anon;
|
||||
$featured = $torrent->featured;
|
||||
$featured = $torrent->getAttribute('featured');
|
||||
$free = $torrent->free;
|
||||
$doubleup = $torrent->doubleup;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user