diff --git a/gatherling/Models/Entry.php b/gatherling/Models/Entry.php index b5e761f46..e45cefe7a 100644 --- a/gatherling/Models/Entry.php +++ b/gatherling/Models/Entry.php @@ -48,10 +48,10 @@ public function __construct(int $event_id, string $playername) public static function findByEventAndPlayer(int $event_id, string $playername): ?self { - $sql = 'SELECT deck FROM entries WHERE event_id = :event_id AND player = :player'; + $sql = 'SELECT player FROM entries WHERE event_id = :event_id AND player = :player'; $params = ['event_id' => $event_id, 'player' => $playername]; - $deckId = db()->optionalInt($sql, $params); - if (!$deckId) { + $player = db()->optionalString($sql, $params); + if (!$player) { return null; } return new self($event_id, $playername); diff --git a/gatherling/templates/partials/allDecks.mustache b/gatherling/templates/partials/allDecks.mustache index a71cc2713..5ac110602 100644 --- a/gatherling/templates/partials/allDecks.mustache +++ b/gatherling/templates/partials/allDecks.mustache @@ -1,22 +1,17 @@

Decks marked with a * are not legal under current format.

-
-
- - - - - {{#decks}} - - - - - - - {{/decks}} -
{{upPlayer}}'S DECKS
{{#medalSrc}}Medal{{/medalSrc}}{{recordString}}{{#deckLink}}{{> deckLink}}{{/deckLink}}{{^isValid}}*{{/isValid}}{{eventName}}
-
-
-
-
+
+ + + + + {{#decks}} + + + + + + + {{/decks}} +
{{upPlayer}}'S DECKS
{{#medalSrc}}Medal{{/medalSrc}}{{recordString}}{{#deckLink}}{{> deckLink}}{{/deckLink}}{{^isValid}}*{{/isValid}}{{eventName}}