Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Branch master (287493)
by Dan
06:08
created
engine/Default/alliance_invite_accept.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 // Check that the invitation is registered in the database
7 7
 $newAlliance = SmrAlliance::getAlliance($var['alliance_id'], $player->getGameID());
8 8
 $db->query('SELECT 1 FROM alliance_invites_player
9
-            WHERE game_id = '.$db->escapeNumber($player->getGameID()).'
10
-              AND alliance_id = '.$db->escapeNumber($newAlliance->getAllianceID()).'
9
+            WHERE game_id = '.$db->escapeNumber($player->getGameID()) . '
10
+              AND alliance_id = '.$db->escapeNumber($newAlliance->getAllianceID()) . '
11 11
               AND account_id = '.$db->escapeNumber($player->getAccountID()));
12 12
 if (!$db->nextRecord()) {
13 13
 	create_error('You do not have an invitation to join this alliance!');
Please login to merge, or discard this patch.
engine/Default/alliance_treaties_confirm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 $alliance_id_1 = $player->getAllianceID();
4 4
 $alliance_id_2 = $_REQUEST['proposedAlliance'];
5 5
 
6
-$db->query('SELECT alliance_id_1, alliance_id_2, game_id FROM alliance_treaties WHERE (alliance_id_1 = ' . $db->escapeNumber($alliance_id_1) . ' OR alliance_id_1 = '.$alliance_id_2.') AND (alliance_id_2 = ' . $db->escapeNumber($alliance_id_1) . ' OR alliance_id_2 = ' . $db->escapeNumber($alliance_id_2) . ') AND game_id = ' . $db->escapeNumber($player->getGameID()));
6
+$db->query('SELECT alliance_id_1, alliance_id_2, game_id FROM alliance_treaties WHERE (alliance_id_1 = ' . $db->escapeNumber($alliance_id_1) . ' OR alliance_id_1 = ' . $alliance_id_2 . ') AND (alliance_id_2 = ' . $db->escapeNumber($alliance_id_1) . ' OR alliance_id_2 = ' . $db->escapeNumber($alliance_id_2) . ') AND game_id = ' . $db->escapeNumber($player->getGameID()));
7 7
 if ($db->nextRecord()) {
8 8
 	$container = create_container('skeleton.php', 'alliance_treaties.php');
9 9
 	$container['message'] = '<span class="red bold">ERROR:</span> There is already an outstanding treaty with that alliance.';
Please login to merge, or discard this patch.
engine/Default/skeleton.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-$PHP_OUTPUT='';
4
+$PHP_OUTPUT = '';
5 5
 
6 6
 require_once(get_file_loc($var['body']));
7
-$template->assign('PHP_OUTPUT',$PHP_OUTPUT);
7
+$template->assign('PHP_OUTPUT', $PHP_OUTPUT);
Please login to merge, or discard this patch.
engine/Default/changelog_view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$template->assign('PageTopic','Change Log');
3
+$template->assign('PageTopic', 'Change Log');
4 4
 
5
-if(isset($var['Since'])) {
5
+if (isset($var['Since'])) {
6 6
 	$container = create_container('logged_in.php');
7 7
 	$template->assign('ContinueHREF', SmrSession::getNewHREF($container));
8 8
 }
Please login to merge, or discard this patch.
engine/Default/alliance_create_processing.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if($player->getAllianceJoinable() > TIME) {
3
+if ($player->getAllianceJoinable() > TIME) {
4 4
 	create_error('You cannot create an alliance for another ' . format_time($player->getAllianceJoinable() - TIME) . '.');
5 5
 }
6 6
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	create_error('That is not a valid alliance name!');
29 29
 }
30 30
 $filteredName = word_filter($name);
31
-if($name != $filteredName) {
31
+if ($name != $filteredName) {
32 32
 	create_error('The alliance name contains one or more filtered words, please reconsider the name.');
33 33
 }
34 34
 
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 $db->query('SELECT max(alliance_id) FROM alliance WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND (alliance_id < 302 OR alliance_id > 309) LIMIT 1');
43 43
 $db->nextRecord();
44 44
 $alliance_id = $db->getInt('max(alliance_id)') + 1;
45
-if($alliance_id >= 302 && $alliance_id <= 309) {
45
+if ($alliance_id >= 302 && $alliance_id <= 309) {
46 46
 	$alliance_id = 310;
47 47
 }
48 48
 
49 49
 
50 50
 $description = word_filter($description);
51
-$player->sendMessageToBox(BOX_ALLIANCE_DESCRIPTIONS,'Alliance '.$name.'('.$alliance_id.') had their description changed to:'.EOL.EOL.$description);
51
+$player->sendMessageToBox(BOX_ALLIANCE_DESCRIPTIONS, 'Alliance ' . $name . '(' . $alliance_id . ') had their description changed to:' . EOL . EOL . $description);
52 52
 // actually create the alliance here
53 53
 $db->query('INSERT INTO alliance (alliance_id, game_id, alliance_name, alliance_description, alliance_password, leader_id, recruiting)
54 54
 			VALUES(' . $db->escapeNumber($alliance_id) . ', ' . $db->escapeNumber($player->getGameID()) . ', ' . $db->escapeString($name) . ', ' . $db->escapeString($description) . ', ' . $db->escapeString($password) . ', ' . $db->escapeNumber($player->getAccountID()) . ', ' . $db->escapeBoolean($recruit) . ')');
Please login to merge, or discard this patch.
engine/Default/feature_request_vote_processing.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,28 +1,28 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if($_REQUEST['action']=='Vote') {
2
+if ($_REQUEST['action'] == 'Vote') {
3 3
 	if ($account->getAccountID() == ACCOUNT_ID_NHL) {
4 4
 		create_error('This account is not allowed to cast a vote!');
5 5
 	}
6
-	if(is_array($_REQUEST['vote'])) {
6
+	if (is_array($_REQUEST['vote'])) {
7 7
 		$query = 'REPLACE INTO account_votes_for_feature VALUES ';
8
-		foreach($_REQUEST['vote'] as $requestID => $vote) {
9
-			$query.='('.$db->escapeNumber($account->getAccountID()).', '.$db->escapeNumber($requestID).','.$db->escapeString($vote).'),';
8
+		foreach ($_REQUEST['vote'] as $requestID => $vote) {
9
+			$query .= '(' . $db->escapeNumber($account->getAccountID()) . ', ' . $db->escapeNumber($requestID) . ',' . $db->escapeString($vote) . '),';
10 10
 		}
11
-		$db->query(substr($query,0,-1));
11
+		$db->query(substr($query, 0, -1));
12 12
 	}
13
-	if(!empty($_REQUEST['favourite']) && is_numeric($_REQUEST['favourite']))
14
-		$db->query('REPLACE INTO account_votes_for_feature VALUES('.$db->escapeNumber($account->getAccountID()).', '.$db->escapeNumber($_REQUEST['favourite']).',\'FAVOURITE\')');
13
+	if (!empty($_REQUEST['favourite']) && is_numeric($_REQUEST['favourite']))
14
+		$db->query('REPLACE INTO account_votes_for_feature VALUES(' . $db->escapeNumber($account->getAccountID()) . ', ' . $db->escapeNumber($_REQUEST['favourite']) . ',\'FAVOURITE\')');
15 15
 
16 16
 	forward(create_container('skeleton.php', 'feature_request.php'));
17 17
 }
18
-else if($_REQUEST['action']=='Set Status') {
19
-	if(empty($_REQUEST['status'])) {
18
+else if ($_REQUEST['action'] == 'Set Status') {
19
+	if (empty($_REQUEST['status'])) {
20 20
 		create_error('You have to select a status to set');
21 21
 	}
22 22
 	$status = $_REQUEST['status'];
23
-	if(empty($_REQUEST['set_status_ids']))
23
+	if (empty($_REQUEST['set_status_ids']))
24 24
 		create_error('You have to select a feature');
25
-	if(!$account->hasPermission(PERMISSION_MODERATE_FEATURE_REQUEST))
25
+	if (!$account->hasPermission(PERMISSION_MODERATE_FEATURE_REQUEST))
26 26
 		create_error('You do not have permission to do that');
27 27
 
28 28
 	$db->query('UPDATE feature_request fr SET status = ' . $db->escapeString($status) . '
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 					AND vote_type=' . $db->escapeString('NO') . '
46 46
 			)
47 47
 			WHERE feature_request_id IN (' . $db->escapeArray($_REQUEST['set_status_ids']) . ')');
48
-	foreach($_REQUEST['set_status_ids'] as $featureID) {
48
+	foreach ($_REQUEST['set_status_ids'] as $featureID) {
49 49
 		$db->query('INSERT INTO feature_request_comments (feature_request_id, poster_id, posting_time, anonymous, text)
50 50
 					VALUES(' . $db->escapeNumber($featureID) . ', ' . $db->escapeNumber($account->getAccountID()) . ',' . $db->escapeNumber(TIME) . ',' . $db->escapeBoolean(false) . ',' . $db->escapeString($status) . ')');
51 51
 	}
Please login to merge, or discard this patch.
engine/Default/alliance_roster.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if (!isset($var['alliance_id'])) {
4
-	SmrSession::updateVar('alliance_id',$player->getAllianceID());
4
+	SmrSession::updateVar('alliance_id', $player->getAllianceID());
5 5
 }
6 6
 
7
-$alliance = SmrAlliance::getAlliance($var['alliance_id'],$player->getGameID());
7
+$alliance = SmrAlliance::getAlliance($var['alliance_id'], $player->getGameID());
8 8
 $template->assign('Alliance', $alliance);
9 9
 
10 10
 $template->assign('PageTopic', $alliance->getAllianceName(false, true));
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	}
30 30
 	$template->assign('Roles', $roles);
31 31
 
32
-	$container=create_container('alliance_roles_save_processing.php');
32
+	$container = create_container('alliance_roles_save_processing.php');
33 33
 	$container['alliance_id'] = $alliance->getAllianceID();
34 34
 	$template->assign('SaveAllianceRolesHREF', SmrSession::getNewHREF($container));
35 35
 }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 $template->assign('AllianceExp', $db->getInt('alliance_xp'));
51 51
 $template->assign('AllianceAverageExp', $db->getInt('alliance_avg'));
52 52
 
53
-if($account->getAccountID() == $alliance->getLeaderID() || $account->hasPermission(PERMISSION_EDIT_ALLIANCE_DESCRIPTION)) {
53
+if ($account->getAccountID() == $alliance->getLeaderID() || $account->hasPermission(PERMISSION_EDIT_ALLIANCE_DESCRIPTION)) {
54 54
 	$container = create_container('skeleton.php', 'alliance_stat.php');
55 55
 	$container['alliance_id'] = $alliance->getAllianceID();
56 56
 	$template->assign('EditAllianceDescriptionHREF', SmrSession::getNewHREF($container));
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	// Alliance members get to see active/inactive status of members
69 69
 	$template->assign('ActiveIDs', $alliance->getActiveIDs());
70 70
 	$container = create_container('skeleton.php', 'alliance_roster.php');
71
-	if($showRoles) {
71
+	if ($showRoles) {
72 72
 		$container['action'] = 'Hide Alliance Roles';
73 73
 	}
74 74
 	else {
Please login to merge, or discard this patch.
engine/Default/galactic_post_application_answer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@
 block discarded – undo
2 2
 $id = $var['id'];
3 3
 $action = $_REQUEST['action'];
4 4
 if ($action == 'Accept') {
5
-	$db->query('INSERT INTO galactic_post_writer (account_id, game_id, position) VALUES ('.$db->escapeNumber($id).', ' . $db->escapeNumber($player->getGameID()) . ', \'writer\')');
5
+	$db->query('INSERT INTO galactic_post_writer (account_id, game_id, position) VALUES (' . $db->escapeNumber($id) . ', ' . $db->escapeNumber($player->getGameID()) . ', \'writer\')');
6 6
 	$player->sendMessage($id, MSG_PLAYER, 'You have been accepted as a <i>Galactic Post</i> writter.  Click the link on the left to start writing!', false);
7
-	$db->query('DELETE FROM galactic_post_applications WHERE account_id = '.$db->escapeNumber($id).' AND game_id = ' . $db->escapeNumber($player->getGameID()));
7
+	$db->query('DELETE FROM galactic_post_applications WHERE account_id = ' . $db->escapeNumber($id) . ' AND game_id = ' . $db->escapeNumber($player->getGameID()));
8 8
 } else {
9
-	$db->query('DELETE FROM galactic_post_applications WHERE account_id = '.$db->escapeNumber($id).' AND game_id = ' . $db->escapeNumber($player->getGameID()));
9
+	$db->query('DELETE FROM galactic_post_applications WHERE account_id = ' . $db->escapeNumber($id) . ' AND game_id = ' . $db->escapeNumber($player->getGameID()));
10 10
 	$player->sendMessage($id, MSG_PLAYER, 'We are sorry to inform you that you were not accepted as a writer for the <i>Galactic Post</i>.', false);
11 11
 }
12 12
 $container = array();
Please login to merge, or discard this patch.
engine/Default/message_notify_processing.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
 // get message form db
17 17
 $db->query('SELECT account_id, sender_id, message_text
18 18
 			FROM message
19
-			WHERE message_id = ' . $var['message_id'].' AND receiver_delete = \'FALSE\'');
19
+			WHERE message_id = ' . $var['message_id'] . ' AND receiver_delete = \'FALSE\'');
20 20
 if (!$db->nextRecord())
21 21
 	create_error('Could not find the message you selected!');
22 22
 
23 23
 // insert
24 24
 $db->query('INSERT INTO message_notify
25 25
 			(notify_id, game_id, from_id, to_id, text, sent_time, notify_time)
26
-			VALUES ('.$notify_id.', ' . $db->escapeNumber($player->getGameID()) . ', ' . $db->getField('sender_id') . ', ' . $db->getField('account_id') . ', ' . $db->escapeString($db->getField('message_text')) . ', ' . $var['sent_time'] . ', ' . $var['notified_time'] . ')');
26
+			VALUES ('.$notify_id . ', ' . $db->escapeNumber($player->getGameID()) . ', ' . $db->getField('sender_id') . ', ' . $db->getField('account_id') . ', ' . $db->escapeString($db->getField('message_text')) . ', ' . $var['sent_time'] . ', ' . $var['notified_time'] . ')');
27 27
 
28 28
 forward(create_container('skeleton.php', 'message_view.php'));
Please login to merge, or discard this patch.