From 97fb9c4752fcfa2582d0df6cbb1745555576b654 Mon Sep 17 00:00:00 2001 From: Hyleus Date: Thu, 4 Jan 2018 21:45:40 +0100 Subject: [PATCH 1/2] Fix typo --- app/Http/Controllers/AnnounceController.php | 2 +- app/Http/Controllers/BonusController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/AnnounceController.php b/app/Http/Controllers/AnnounceController.php index 105527f77f..49e293ed80 100644 --- a/app/Http/Controllers/AnnounceController.php +++ b/app/Http/Controllers/AnnounceController.php @@ -86,7 +86,7 @@ public function announce(Request $request, $passkey) $ipv6 = $request->has('ipv6') ? bin2hex($request->get('ipv6')) : null; $no_peer_id = ($request->has('no_peer_id') && $request->get('no_peer_id') == 1) ? true : false; - // If User Client Is Sending Negitive Values Return Error to Client + // If User Client Is Sending Negative Values Return Error to Client if ($uploaded < 0 || $downloaded < 0 || $left < 0) { return response(Bencode::bencode(['failure reason' => 'Data from client is negative']), 200, ['Content-Type' => 'text/plain']); } diff --git a/app/Http/Controllers/BonusController.php b/app/Http/Controllers/BonusController.php index 1d8f4adffb..8b1db8285d 100755 --- a/app/Http/Controllers/BonusController.php +++ b/app/Http/Controllers/BonusController.php @@ -260,7 +260,7 @@ public function tipUploader($slug, $id) return Redirect::route('torrent', ['slug' => $torrent->slug, 'id' => $torrent->id])->with(Toastr::error('You Cannot Tip Yourself!', 'Bro!', ['options'])); } if ($tip_amount <= 0) { - return Redirect::route('torrent', ['slug' => $torrent->slug, 'id' => $torrent->id])->with(Toastr::error('You Cannot Tip A Negitive Amount!', 'Bro!', ['options'])); + return Redirect::route('torrent', ['slug' => $torrent->slug, 'id' => $torrent->id])->with(Toastr::error('You Cannot Tip A Negative Amount!', 'Bro!', ['options'])); } $uploader->seedbonus += $tip_amount; $uploader->save(); From 492c0ec0be4181f5c0c3a0ae86b90a04f5c34caf Mon Sep 17 00:00:00 2001 From: Hyleus Date: Thu, 4 Jan 2018 23:48:29 +0100 Subject: [PATCH 2/2] Fix message for tip amount --- app/Http/Controllers/BonusController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/BonusController.php b/app/Http/Controllers/BonusController.php index 8b1db8285d..e8f95413ce 100755 --- a/app/Http/Controllers/BonusController.php +++ b/app/Http/Controllers/BonusController.php @@ -259,7 +259,7 @@ public function tipUploader($slug, $id) if ($user->id == $torrent->user_id) { return Redirect::route('torrent', ['slug' => $torrent->slug, 'id' => $torrent->id])->with(Toastr::error('You Cannot Tip Yourself!', 'Bro!', ['options'])); } - if ($tip_amount <= 0) { + if ($tip_amount < 0) { return Redirect::route('torrent', ['slug' => $torrent->slug, 'id' => $torrent->id])->with(Toastr::error('You Cannot Tip A Negative Amount!', 'Bro!', ['options'])); } $uploader->seedbonus += $tip_amount;