fixed
All checks were successful
Build and push / Pulling repo on server (push) Successful in 10s

This commit is contained in:
Chris 2023-10-26 21:33:29 +02:00
parent b429513ab4
commit ebe969c7de

View File

@ -37,12 +37,11 @@ class Tournaments extends Page {
function event() function event()
{ {
$tid = $this->params[0]; $tid = $this->params[0];
$t = new Tournament(); $t = new Tournament();
if($t->exists($tid))
if(!$t->isMyEvent($tid)) $t->load($tid);
return 'Not your event :('; else
return partial('error.html', ['errorTitle' => 'Error', 'errorMessage' => 'Dieses Turnier existiert nicht']);
$t->load($tid);
$this->set('admin',$t->amIAdmin($tid)); $this->set('admin',$t->amIAdmin($tid));
$this->set('joined',$t->isMyEvent($tid)); $this->set('joined',$t->isMyEvent($tid));