We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $account->increaseSmrRewardCredits(2 * CREDITS_PER_DOLLAR); // Give $2 worth of "reward" credits for joining. |
158 | 158 | if($socialLogin) { |
159 | 159 | $account->addAuthMethod($_SESSION['socialLogin']->getLoginType(), |
160 | - $_SESSION['socialLogin']->getUserID()); |
|
160 | + $_SESSION['socialLogin']->getUserID()); |
|
161 | 161 | if ($validatedBySocial) { |
162 | 162 | $account->setValidated(true); |
163 | 163 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | // remember when we sent validation code |
187 | 187 | $db->query('INSERT INTO notification (notification_type, account_id, time) ' . |
188 | - 'VALUES(\'validation_code\', '.$db->escapeNumber(SmrSession::$account_id).', ' . $db->escapeNumber(TIME) . ')'); |
|
188 | + 'VALUES(\'validation_code\', '.$db->escapeNumber(SmrSession::$account_id).', ' . $db->escapeNumber(TIME) . ')'); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | $container = create_container('login_processing.php'); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | exit; |
89 | 89 | } |
90 | 90 | $account->addAuthMethod($_SESSION['socialLogin']->getLoginType(), |
91 | - $_SESSION['socialLogin']->getUserID()); |
|
91 | + $_SESSION['socialLogin']->getUserID()); |
|
92 | 92 | session_destroy(); |
93 | 93 | } |
94 | 94 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | // save session (incase we forward) |
114 | 114 | SmrSession::update(); |
115 | 115 | if (($disabled['Reason'] != CLOSE_ACCOUNT_INVALID_EMAIL_REASON) && |
116 | - ($disabled['Reason'] != CLOSE_ACCOUNT_BY_REQUEST_REASON)) { |
|
116 | + ($disabled['Reason'] != CLOSE_ACCOUNT_BY_REQUEST_REASON)) { |
|
117 | 117 | forward(create_container('disabled.php')); |
118 | 118 | } |
119 | 119 | } |
@@ -4,16 +4,16 @@ |
||
4 | 4 | |
5 | 5 | |
6 | 6 | if (get_magic_quotes_gpc()) { |
7 | - function stripslashes_array($array) |
|
8 | - { |
|
9 | - return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array); |
|
10 | - } |
|
7 | + function stripslashes_array($array) |
|
8 | + { |
|
9 | + return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array); |
|
10 | + } |
|
11 | 11 | |
12 | - $_COOKIE = stripslashes_array($_COOKIE); |
|
13 | - $_FILES = stripslashes_array($_FILES); |
|
14 | - $_GET = stripslashes_array($_GET); |
|
15 | - $_POST = stripslashes_array($_POST); |
|
16 | - $_REQUEST = stripslashes_array($_REQUEST); |
|
12 | + $_COOKIE = stripslashes_array($_COOKIE); |
|
13 | + $_FILES = stripslashes_array($_FILES); |
|
14 | + $_GET = stripslashes_array($_GET); |
|
15 | + $_POST = stripslashes_array($_POST); |
|
16 | + $_REQUEST = stripslashes_array($_REQUEST); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | header('Cache-Control: no-cache, must-revalidate'); |
@@ -3,7 +3,7 @@ |
||
3 | 3 | function get_turns_message($player) { |
4 | 4 | // turns only update when the player is active, so calculate current turns |
5 | 5 | $turns = min($player->getTurns() + $player->getTurnsGained(time(), true), |
6 | - $player->getMaxTurns()); |
|
6 | + $player->getMaxTurns()); |
|
7 | 7 | $msg = $player->getPlayerName() . " has $turns/" . $player->getMaxTurns() . " turns."; |
8 | 8 | |
9 | 9 | // Calculate time to max turns if under the max |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if (!function_exists('apc_compile_file')) { |
3 | - echo "ERROR: apc_compile_file does not exist!"; |
|
4 | - exit(1); |
|
3 | + echo "ERROR: apc_compile_file does not exist!"; |
|
4 | + exit(1); |
|
5 | 5 | } |
6 | 6 | |
7 | 7 | |
@@ -14,12 +14,12 @@ discard block |
||
14 | 14 | */ |
15 | 15 | function compile_files($dir,$exts=array('*.php')) |
16 | 16 | { |
17 | - $dirs = glob($dir . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR); |
|
18 | - if (is_array($dirs) && count($dirs) > 0) { |
|
19 | - while(list(,$v) = each($dirs)) { |
|
20 | - compile_files($v,$exts); |
|
21 | - } |
|
22 | - } |
|
17 | + $dirs = glob($dir . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR); |
|
18 | + if (is_array($dirs) && count($dirs) > 0) { |
|
19 | + while(list(,$v) = each($dirs)) { |
|
20 | + compile_files($v,$exts); |
|
21 | + } |
|
22 | + } |
|
23 | 23 | |
24 | 24 | foreach($exts as $ext) |
25 | 25 | { |
@@ -24,7 +24,7 @@ |
||
24 | 24 | continue; |
25 | 25 | } |
26 | 26 | $turns = min($attendeePlayer->getTurns() + $attendeePlayer->getTurnsGained(time(), true), |
27 | - $attendeePlayer->getMaxTurns()); |
|
27 | + $attendeePlayer->getMaxTurns()); |
|
28 | 28 | $oppers[$attendeePlayer->getPlayerName()] = $turns; |
29 | 29 | } |
30 | 30 |
@@ -100,7 +100,7 @@ |
||
100 | 100 | |
101 | 101 | safefputs($fp, 'NICKSERV IDENTIFY ' . IRC_BOT_PASS . EOL); |
102 | 102 | |
103 | - sleep(5); |
|
103 | + sleep(5); |
|
104 | 104 | |
105 | 105 | // join our public channel |
106 | 106 | if (!IRC_DEBUGGING) { |
@@ -117,13 +117,13 @@ |
||
117 | 117 | $curr_sector =& SmrSector::getSector($sector->getGameID(), $curr_sector_id); |
118 | 118 | |
119 | 119 | // does the current sector buy/sell the good we're looking for? |
120 | - if ($good_distance != 0) { |
|
120 | + if ($good_distance != 0) { |
|
121 | 121 | if ($curr_sector->hasPort() && $curr_sector->getPort()->hasGood($goodID, $neg_transaction) && $distance < $good_distance) |
122 | 122 | $good_distance = $distance; |
123 | - } else { |
|
123 | + } else { |
|
124 | 124 | if ($curr_sector->hasPort() && $curr_sector->getPort()->hasGood($goodID, $neg_transaction)) |
125 | 125 | $good_distance = $distance; |
126 | - } |
|
126 | + } |
|
127 | 127 | |
128 | 128 | // if we already found a port that buy or sell our product we don't need |
129 | 129 | // to go further than this one. |
@@ -392,15 +392,15 @@ |
||
392 | 392 | } |
393 | 393 | |
394 | 394 | function getIpAddress() { |
395 | - foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key) { |
|
396 | - if (array_key_exists($key, $_SERVER) === true) { |
|
397 | - foreach (explode(',', $_SERVER[$key]) as $ip) { |
|
398 | - if (filter_var($ip, FILTER_VALIDATE_IP) !== false) { |
|
399 | - return $ip; |
|
400 | - } |
|
401 | - } |
|
402 | - } |
|
403 | - } |
|
395 | + foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key) { |
|
396 | + if (array_key_exists($key, $_SERVER) === true) { |
|
397 | + foreach (explode(',', $_SERVER[$key]) as $ip) { |
|
398 | + if (filter_var($ip, FILTER_VALIDATE_IP) !== false) { |
|
399 | + return $ip; |
|
400 | + } |
|
401 | + } |
|
402 | + } |
|
403 | + } |
|
404 | 404 | } |
405 | 405 | |
406 | 406 | // This function is a hack around the old style http forward mechanism |