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/help.inc 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 	$db3 = new SmrMySqlDatabase();
8 8
 
9 9
 	// get current entry
10
-	$db->query('SELECT * FROM manual WHERE topic_id = '.$db->escapeNumber($topic_id));
10
+	$db->query('SELECT * FROM manual WHERE topic_id = ' . $db->escapeNumber($topic_id));
11 11
 	if ($db->nextRecord()) {
12 12
 		$parent_topic_id = $db->getInt('parent_topic_id');
13 13
 		$order_id = $db->getInt('order_id');
@@ -19,17 +19,17 @@  discard block
 block discarded – undo
19 19
 		// **************************
20 20
 		// **  PREVIOUS
21 21
 		// **************************
22
-		$db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($order_id - 1));
22
+		$db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($parent_topic_id) . ' AND order_id = ' . $db2->escapeNumber($order_id - 1));
23 23
 
24 24
 		// no result?
25 25
 		if (!$db2->getNumRows())
26
-			$db2->query('SELECT * FROM manual WHERE topic_id = '.$db2->escapeNumber($parent_topic_id));
26
+			$db2->query('SELECT * FROM manual WHERE topic_id = ' . $db2->escapeNumber($parent_topic_id));
27 27
 
28 28
 		echo ('<th width="32">');
29 29
 		if ($db2->nextRecord()) {
30 30
 			$previous_topic_id = $db2->getField('topic_id');
31 31
 			$previous_topic = stripslashes($db2->getField('topic'));
32
-			echo ('<a href="/manual.php?'.$previous_topic_id.'"><img src="/images/help/previous.jpg" width="32" height="32" border="0"></a>');
32
+			echo ('<a href="/manual.php?' . $previous_topic_id . '"><img src="/images/help/previous.jpg" width="32" height="32" border="0"></a>');
33 33
 		} else
34 34
 			echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
35 35
 		echo ('</th>');
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
 		// **************************
38 38
 		// **  UP
39 39
 		// **************************
40
-		$db2->query('SELECT * FROM manual WHERE topic_id = '.$db2->escapeNumber($parent_topic_id));
40
+		$db2->query('SELECT * FROM manual WHERE topic_id = ' . $db2->escapeNumber($parent_topic_id));
41 41
 		echo ('<th width="32">');
42 42
 		if ($db2->nextRecord()) {
43 43
 			$up_topic_id = $db2->getInt('topic_id');
44 44
 			$up_topic = stripslashes($db2->getField('topic'));
45
-			echo ('<a href="/manual.php?'.$up_topic_id.'"><img src="/images/help/up.jpg" width="32" height="32" border="0"></a>');
45
+			echo ('<a href="/manual.php?' . $up_topic_id . '"><img src="/images/help/up.jpg" width="32" height="32" border="0"></a>');
46 46
 		} else
47 47
 			echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
48 48
 		echo ('</th>');
@@ -50,35 +50,35 @@  discard block
 block discarded – undo
50 50
 		// **************************
51 51
 		// **  NEXT
52 52
 		// **************************
53
-		$db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($topic_id).' AND order_id = 1');
53
+		$db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($topic_id) . ' AND order_id = 1');
54 54
 
55 55
 		if (!$db2->getNumRows())
56
-			$db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($order_id + 1));
56
+			$db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($parent_topic_id) . ' AND order_id = ' . $db2->escapeNumber($order_id + 1));
57 57
 
58 58
 		$seenParentIDs = array(0);
59 59
 		$curr_parent_topic_id = $parent_topic_id;
