mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-02 16:29:49 -05:00
Apply fixes from StyleCI
This commit is contained in:
@@ -724,13 +724,13 @@ class TorrentController extends Controller
|
||||
$torrent = Torrent::withAnyStatus()->findOrFail($id);
|
||||
$hasHistory = $user->history()->where([['info_hash', '=', $torrent->info_hash], ['seeder', '=', 1]])->count();
|
||||
// User's ratio is too low
|
||||
if ($user->getRatio() < \config('other.ratio') && ! ($torrent->user_id === $user->id || $hasHistory ) ) {
|
||||
if ($user->getRatio() < \config('other.ratio') && ! ($torrent->user_id === $user->id || $hasHistory)) {
|
||||
return \to_route('torrent', ['id' => $torrent->id])
|
||||
->withErrors('Your Ratio Is Too Low To Download!');
|
||||
}
|
||||
|
||||
// User's download rights are revoked
|
||||
if ($user->can_download == 0 && ! ($torrent->user_id === $user->id || $hasHistory ) ) {
|
||||
if ($user->can_download == 0 && ! ($torrent->user_id === $user->id || $hasHistory)) {
|
||||
return \to_route('torrent', ['id' => $torrent->id])
|
||||
->withErrors('Your Download Rights Have Been Revoked!');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user