Skip to content

Commit

Permalink
Merge pull request #746 from PennyDreadfulMTG/sessions
Browse files Browse the repository at this point in the history
Remove extra spaces in "paste stuff"
  • Loading branch information
bakert authored Sep 9, 2024
2 parents d87748c + 4a798d3 commit 7e48a6c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions gatherling/Pages/PlayerList.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PlayerList extends EventFrame
public ?array $newEntry;
public bool $showCreateNextEvent;
public bool $showCreateNextSeason;
public array $deckless;
public string $deckless;

public function __construct(Event $event)
{
Expand All @@ -40,7 +40,7 @@ public function __construct(Event $event)
foreach ($entries as $entry) {
$entryInfoList[] = entryListArgs($entry, $numEntries, (bool) $format->tribal);
if (!$entry->deck) {
$deckless[] = $entry->player->gameNameArgs($entry->event->client);
$deckless[] = $entry->player->name;
}
}

Expand Down Expand Up @@ -72,7 +72,7 @@ public function __construct(Event $event)
$this->newEntry = $newEntry;
$this->showCreateNextEvent = $showCreateNextEvent;
$this->showCreateNextSeason = $showCreateNextSeason;
$this->deckless = $deckless;
$this->deckless = implode(', ', $deckless);
}
}

Expand Down
2 changes: 2 additions & 0 deletions gatherling/config.php.github
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# CONFIGURATION FILE FOR UNIT TESTS
# GO LOOK AT THE OTHER ONE FOR AN EXPLANATION

$CONFIG['env'] = 'ci';

$CONFIG['db_hostname'] = $CONFIG['db_test_hostname'] = '127.0.0.1';
$CONFIG['db_username'] = $CONFIG['db_test_username'] = 'root';
$CONFIG['db_password'] = $CONFIG['db_test_password'] = 'gatherling';
Expand Down
4 changes: 2 additions & 2 deletions gatherling/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ function printCardLink($card): void
$gathererName = preg_replace('/ /', ']+[', $card);
$gathererName = str_replace('/', ']+[', $gathererName);
echo '<span class="cardHoverImageWrapper">';
echo "<a href=\"http://gatherer.wizards.com/Pages/Search/Default.aspx?name=+[{$gathererName}]\" ";
echo "class=\"linkedCardName\" target=\"_blank\">{$card}<span class=\"linkCardHoverImage\"><p class=\"crop\" style=\"background-image: url(http://gatherer.wizards.com/Handlers/Image.ashx?name={$card}&type=card\"><img alt=\"{$card}\" src=\"http://gatherer.wizards.com/Handlers/Image.ashx?name={$card}&type=card\"></p></span></a></span>";
echo "<a href=\"https://gatherer.wizards.com/Pages/Search/Default.aspx?name=+[{$gathererName}]\" ";
echo "class=\"linkedCardName\" target=\"_blank\">{$card}<span class=\"linkCardHoverImage\"><p class=\"crop\" style=\"background-image: url(https://gatherer.wizards.com/Handlers/Image.ashx?name={$card}&type=card\"><img alt=\"{$card}\" src=\"https://gatherer.wizards.com/Handlers/Image.ashx?name={$card}&type=card\"></p></span></a></span>";
}

function image_tag($filename, $extra_attr = null): string
Expand Down
2 changes: 1 addition & 1 deletion gatherling/views/playerList.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
{{#notYetStarted}}
<p>
Paste stuff:<br>
<code>Need decklists from {{#deckless}}{{> gameName}}, {{/deckless}}</code>
<code>Need decklists from {{deckless}}</code>
</p>
{{/notYetStarted}}
</div>
Expand Down

0 comments on commit 7e48a6c

Please sign in to comment.