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

This commit is contained in:
Chris 2023-11-02 18:16:22 +01:00
parent 457dd2efd2
commit 0ed5ea12fe

View File

@ -150,8 +150,14 @@ class Tournaments extends Page {
else else
{ {
$t = new Tournament(); $t = new Tournament();
if($id) 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'])) if(!in_array($_SESSION['user']->id, $t->data['admins']))
return partial('error.html', ['errorTitle' => 'Error', 'errorMessage' => 'Du bist nicht berechtigt, dieses Turnier zu bearbeiten']); return partial('error.html', ['errorTitle' => 'Error', 'errorMessage' => 'Du bist nicht berechtigt, dieses Turnier zu bearbeiten']);
else else