From 0ed5ea12feb5835caeaa6e29bc795e41b4e20b0c Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 2 Nov 2023 18:16:22 +0100 Subject: [PATCH] fixed --- web/pages/tournaments/controller.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/pages/tournaments/controller.php b/web/pages/tournaments/controller.php index 40dd42e..9492488 100644 --- a/web/pages/tournaments/controller.php +++ b/web/pages/tournaments/controller.php @@ -150,8 +150,14 @@ class Tournaments extends Page { else { $t = new Tournament(); + + if($id) { + if($t->exists($id)) + $t->load($id); + else + return partial('error.html', ['errorTitle' => 'Error', 'errorMessage' => 'Dieses Turnier existiert nicht']); if(!in_array($_SESSION['user']->id, $t->data['admins'])) return partial('error.html', ['errorTitle' => 'Error', 'errorMessage' => 'Du bist nicht berechtigt, dieses Turnier zu bearbeiten']); else