From ebe969c7de001f9fad9548d0648ab8a5a4a62bf1 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 26 Oct 2023 21:33:29 +0200 Subject: [PATCH] fixed --- web/pages/tournaments/controller.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/web/pages/tournaments/controller.php b/web/pages/tournaments/controller.php index c5a6d67..fe925d1 100644 --- a/web/pages/tournaments/controller.php +++ b/web/pages/tournaments/controller.php @@ -37,12 +37,11 @@ class Tournaments extends Page { function event() { $tid = $this->params[0]; - $t = new Tournament(); - - if(!$t->isMyEvent($tid)) - return 'Not your event :('; - - $t->load($tid); + $t = new Tournament(); + if($t->exists($tid)) + $t->load($tid); + else + return partial('error.html', ['errorTitle' => 'Error', 'errorMessage' => 'Dieses Turnier existiert nicht']); $this->set('admin',$t->amIAdmin($tid)); $this->set('joined',$t->isMyEvent($tid));