Skip to content

Commit

Permalink
Start event without checks
Browse files Browse the repository at this point in the history
  • Loading branch information
silasary committed Oct 26, 2023
1 parent c7c558d commit 25094cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions gatherling/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ function content()
authFailed();
} else {
if (mode_is('Start Event')) {
$event->startEvent();
$event->startEvent(true);
} elseif (mode_is('Start Event (No Deck Check)')) {
$event->startEvent(false);
} elseif (mode_is('Recalculate Standings')) {
$structure = $event->mainstruct;
$event->recalculateScores($structure);
Expand Down Expand Up @@ -851,7 +853,9 @@ function playerList($event)
echo "<input type=\"hidden\" name=\"name\" value=\"{$event->name}\" />";
echo '<table><th>Round Actions</th><tr>';
if ($event->active == 0 && $event->finalized == 0) {
echo '<td><input id="start_event" class="inputbutton" type="submit" name="mode" value="Start Event" /></td></tr>';
echo '<td><input id="start_event" class="inputbutton" type="submit" name="mode" value="Start Event" />';
echo '<input id="start_event" class="inputbutton" type="submit" name="mode" value="Start Event (No Deck Check)" />';
echo '</td></tr>';
echo '<p>Paste stuff:<br />';
echo "<code>{$deckless}</code></p>";
} elseif ($event->active == 1) {
Expand Down
4 changes: 2 additions & 2 deletions gatherling/models/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -1827,9 +1827,9 @@ public function updateDecksFormat($format)
}
}

public function startEvent()
public function startEvent($precheck)
{
$entries = $this->getRegisteredEntries(true);
$entries = $this->getRegisteredEntries($precheck);
Standings::startEvent($entries, $this->name);
// $this->dropInvalidEntries();
$this->pairCurrentRound();
Expand Down

0 comments on commit 25094cb

Please sign in to comment.