We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -3,7 +3,7 @@ |
||
3 | 3 | // Get the dates ("|" sets hr/min/sec to 0) |
4 | 4 | $join = DateTime::createFromFormat('d/m/Y|', Request::get('game_join')); |
5 | 5 | $start = empty(Request::get('game_start')) ? $join : |
6 | - DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
6 | + DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
7 | 7 | $end = DateTime::createFromFormat('d/m/Y|', Request::get('game_end')); |
8 | 8 | |
9 | 9 | $game = SmrGame::getGame($var['game_id']); |
@@ -2,8 +2,7 @@ |
||
2 | 2 | |
3 | 3 | // Get the dates ("|" sets hr/min/sec to 0) |
4 | 4 | $join = DateTime::createFromFormat('d/m/Y|', Request::get('game_join')); |
5 | -$start = empty(Request::get('game_start')) ? $join : |
|
6 | - DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
5 | +$start = empty(Request::get('game_start')) ? $join : DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
7 | 6 | $end = DateTime::createFromFormat('d/m/Y|', Request::get('game_end')); |
8 | 7 | |
9 | 8 | $game = SmrGame::getGame($var['game_id']); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | // Get the dates ("|" sets hr/min/sec to 0) |
17 | 17 | $join = DateTime::createFromFormat('d/m/Y|', Request::get('game_join')); |
18 | 18 | $start = empty(Request::get('game_start')) ? $join : |
19 | - DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
19 | + DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
20 | 20 | $end = DateTime::createFromFormat('d/m/Y|', Request::get('game_end')); |
21 | 21 | |
22 | 22 | $game = SmrGame::createGame($newID); |
@@ -1,22 +1,21 @@ |
||
1 | 1 | <?php declare(strict_types=1); |
2 | 2 | |
3 | 3 | //first create the game |
4 | -$db->query('SELECT game_id FROM game WHERE game_name='.$db->escapeString(Request::get('game_name')).' LIMIT 1'); |
|
4 | +$db->query('SELECT game_id FROM game WHERE game_name=' . $db->escapeString(Request::get('game_name')) . ' LIMIT 1'); |
|
5 | 5 | if ($db->nextRecord()) { |
6 | 6 | create_error('That game name is already taken.'); |
7 | 7 | } |
8 | 8 | |
9 | 9 | $db->query('SELECT game_id FROM game ORDER BY game_id DESC LIMIT 1'); |
10 | 10 | if ($db->nextRecord()) { |
11 | - $newID = $db->getInt('game_id')+1; |
|
11 | + $newID = $db->getInt('game_id') + 1; |
|
12 | 12 | } else { |
13 | 13 | $newID = 1; |
14 | 14 | } |
15 | 15 | |
16 | 16 | // Get the dates ("|" sets hr/min/sec to 0) |
17 | 17 | $join = DateTime::createFromFormat('d/m/Y|', Request::get('game_join')); |
18 | -$start = empty(Request::get('game_start')) ? $join : |
|
19 | - DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
18 | +$start = empty(Request::get('game_start')) ? $join : DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
20 | 19 | $end = DateTime::createFromFormat('d/m/Y|', Request::get('game_end')); |
21 | 20 | |
22 | 21 | $game = SmrGame::createGame($newID); |
@@ -105,13 +105,15 @@ |
||
105 | 105 | $numberOfPlanets = Request::getInt('type' . $planetTypeID); |
106 | 106 | for ($i = 1; $i <= $numberOfPlanets; $i++) { |
107 | 107 | $galSector = $galSectors[array_rand($galSectors)]; |
108 | - while ($galSector->hasPlanet()) $galSector = $galSectors[array_rand($galSectors)]; //1 per sector |
|
108 | + while ($galSector->hasPlanet()) { |
|
109 | + $galSector = $galSectors[array_rand($galSectors)]; |
|
110 | + } |
|
111 | + //1 per sector |
|
109 | 112 | $galSector->createPlanet($planetTypeID); |
110 | 113 | } |
111 | 114 | } |
112 | 115 | $var['message'] = '<span class="green">Success</span> : Succesfully added planets.'; |
113 | -} |
|
114 | -elseif ($submit == 'Create Ports') { |
|
116 | +} elseif ($submit == 'Create Ports') { |
|
115 | 117 | $numLevelPorts = []; |
116 | 118 | for ($i = 1; $i <= SmrPort::MAX_LEVEL; $i++) { |
117 | 119 | $numLevelPorts[$i] = Request::getInt('port' . $i); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | // Set the body of the e-mail |
37 | 37 | set_mail_body($mail, $var['newsletter_html'], $var['newsletter_text'], |
38 | - Request::get('salutation')); |
|
38 | + Request::get('salutation')); |
|
39 | 39 | |
40 | 40 | if (Request::get('to_email') == '*') { |
41 | 41 | // Send the newsletter to all players. |
@@ -35,7 +35,7 @@ |
||
35 | 35 | } |
36 | 36 | $helper = self::getTwitterObj($_SESSION['TwitterToken']); |
37 | 37 | $accessToken = $helper->oauth('oauth/access_token', |
38 | - ['oauth_verifier' => \Request::get('oauth_verifier')]); |
|
38 | + ['oauth_verifier' => \Request::get('oauth_verifier')]); |
|
39 | 39 | $auth = self::getTwitterObj($accessToken); |
40 | 40 | $userInfo = $auth->get('account/verify_credentials', ['include_email' => 'true']); |
41 | 41 | if ($auth->getLastHttpCode() == 200) { |
@@ -100,16 +100,16 @@ |
||
100 | 100 | $container['view_game_id'] = $var['view_game_id']; |
101 | 101 | $container['game_name'] = $var['game_name']; |
102 | 102 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
103 | - 'Text' => 'Game Details']; |
|
103 | + 'Text' => 'Game Details']; |
|
104 | 104 | $container['body'] = 'history_games_detail.php'; |
105 | 105 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
106 | - 'Text' => 'Extended Stats']; |
|
106 | + 'Text' => 'Extended Stats']; |
|
107 | 107 | $container['body'] = 'history_games_hof.php'; |
108 | 108 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
109 | - 'Text' => 'Hall of Fame']; |
|
109 | + 'Text' => 'Hall of Fame']; |
|
110 | 110 | $container['body'] = 'history_games_news.php'; |
111 | 111 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
112 | - 'Text' => 'Game News']; |
|
112 | + 'Text' => 'Game News']; |
|
113 | 113 | // make the selected index bold |
114 | 114 | $boldItem =& $menuItems[$selected_index]['Text']; |
115 | 115 | $boldItem = '<b>' . $boldItem . '</b>'; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $menuItems[] = array('Link'=>Globals::getPlanetListHREF($alliance_id), 'Text'=>'Defense'); |
13 | 13 | $menuItems[] = array('Link'=>Globals::getPlanetListFinancialHREF($alliance_id), 'Text'=>'Financial'); |
14 | 14 | // make the selected index bold |
15 | - $boldItem =& $menuItems[$selected_index]['Text']; |
|
15 | + $boldItem = & $menuItems[$selected_index]['Text']; |
|
16 | 16 | $boldItem = '<span class="bold">' . $boldItem . '</span>'; |
17 | 17 | $template->assign('MenuItems', $menuItems); |
18 | 18 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
108 | 108 | 'Text' => 'Game News']; |
109 | 109 | // make the selected index bold |
110 | - $boldItem =& $menuItems[$selected_index]['Text']; |
|
110 | + $boldItem = & $menuItems[$selected_index]['Text']; |
|
111 | 111 | $boldItem = '<b>' . $boldItem . '</b>'; |
112 | 112 | $template->assign('MenuItems', $menuItems); |
113 | 113 | } |
@@ -69,7 +69,7 @@ |
||
69 | 69 | exit; |
70 | 70 | } |
71 | 71 | $account->addAuthMethod($_SESSION['socialLogin']->getLoginType(), |
72 | - $_SESSION['socialLogin']->getUserID()); |
|
72 | + $_SESSION['socialLogin']->getUserID()); |
|
73 | 73 | session_destroy(); |
74 | 74 | } |
75 | 75 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | } |
19 | 19 | |
20 | 20 | self::$dbConn = new mysqli(self::$host, self::$user, self::$password, |
21 | - $dbName, self::$port, self::$socket); |
|
21 | + $dbName, self::$port, self::$socket); |
|
22 | 22 | self::$selectedDbName = $dbName; |
23 | 23 | |
24 | 24 | // Default server charset should be set correctly. Using the default |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public function __construct($dbName) { |
14 | 14 | if (!self::$dbConn) { |
15 | 15 | // Set the mysqli driver to raise exceptions on errors |
16 | - if (!mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT)) { |
|
16 | + if (!mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT)) { |
|
17 | 17 | $this->error('Failed to enable mysqli error reporting'); |
18 | 18 | } |
19 | 19 |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $account->increaseSmrRewardCredits(2 * CREDITS_PER_DOLLAR); // Give $2 worth of "reward" credits for joining. |
151 | 151 | if ($socialLogin) { |
152 | 152 | $account->addAuthMethod($_SESSION['socialLogin']->getLoginType(), |
153 | - $_SESSION['socialLogin']->getUserID()); |
|
153 | + $_SESSION['socialLogin']->getUserID()); |
|
154 | 154 | if ($validatedBySocial) { |
155 | 155 | $account->setValidated(true); |
156 | 156 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | |
179 | 179 | // remember when we sent validation code |
180 | 180 | $db->query('INSERT INTO notification (notification_type, account_id, time) ' . |
181 | - 'VALUES(\'validation_code\', ' . $db->escapeNumber($account->getAccountID()) . ', ' . $db->escapeNumber(TIME) . ')'); |
|
181 | + 'VALUES(\'validation_code\', ' . $db->escapeNumber($account->getAccountID()) . ', ' . $db->escapeNumber(TIME) . ')'); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | forwardURL(create_container('login_processing.php')); |