mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-30 23:42:49 -05:00
Apply fixes from StyleCI
This commit is contained in:
@@ -26,7 +26,6 @@ use App\Repositories\TorrentFacetedRepository;
|
||||
|
||||
class RssController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* @var TorrentFacetedRepository
|
||||
*/
|
||||
@@ -384,6 +383,7 @@ class RssController extends Controller
|
||||
{
|
||||
$rss = auth()->user()->rss()->where('is_private', '=', 1)->findOrFail($id);
|
||||
$rss->delete();
|
||||
|
||||
return redirect()->route('rss.index.hash', ['hash' => 'private'])
|
||||
->with($this->toastr->success('RSS Feed Deleted!', 'Yay!', ['options']));
|
||||
}
|
||||
|
||||
@@ -217,6 +217,7 @@ class RssController extends Controller
|
||||
{
|
||||
$rss = auth()->user()->rss()->where('is_private', '=', 0)->findOrFail($id);
|
||||
$rss->delete();
|
||||
|
||||
return redirect()->route('Staff.rss.index')
|
||||
->with($this->toastr->success('RSS Feed Deleted!', 'Yay!', ['options']));
|
||||
}
|
||||
|
||||
@@ -872,13 +872,11 @@ class TorrentController extends Controller
|
||||
*/
|
||||
public function download($slug, $id, $rsskey = null)
|
||||
{
|
||||
|
||||
$user = auth()->user();
|
||||
if (!$user && $rsskey) {
|
||||
if (! $user && $rsskey) {
|
||||
$user = User::where('rsskey', '=', $rsskey)->firstOrFail();
|
||||
}
|
||||
|
||||
|
||||
$torrent = Torrent::withAnyStatus()->findOrFail($id);
|
||||
|
||||
// User's ratio is too low
|
||||
|
||||
@@ -81,6 +81,7 @@ class Rss extends Model
|
||||
// Went with attribute to avoid () calls in views. Uniform ->object_torrent vs ->json_torrent.
|
||||
if ($this->json_torrent) {
|
||||
$expected = $this->expected_fields;
|
||||
|
||||
return (object) array_merge($expected, $this->json_torrent);
|
||||
}
|
||||
|
||||
@@ -99,6 +100,7 @@ class Rss extends Model
|
||||
'mal' => null, 'categories' => null, 'types' => null, 'genres' => null, 'freeleech' => null,
|
||||
'doubleupload' => null, 'featured' => null, 'stream' => null, 'highspeed' => null, 'internal' => null,
|
||||
'alive' => null, 'dying' => null, 'dead' => null, 'sd' => null, ];
|
||||
|
||||
return $expected_fields;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user