We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 4 |
Paths | 8 |
Total Lines | 25 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
19 | public function build(AbstractSmrPlayer $player, Template $template): void { |
||
20 | $template->assign('PageTopic', 'Player Blacklist'); |
||
21 | |||
22 | Menu::messages(); |
||
23 | |||
24 | if ($this->message !== null) { |
||
25 | $template->assign('Message', $this->message); |
||
26 | } |
||
27 | |||
28 | $db = Database::getInstance(); |
||
29 | $dbResult = $db->read('SELECT p.player_name, p.game_id, b.entry_id FROM player p JOIN message_blacklist b ON p.account_id = b.blacklisted_id AND b.game_id = p.game_id WHERE b.account_id=' . $db->escapeNumber($player->getAccountID()) . ' ORDER BY p.game_id, p.player_name'); |
||
30 | |||
31 | $blacklist = []; |
||
32 | foreach ($dbResult->records() as $dbRecord) { |
||
33 | $blacklist[] = $dbRecord->getRow(); |
||
34 | } |
||
35 | $template->assign('Blacklist', $blacklist); |
||
36 | |||
37 | if ($blacklist) { |
||
38 | $container = new MessageBlacklistDeleteProcessor(); |
||
39 | $template->assign('BlacklistDeleteHREF', $container->href()); |
||
40 | } |
||
41 | |||
42 | $container = new MessageBlacklistAddProcessor(); |
||
43 | $template->assign('BlacklistAddHREF', $container->href()); |
||
44 | } |
||
47 |