ergebnisformular fast fertig
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
This commit is contained in:
@ -59,11 +59,21 @@ class Runs extends Page {
|
||||
$t = new Tournament();
|
||||
$tid = $run->data['tournament'];
|
||||
$t->load($tid);
|
||||
$res = new Result();
|
||||
if($_REQUEST['result_id'])
|
||||
{
|
||||
if(!$res->exists($_REQUEST['result_id']))
|
||||
return partial('error.html', ['errorMessage' => 'Dieses Ergebnis existiert nicht']);
|
||||
$res->load($_REQUEST['result_id']);
|
||||
if(!$res->data['run']==$rid)
|
||||
return partial('error.html', ['errorMessage' => 'Dieses Ergebnis gehört nicht zu diesem Lauf']);
|
||||
}
|
||||
else
|
||||
$res->id = gen_ulid();
|
||||
if(!$t->amIAdmin() && !$t->isMyEvent($tid))
|
||||
return partial('error.html', ['errorMessage' => 'Du bist in diesem Turnier nicht angemeldet']);
|
||||
else
|
||||
{
|
||||
$run->data['results'] = [];
|
||||
$run->data['results']['time'] = $_REQUEST['time'];
|
||||
$run->data['results']['penalty'] = $_REQUEST['penalty'];
|
||||
$run->data['results']['disq'] = $_REQUEST['disq'];
|
||||
|
Reference in New Issue
Block a user