diff --git a/app/Http/Controllers/Moderation/TicketsController.php b/app/Http/Controllers/Moderation/TicketsController.php index 7a9139d2..ac08ba08 100644 --- a/app/Http/Controllers/Moderation/TicketsController.php +++ b/app/Http/Controllers/Moderation/TicketsController.php @@ -117,9 +117,7 @@ class TicketsController extends Controller } public function blacklist() { - $users = User::paginate(); - $ticketcategories = TicketCategory::all(); - return view("moderator.ticket.blacklist", compact("users", "ticketcategories")); + return view("moderator.ticket.blacklist"); } public function blacklistAdd(Request $request) { diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/ServerController.php index 36155514..28242206 100644 --- a/app/Http/Controllers/ServerController.php +++ b/app/Http/Controllers/ServerController.php @@ -257,6 +257,7 @@ class ServerController extends Controller public function upgrade(Server $server, Request $request) { + if($server->user_id != Auth::user()->id) return redirect()->route('servers.index'); if(!isset($request->product_upgrade)) { return redirect()->route('servers.show', ['server' => $server->id])->with('error', __('this product is the only one')); diff --git a/app/Http/Controllers/TicketsController.php b/app/Http/Controllers/TicketsController.php index f764da11..8bb21a66 100644 --- a/app/Http/Controllers/TicketsController.php +++ b/app/Http/Controllers/TicketsController.php @@ -31,7 +31,7 @@ class TicketsController extends Controller public function create() { #check in blacklist $check = TicketBlacklist::where('user_id', Auth::user()->id)->first(); - if($check->status == "True"){ + if($check && $check->status == "True"){ return redirect()->route('ticket.index')->with('error', __("You can't make a ticket because you're on the blacklist for a reason: '" . $check->reason . "', please contact the administrator")); } $ticketcategories = TicketCategory::all(); @@ -73,7 +73,7 @@ class TicketsController extends Controller public function reply(Request $request) { #check in blacklist $check = TicketBlacklist::where('user_id', Auth::user()->id)->first(); - if($check->status == "True"){ + if($check && $check->status == "True"){ return redirect()->route('ticket.index')->with('error', __("You can't reply a ticket because you're on the blacklist for a reason: '" . $check->reason . "', please contact the administrator")); } $this->validate($request, array("ticketcomment" => "required")); diff --git a/resources/views/moderator/ticket/blacklist.blade.php b/resources/views/moderator/ticket/blacklist.blade.php index a1c2c2c1..2a8d8f2a 100644 --- a/resources/views/moderator/ticket/blacklist.blade.php +++ b/resources/views/moderator/ticket/blacklist.blade.php @@ -69,9 +69,6 @@
@@ -112,10 +109,73 @@ }); }); - @endsection diff --git a/resources/views/servers/settings.blade.php b/resources/views/servers/settings.blade.php index 9901e6c2..7607de10 100644 --- a/resources/views/servers/settings.blade.php +++ b/resources/views/servers/settings.blade.php @@ -251,7 +251,7 @@

-
+ @csrf