60 60
 		while (!$db2->getNumRows() && !in_array($curr_parent_topic_id, $seenParentIDs)) {
61 61
 			$seenParentIDs[] = $curr_parent_topic_id;
62
-			$db3->query('SELECT * FROM manual WHERE topic_id = '.$db3->escapeNumber($parent_topic_id));
62
+			$db3->query('SELECT * FROM manual WHERE topic_id = ' . $db3->escapeNumber($parent_topic_id));
63 63
 			$db3->nextRecord();
64 64
 			$curr_order_id = $db3->getField('order_id');
65 65
 			$curr_parent_topic_id = $db3->getField('parent_topic_id');
66 66
 
67
-			$db2->query('SELECT * FROM manual WHERE parent_topic_id = '.$db2->escapeNumber($parent_topic_id).' AND order_id = '.$db2->escapeNumber($curr_order_id + 1));
67
+			$db2->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db2->escapeNumber($parent_topic_id) . ' AND order_id = ' . $db2->escapeNumber($curr_order_id + 1));
68 68
 		}
69 69
 
70 70
 		echo ('<th width="32">');
71 71
 		if ($db2->nextRecord()) {
72 72
 			$next_topic_id = $db2->getInt('topic_id');
73 73
 			$next_topic = stripslashes($db2->getField('topic'));
74
-			echo ('<a href="/manual.php?'.$next_topic_id.'"><img src="/images/help/next.jpg" width="32" height="32" border="0"></a>');
74
+			echo ('<a href="/manual.php?' . $next_topic_id . '"><img src="/images/help/next.jpg" width="32" height="32" border="0"></a>');
75 75
 		}
76 76
 		else {
77 77
 			echo ('<img src="/images/help/empty.jpg" width="32" height="32">');
78 78
 		}
79 79
 		echo ('</th>');
80 80
 
81
-		echo ('<th width="100%" align="center" validn="middle" style="font-size:18pt;font-weight:bold;">' . get_numbering($topic_id) . $topic.'</th>');
81
+		echo ('<th width="100%" align="center" validn="middle" style="font-size:18pt;font-weight:bold;">' . get_numbering($topic_id) . $topic . '</th>');
82 82
 		echo ('<th width="32"><a href="/manual_toc.php"><img src="/images/help/contents.jpg" width="32" height="32" border="0"></a></th>');
83 83
 
84 84
 		echo ('</tr>');
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
 		echo ('<tr>');
87 87
 		echo ('<td colspan="5">');
88 88
 		if (isset($previous_topic_id) && $previous_topic_id > 0)
89
-			echo ('<b>Previous:</b> <a href="/manual.php?'.$previous_topic_id.'">' . get_numbering($previous_topic_id) . $previous_topic.'</a>&nbsp;&nbsp;&nbsp;');
89
+			echo ('<b>Previous:</b> <a href="/manual.php?' . $previous_topic_id . '">' . get_numbering($previous_topic_id) . $previous_topic . '</a>&nbsp;&nbsp;&nbsp;');
90 90
 		if (isset($up_topic_id) && $up_topic_id > 0)
91
-			echo ('<b>Up:</b> <a href="/manual.php?'.$up_topic_id.'">' . get_numbering($up_topic_id) . $up_topic.'</a>&nbsp;&nbsp;&nbsp;');
91
+			echo ('<b>Up:</b> <a href="/manual.php?' . $up_topic_id . '">' . get_numbering($up_topic_id) . $up_topic . '</a>&nbsp;&nbsp;&nbsp;');
92 92
 		if (isset($next_topic_id) && $next_topic_id > 0)
93
-			echo ('<b>Next:</b> <a href="/manual.php?'.$next_topic_id.'">' . get_numbering($next_topic_id) . $next_topic.'</a>');
93
+			echo ('<b>Next:</b> <a href="/manual.php?' . $next_topic_id . '">' . get_numbering($next_topic_id) . $next_topic . '</a>');
94 94
 		echo ('</tr>');
95 95
 
96 96
 		echo ('</table>');
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	$db = new SmrMySqlDatabase();
104 104
 
105 105
 	// get current entry
106
-	$db->query('SELECT * FROM manual WHERE topic_id = '.$topic_id);
106
+	$db->query('SELECT * FROM manual WHERE topic_id = ' . $topic_id);
107 107
 	if ($db->nextRecord()) {
108 108
 		$parent_topic_id = $db->getInt('parent_topic_id');
109 109
 		$order_id = $db->getInt('order_id');
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 		$text = stripslashes($db->getField('text'));
112 112
 
113 113
 		echo ('<div id="help_content">');
114
-		echo ('<h1>' . get_numbering($topic_id) . $topic.'</h1>');
115
-		echo ('<p>'.$text.'<p>');
114
+		echo ('<h1>' . get_numbering($topic_id) . $topic . '</h1>');
115
+		echo ('<p>' . $text . '<p>');
116 116
 		echo ('</div>');
117 117
 	} else
118 118
 		echo ('Invalid Topic!');
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
 function echo_subsection($topic_id) {
122 122
 	// database object
123 123
 	$db = new SmrMySqlDatabase();
124
-	$return='';
124
+	$return = '';
125 125
 	// check if there are subsections
126
-	$db->query('SELECT * FROM manual WHERE parent_topic_id = '.$db->escapeNumber($topic_id).' ORDER BY order_id');
126
+	$db->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db->escapeNumber($topic_id) . ' ORDER BY order_id');
127 127
 	if ($db->getNumRows()) {
128 128
 		echo ('<hr noshade width="75%" size="1" align="center"/>');
129 129
 		echo ('<div id="help_menu">');
@@ -137,19 +137,19 @@  discard block
 block discarded – undo
137 137
 }
138 138
 
139 139
 function echo_menu($topic_id) {
140
-	$return='';
140
+	$return = '';
141 141
 	// database object
142 142
 	$db = new SmrMySqlDatabase();
143 143
 
144
-	$db->query('SELECT * FROM manual WHERE parent_topic_id = '.$db->escapeNumber($topic_id).' ORDER BY order_id');
144
+	$db->query('SELECT * FROM manual WHERE parent_topic_id = ' . $db->escapeNumber($topic_id) . ' ORDER BY order_id');
145 145
 	if ($db->getNumRows()) {
146 146
 		echo ('<ul type="disc">');
147
-		while($db->nextRecord()) {
147
+		while ($db->nextRecord()) {
148 148
 			$sub_topic_id = $db->getInt('topic_id');
149 149
 			$order_id = $db->getInt('order_id');
150 150
 			$sub_topic = stripslashes($db->getField('topic'));
151 151
 
152
-			echo ('<li><a href="/manual.php?'.$sub_topic_id.'">' . get_numbering($sub_topic_id) . $sub_topic.'</a></li>');
152
+			echo ('<li><a href="/manual.php?' . $sub_topic_id . '">' . get_numbering($sub_topic_id) . $sub_topic . '</a></li>');
153 153
 			echo_menu($sub_topic_id);
154 154
 		}
155 155
 		echo ('</ul>');
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 function get_numbering($topic_id) {
161 161
 	$db = new SmrMySqlDatabase();
162 162
 
163
-	$db->query('SELECT * FROM manual WHERE topic_id = '.$db->escapeNumber($topic_id));
163
+	$db->query('SELECT * FROM manual WHERE topic_id = ' . $db->escapeNumber($topic_id));
164 164
 	if ($db->nextRecord()) {
165 165
 		$up_topic_id = $db->getInt('parent_topic_id');
166 166
 		$order_id = $db->getInt('order_id');
Please login to merge, or discard this patch.
engine/Default/course_plot_nearest_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(isset($var['RealX'])) {
3
+if (isset($var['RealX'])) {
4 4
 	$realX = $var['RealX'];
5 5
 }
6 6
 else {
@@ -9,14 +9,14 @@  discard block
 block discarded – undo
9 9
 	$xType = $_REQUEST['xtype'];
10 10
 	$X = $_REQUEST['X'];
11 11
 	$realX = Plotter::getX($xType, $X, $player->getGameID(), $player);
12
-	if($realX === false) {
12
+	if ($realX === false) {
13 13
 		create_error('Invalid search.');
14 14
 	}
15 15
 
16
-	$account->log(LOG_TYPE_MOVEMENT, 'Player plots to nearest '.$xType.': '.$X.'.', $player->getSectorID());
16
+	$account->log(LOG_TYPE_MOVEMENT, 'Player plots to nearest ' . $xType . ': ' . $X . '.', $player->getSectorID());
17 17
 }
18 18
 
19
-if($sector->hasX($realX,$player))
19
+if ($sector->hasX($realX, $player))
20 20
 	create_error('Current sector has what you\'re looking for!');
21 21
 
22 22
 $path = Plotter::findReversiblePathToX($realX, $sector, true, $player, $player);
Please login to merge, or discard this patch.
engine/Default/rankings_player_experience.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$template->assign('PageTopic','Experience Rankings');
3
+$template->assign('PageTopic', 'Experience Rankings');
4 4
 
5 5
 Menu::rankings(0, 0);
6 6
 
Please login to merge, or discard this patch.
engine/Default/alliance_broadcast.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
 
6 6
 $container = create_container('message_send_processing.php');
7 7
 $container['alliance_id'] = $var['alliance_id'];
8
-$template->assign('MessageSendFormHref',SmrSession::getNewHREF($container));
8
+$template->assign('MessageSendFormHref', SmrSession::getNewHREF($container));
9 9
 
10 10
 $template->assign('Receiver', 'Whole Alliance');
11
-if(isset($var['preview'])) {
11
+if (isset($var['preview'])) {
12 12
 	$template->assign('Preview', $var['preview']);
13 13
 }
Please login to merge, or discard this patch.
engine/Default/port_payout_processing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 $port = $player->getSectorPort();
3
-switch($var['PayoutType']) {
3
+switch ($var['PayoutType']) {
4 4
 	case 'Raze':
5 5
 		$credits = $port->razePort($player);
6 6
 	break;
Please login to merge, or discard this patch.
engine/Default/rankings_alliance_experience.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-$template->assign('PageTopic','Alliance Experience Rankings');
2
+$template->assign('PageTopic', 'Alliance Experience Rankings');
3 3
 Menu::rankings(1, 0);
4 4
 
5 5
 $db->query('SELECT count(*) FROM alliance
Please login to merge, or discard this patch.
engine/Default/galactic_post_make_paper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$template->assign('PageTopic','Making A Paper');
3
+$template->assign('PageTopic', 'Making A Paper');
4 4
 Menu::galactic_post();
5 5
 
6
-$PHP_OUTPUT.=('What is the title of this edition?<br />');
6
+$PHP_OUTPUT .= ('What is the title of this edition?<br />');
7 7
 $container = array();
8 8
 $container['url'] = 'galactic_post_make_paper_processing.php';
9
-$PHP_OUTPUT.=create_echo_form($container);
10
-$PHP_OUTPUT.=('<input type="text" name="title" id="InputFields" class="center" style="width:525;"><br /><br />');
11
-$PHP_OUTPUT.=create_submit('Make the paper');
12
-$PHP_OUTPUT.=('</form>');
9
+$PHP_OUTPUT .= create_echo_form($container);
10
+$PHP_OUTPUT .= ('<input type="text" name="title" id="InputFields" class="center" style="width:525;"><br /><br />');
11
+$PHP_OUTPUT .= create_submit('Make the paper');
12
+$PHP_OUTPUT .= ('</form>');
Please login to merge, or discard this patch.
engine/Default/game_stats.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,39 +8,39 @@
 block discarded – undo
8 8
 
9 9
 $template->assign('PageTopic', 'Game Stats: ' . $statsGame->getName() . ' (' . $gameID . ')');
10 10
 
11
-$db->query('SELECT count(*) total_players, MAX(experience) max_exp, MAX(alignment) max_align, MIN(alignment) min_alignment, MAX(kills) max_kills FROM player WHERE game_id = '.$gameID.' ORDER BY experience DESC');
11
+$db->query('SELECT count(*) total_players, MAX(experience) max_exp, MAX(alignment) max_align, MIN(alignment) min_alignment, MAX(kills) max_kills FROM player WHERE game_id = ' . $gameID . ' ORDER BY experience DESC');
12 12
 if ($db->nextRecord()) {
13
-	$template->assign('TotalPlayers',$db->getField('total_players'));
14
-	$template->assign('HighestExp',$db->getField('max_exp'));
15
-	$template->assign('HighestAlign',$db->getField('max_align'));
16
-	$template->assign('LowestAlign',$db->getField('min_alignment'));
17
-	$template->assign('HighestKills',$db->getField('max_kills'));
13
+	$template->assign('TotalPlayers', $db->getField('total_players'));
14
+	$template->assign('HighestExp', $db->getField('max_exp'));
15
+	$template->assign('HighestAlign', $db->getField('max_align'));
16
+	$template->assign('LowestAlign', $db->getField('min_alignment'));
17
+	$template->assign('HighestKills', $db->getField('max_kills'));
18 18
 }
19 19
 	
20
-$db->query('SELECT count(*) num_alliance FROM alliance WHERE game_id = '.$gameID);
20
+$db->query('SELECT count(*) num_alliance FROM alliance WHERE game_id = ' . $gameID);
21 21
 if ($db->nextRecord()) {
22
-	$template->assign('TotalAlliances',$db->getField('num_alliance'));
22
+	$template->assign('TotalAlliances', $db->getField('num_alliance'));
23 23
 }
24 24
 
25
-$db->query('SELECT * FROM player WHERE game_id = '.$gameID.' ORDER BY experience DESC LIMIT 10');
25
+$db->query('SELECT * FROM player WHERE game_id = ' . $gameID . ' ORDER BY experience DESC LIMIT 10');
26 26
 if ($db->getNumRows() > 0) {
27 27
 	$rank = 0;
28 28
 	$expRankings = array();
29 29
 	while ($db->nextRecord()) {
30 30
 		$expRankings[++$rank] = SmrPlayer::getPlayer($db->getInt('account_id'), $gameID, false, $db);
31 31
 	}
32
-	$template->assign('ExperienceRankings',$expRankings);
32
+	$template->assign('ExperienceRankings', $expRankings);
33 33
 }
34 34
 
35 35
 
36
-$db->query('SELECT * FROM player WHERE game_id = '.$gameID.' ORDER BY kills DESC LIMIT 10');
36
+$db->query('SELECT * FROM player WHERE game_id = ' . $gameID . ' ORDER BY kills DESC LIMIT 10');
37 37
 if ($db->getNumRows() > 0) {
38 38
 	$rank = 0;
39 39
 	$killRankings = array();
40 40
 	while ($db->nextRecord()) {
41 41
 		$killRankings[++$rank] = SmrPlayer::getPlayer($db->getInt('account_id'), $gameID, false, $db);
42 42
 	}
43
-	$template->assign('KillRankings',$killRankings);
43
+	$template->assign('KillRankings', $killRankings);
44 44
 }
45 45
 
46 46
 function allianceTopTen($gameID, $field) {
Please login to merge, or discard this patch.
engine/Default/chat_rules.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$template->assign('PageTopic','Space Merchant Realms Chat');
3
+$template->assign('PageTopic', 'Space Merchant Realms Chat');
4 4
 
5 5
 $autoChannels = urlencode('#SMR');
6
-if($player->hasAlliance()) {
6
+if ($player->hasAlliance()) {
7 7
 	$allianceChan = $player->getAlliance()->getIrcChannel();
8
-	if($allianceChan != '') {
8
+	if ($allianceChan != '') {
9 9
 		$autoChannels .= ',' . urlencode($allianceChan);
10 10
 	}
11 11
 }
Please login to merge, or discard this patch.