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
lib/db_mysql_debug.inc 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -2,12 +2,12 @@  discard block
 block discarded – undo
2 2
 
3 3
   function table_names() {
4 4
     $this->query('SHOW TABLES');
5
-    $i=0;
6
-    while ($info=mysql_fetch_row($this->Query_ID))
5
+    $i = 0;
6
+    while ($info = mysql_fetch_row($this->Query_ID))
7 7
      {
8
-      $return[$i]['table_name']= $info[0];
9
-      $return[$i]['tablespace_name']=$this->Database;
10
-      $return[$i]['database']=$this->Database;
8
+      $return[$i]['table_name'] = $info[0];
9
+      $return[$i]['tablespace_name'] = $this->Database;
10
+      $return[$i]['database'] = $this->Database;
11 11
       $i++;
12 12
      }
13 13
    return $return;
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     if ($this->lockTable($this->Seq_Table)) {
21 21
       /* get sequence number (locked) and increment */
22
-      $q  = sprintf('select nextid from %s where seq_name = \'%s\'',
22
+      $q = sprintf('select nextid from %s where seq_name = \'%s\'',
23 23
                 $this->Seq_Table,
24 24
                 $seq_name);
25 25
       $id  = @mysql_query($q, $this->Link_ID);
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
       $id = @mysql_query($q, $this->Link_ID);
45 45
       $this->unlock();
46 46
     } else {
47
-      $this->halt('cannot lock '.$this->Seq_Table.' - has it been created?');
47
+      $this->halt('cannot lock ' . $this->Seq_Table . ' - has it been created?');
48 48
       return 0;
49 49
     }
50 50
     return $nextid;
51 51
   }
52 52
 
53 53
   /* public: return table metadata */
54
-  function metadata($table='',$full=false) {
54
+  function metadata($table = '', $full = false) {
55 55
     $count = 0;
56 56
     $id    = 0;
57 57
     $res   = array();
@@ -99,22 +99,22 @@  discard block
 block discarded – undo
99 99
 
100 100
     // made this IF due to performance (one if is faster than $count if's)
101 101
     if (!$full) {
102
-      for ($i=0; $i<$count; $i++) {
103
-        $res[$i]['table'] = @mysql_field_table ($id, $i);
104
-        $res[$i]['name']  = @mysql_field_name  ($id, $i);
105
-        $res[$i]['type']  = @mysql_field_type  ($id, $i);
106
-        $res[$i]['len']   = @mysql_field_len   ($id, $i);
107
-        $res[$i]['flags'] = @mysql_field_flags ($id, $i);
102
+      for ($i = 0; $i < $count; $i++) {
103
+        $res[$i]['table'] = @mysql_field_table($id, $i);
104
+        $res[$i]['name']  = @mysql_field_name($id, $i);
105
+        $res[$i]['type']  = @mysql_field_type($id, $i);
106
+        $res[$i]['len']   = @mysql_field_len($id, $i);
107
+        $res[$i]['flags'] = @mysql_field_flags($id, $i);
108 108
       }
109 109
     } else { // full
110
-      $res['num_fields']= $count;
110
+      $res['num_fields'] = $count;
111 111
 
112
-      for ($i=0; $i<$count; $i++) {
113
-        $res[$i]['table'] = @mysql_field_table ($id, $i);
114
-        $res[$i]['name']  = @mysql_field_name  ($id, $i);
115
-        $res[$i]['type']  = @mysql_field_type  ($id, $i);
116
-        $res[$i]['len']   = @mysql_field_len   ($id, $i);
117
-        $res[$i]['flags'] = @mysql_field_flags ($id, $i);
112
+      for ($i = 0; $i < $count; $i++) {
113
+        $res[$i]['table'] = @mysql_field_table($id, $i);
114
+        $res[$i]['name']  = @mysql_field_name($id, $i);
115
+        $res[$i]['type']  = @mysql_field_type($id, $i);
116
+        $res[$i]['len']   = @mysql_field_len($id, $i);
117
+        $res[$i]['flags'] = @mysql_field_flags($id, $i);
118 118
         $res['meta'][$res[$i]['name']] = $i;
119 119
       }
120 120
     }
Please login to merge, or discard this patch.
lib/Album/album_functions.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 			$page_views = $db->getField('page_views');
36 36
 			$nick = get_album_nick($db->getField('account_id'));
37 37
 
38
-			echo('<a href="?' . urlencode($nick) . '">'.$nick.'</a> ('.$page_views.')<br />');
38
+			echo('<a href="?' . urlencode($nick) . '">' . $nick . '</a> (' . $page_views . ')<br />');
39 39
 		}
40 40
 	}
41 41
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 			$created = $db->getField('created');
52 52
 			$nick = get_album_nick($db->getField('account_id'));
53 53
 
54
-			echo('<span style="font-size:85%;"><b>[' . date(defined('DATE_FULL_SHORT')?DATE_FULL_SHORT:DEFAULT_DATE_FULL_SHORT, $created) . ']</b> Picture of <a href="?' . urlencode($nick) . '">'.$nick.'</a> added</span><br />');
54
+			echo('<span style="font-size:85%;"><b>[' . date(defined('DATE_FULL_SHORT') ?DATE_FULL_SHORT:DEFAULT_DATE_FULL_SHORT, $created) . ']</b> Picture of <a href="?' . urlencode($nick) . '">' . $nick . '</a> added</span><br />');
55 55
 		}
56 56
 	}
57 57
 	else
@@ -69,12 +69,12 @@  discard block
 block discarded – undo
69 69
 	if (SmrSession::$account_id != 0 && $album_id != SmrSession::$account_id)
70 70
 		$db->query('UPDATE album
71 71
 				SET page_views = page_views + 1
72
-				WHERE account_id = '.$db->escapeNumber($album_id).' AND
72
+				WHERE account_id = '.$db->escapeNumber($album_id) . ' AND
73 73
 					approved = \'YES\'');
74 74
 
75 75
 	$db->query('SELECT *
76 76
 				FROM album
77
-				WHERE account_id = '.$db->escapeNumber($album_id).' AND
77
+				WHERE account_id = '.$db->escapeNumber($album_id) . ' AND
78 78
 					approved = \'YES\'');
79 79
 	if ($db->nextRecord()) {
80 80
 		$location = stripslashes($db->getField('location'));
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
 	echo '<td style="text-align: center; width: 30%" valign="middle">';
113 113
 	if ($db->nextRecord()) {
114 114
 		$priv_nick = $db->getField('hof_name');
115
-		echo '<a href="?' . urlencode($priv_nick) . '"><img src="/images/album/rew.jpg" alt="'.$priv_nick.'" border="0"></a>&nbsp;&nbsp;&nbsp;';
115
+		echo '<a href="?' . urlencode($priv_nick) . '"><img src="/images/album/rew.jpg" alt="' . $priv_nick . '" border="0"></a>&nbsp;&nbsp;&nbsp;';
116 116
 	}
117 117
 	echo '</td>';
118
-	echo('<td style="text-align: center;" valign="middle"><span style="font-size:150%;">'.$nick.'</span><br /><span style="font-size:75%;">Views: '.$page_views.'</span></td>');
118
+	echo('<td style="text-align: center;" valign="middle"><span style="font-size:150%;">' . $nick . '</span><br /><span style="font-size:75%;">Views: ' . $page_views . '</span></td>');
119 119
 
120 120
 	$db->query('SELECT hof_name
121 121
 				FROM album JOIN account USING(account_id)
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	echo '<td style="text-align: center; width: 30%" valign="middle">';
127 127
 	if ($db->nextRecord()) {
128 128
 		$next_nick = $db->getField('hof_name');
129
-		echo '&nbsp;&nbsp;&nbsp;<a href="?' . urlencode($next_nick) . '"><img src="/images/album/fwd.jpg" alt="'.$next_nick.'" border="0"></a>';
129
+		echo '&nbsp;&nbsp;&nbsp;<a href="?' . urlencode($next_nick) . '"><img src="/images/album/fwd.jpg" alt="' . $next_nick . '" border="0"></a>';
130 130
 	}
131 131
 	echo '</td>';
132 132
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	echo('<td colspan="2" align="center" valign="middle">');
140 140
 
141 141
 	if ($disabled == false)
142
-		echo('<img src="../upload/'.$album_id.'">');
142
+		echo('<img src="../upload/' . $album_id . '">');
143 143
 	else
144 144
 		echo('<img src="../images/album/disabled.jpg">');
145 145
 
@@ -149,37 +149,37 @@  discard block
 block discarded – undo
149 149
 	if (empty($location))
150 150
 		$location = 'N/A';
151 151
 	echo('<tr>');
152
-	echo('<td align="right" width="10%" style="font-weight:bold;">Location:</td><td>'.$location.'</td>');
152
+	echo('<td align="right" width="10%" style="font-weight:bold;">Location:</td><td>' . $location . '</td>');
153 153
 	echo('</tr>');
154 154
 
155 155
 	if (empty($email))
156 156
 		$email = 'N/A';
157 157
 	echo('<tr>');
158
-	echo('<td align="right" width="10%" style="font-weight:bold;">eMail:</td><td>'.$email.'</td>');
158
+	echo('<td align="right" width="10%" style="font-weight:bold;">eMail:</td><td>' . $email . '</td>');
159 159
 	echo('</tr>');
160 160
 
161 161
 	if (empty($website))
162 162
 		$website = 'N/A';
163 163
 	else
164
-		$website = '<a href="'.$website.'" target="_new">'.$website.'</a>';
164
+		$website = '<a href="' . $website . '" target="_new">' . $website . '</a>';
165 165
 	echo('<tr>');
166
-	echo('<td align="right" width="10%" style="font-weight:bold;">Website:</td><td>'.$website.'</td>');
166
+	echo('<td align="right" width="10%" style="font-weight:bold;">Website:</td><td>' . $website . '</td>');
167 167
 	echo('</tr>');
168 168
 
169 169
 	echo('<tr>');
170 170
 	if (!empty($day) && !empty($month) && !empty($year))
171
-		$birthdate = $month.' / '.$day.' / '.$year;
171
+		$birthdate = $month . ' / ' . $day . ' / ' . $year;
172 172
 	if (empty($birthdate) && !empty($year))
173
-		$birthdate = 'Year '.$year;
173
+		$birthdate = 'Year ' . $year;
174 174
 	if (empty($birthdate))
175 175
 		$birthdate = 'N/A';
176
-	echo('<td align="right" width="10%" style="font-weight:bold;">Birthdate:</td><td>'.$birthdate.'</td>');
176
+	echo('<td align="right" width="10%" style="font-weight:bold;">Birthdate:</td><td>' . $birthdate . '</td>');
177 177
 	echo('</tr>');
178 178
 
179 179
 	if (empty($other))
180 180
 		$other = 'N/A';
181 181
 	echo('<tr>');
182
-	echo('<td align="right" valign="top" width="10%" style="font-weight:bold;">Other&nbsp;Info:<br /><small>(AIM/ICQ)&nbsp;&nbsp;</small></td><td>'.$other.'</td>');
182
+	echo('<td align="right" valign="top" width="10%" style="font-weight:bold;">Other&nbsp;Info:<br /><small>(AIM/ICQ)&nbsp;&nbsp;</small></td><td>' . $other . '</td>');
183 183
 	echo('</tr>');
184 184
 
185 185
 	echo('<tr>');
@@ -190,16 +190,16 @@  discard block
 block discarded – undo
190 190
 				FROM album_has_comments
191 191
 				WHERE album_id = '.$db->escapeNumber($album_id));
192 192
 	while ($db->nextRecord()) {
193
-		$time	= $db->getField('time');
194
-		$postee	= get_album_nick($db->getField('post_id'));
195
-		$msg	= stripslashes($db->getField('msg'));
193
+		$time = $db->getField('time');
194
+		$postee = get_album_nick($db->getField('post_id'));
195
+		$msg = stripslashes($db->getField('msg'));
196 196
 
197
-		echo('<span style="font-size:85%;">[' . date(defined('DATE_FULL_SHORT')?DATE_FULL_SHORT:DEFAULT_DATE_FULL_SHORT, $time) . '] &lt;'.$postee.'&gt; '.$msg.'</span><br />');
197
+		echo('<span style="font-size:85%;">[' . date(defined('DATE_FULL_SHORT') ?DATE_FULL_SHORT:DEFAULT_DATE_FULL_SHORT, $time) . '] &lt;' . $postee . '&gt; ' . $msg . '</span><br />');
198 198
 	}
199 199
 
200 200
 	if (SmrSession::$account_id > 0) {
201 201
 		echo('<form action="album_comment.php">');
202
-		echo('<input type="hidden" name="album_id" value="'.$album_id.'">');
202
+		echo('<input type="hidden" name="album_id" value="' . $album_id . '">');
203 203
 		echo('<table>');
204 204
 		echo('<tr>');
205 205
 		echo('<td style="color:green; font-size:70%;">Nick:<br /><input type="text" size="10" name="nick" value="' . htmlspecialchars(get_album_nick(SmrSession::$account_id)) . '" id="InputFields" readonly></td>');
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 		echo('<td style="color:green; font-size:70%;"><br /><input type="submit" value="Send" id="InputFields"></td>');
208 208
 		$db->query('SELECT *
209 209
 					FROM account_has_permission
210
-					WHERE account_id = '.$db->escapeNumber(SmrSession::$account_id).' AND
210
+					WHERE account_id = '.$db->escapeNumber(SmrSession::$account_id) . ' AND
211 211
 						permission_id = '.$db->escapeNumber(PERMISSION_MODERATE_PHOTO_ALBUM));
212 212
 		if ($db->nextRecord())
213 213
 			echo('<td style="color:green; font-size:70%;"><br /><input type="submit" name="action" value="Moderate" id="InputFields"></td>');
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 
243 243
 		$nick = get_album_nick($album_id);
244 244
 
245
-		echo('<a href="?' . urlencode($nick) . '" style="font-size:80%;">'.$nick.'</a><br />');
245
+		echo('<a href="?' . urlencode($nick) . '" style="font-size:80%;">' . $nick . '</a><br />');
246 246
 
247 247
 		if (floor(sizeof($album_ids) / 4) > 0 && $count % floor(sizeof($album_ids) / 4) == 0)
248 248
 			echo('</td><td width="25%" valign="top">');
Please login to merge, or discard this patch.
lib/Hunter Wars/SmrLocation.class.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,14 +3,14 @@
 block discarded – undo
3 3
 class SmrLocation extends AbstractSmrLocation {
4 4
 
5 5
 	public function &getShipsSold() {
6
-		if(!isset($this->shipsSold)) {
6
+		if (!isset($this->shipsSold)) {
7 7
 			$this->shipsSold = array();
8 8
 			$this->db->query('SELECT * FROM location_sells_ships
9 9
 			                  JOIN ship_type USING (ship_type_id)
10 10
 			                  WHERE ' . $this->SQL . '
11 11
 			                    AND ship_class_id != ' . $this->db->escapeNumber(SmrShip::SHIP_CLASS_RAIDER) . '
12 12
 			                    AND ship_type_id != ' . $this->db->escapeNumber(SHIP_TYPE_PLANETARY_SUPER_FREIGHTER));
13
-			while($this->db->nextRecord()) {
13
+			while ($this->db->nextRecord()) {
14 14
 				$shipTypeID = $this->db->getInt('ship_type_id');
15 15
 				$this->shipsSold[$shipTypeID] = AbstractSmrShip::getBaseShip(Globals::getGameType(SmrSession::getGameID()), $shipTypeID);
16 16
 			}
Please login to merge, or discard this patch.
config/SmrMySqlSecrets.sample.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 trait SmrMySqlSecrets {
3 3
 	private static $databaseName = 'smr_live';
4 4
 	private static $host = 'smr-mysql'; // must match MYSQL_HOST in .env
5
-	private static $user = 'smr';       // must match MYSQL_USER in .env
6
-	private static $password = 'smr';   // must match MYSQL_PASSWORD in .env
5
+	private static $user = 'smr'; // must match MYSQL_USER in .env
6
+	private static $password = 'smr'; // must match MYSQL_PASSWORD in .env
7 7
 
8 8
 	// Set to null to use defaults
9 9
 	private static $port = null;
Please login to merge, or discard this patch.
engine/Default/rankings_player_kills.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','Kill Rankings');
3
+$template->assign('PageTopic', 'Kill Rankings');
4 4
 
5 5
 Menu::rankings(0, 2);
6 6
 
Please login to merge, or discard this patch.
engine/Default/bounty_claim.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-$template->assign('PageTopic','Bounty Payout');
3
+$template->assign('PageTopic', 'Bounty Payout');
4 4
 
5 5
 require_once(get_file_loc('menu_hq.inc'));
6 6
 if ($sector->hasHQ()) {
@@ -12,11 +12,11 @@  discard block
 block discarded – undo
12 12
 	$bounties = $player->getClaimableBounties('UG');
13 13
 }
14 14
 
15
-$claimText='';
15
+$claimText = '';
16 16
 
17
-if(!isset($var['ClaimText'])) {
17
+if (!isset($var['ClaimText'])) {
18 18
 	if (!empty($bounties)) {
19
-		$claimText.=('You have claimed the following bounties<br /><br />');
19
+		$claimText .= ('You have claimed the following bounties<br /><br />');
20 20
 	
21 21
 		foreach ($bounties as $bounty) {
22 22
 			// get bounty id from db
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
 			// add bounty to our cash
31 31
 			$player->increaseCredits($amount);
32 32
 			$account->increaseSmrCredits($smrCredits);
33
-			$claimText.=('<span class="yellow">'.$bounty['player']->getPlayerName().'</span> : <span class="creds">' . number_format($amount) . '</span> credits and <span class="red">' . number_format($smrCredits) . '</span> SMR credits<br />');
33
+			$claimText .= ('<span class="yellow">' . $bounty['player']->getPlayerName() . '</span> : <span class="creds">' . number_format($amount) . '</span> credits and <span class="red">' . number_format($smrCredits) . '</span> SMR credits<br />');
34 34
 	
35 35
 			// add HoF stat
36
-			$player->increaseHOF(1,array('Bounties','Claimed','Results'), HOF_PUBLIC);
37
-			$player->increaseHOF($amount,array('Bounties','Claimed','Money'), HOF_PUBLIC);
38
-			$player->increaseHOF($smrCredits,array('Bounties','Claimed','SMR Credits'), HOF_PUBLIC);
36
+			$player->increaseHOF(1, array('Bounties', 'Claimed', 'Results'), HOF_PUBLIC);
37
+			$player->increaseHOF($amount, array('Bounties', 'Claimed', 'Money'), HOF_PUBLIC);
38
+			$player->increaseHOF($smrCredits, array('Bounties', 'Claimed', 'SMR Credits'), HOF_PUBLIC);
39 39
 	
40 40
 			// delete bounty
41 41
 			$db->query('DELETE FROM bounty
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
 		}
46 46
 	}
47 47
 	else {
48
-		$claimText.=('You have no claimable bounties<br /><br />');
48
+		$claimText .= ('You have no claimable bounties<br /><br />');
49 49
 	}
50 50
 	
51
-	SmrSession::updateVar('ClaimText',$claimText);
51
+	SmrSession::updateVar('ClaimText', $claimText);
52 52
 }
53
-$PHP_OUTPUT.=$var['ClaimText'];
53
+$PHP_OUTPUT .= $var['ClaimText'];
Please login to merge, or discard this patch.
engine/Default/album_delete_processing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 }
12 12
 
13 13
 $container = create_container('skeleton.php');
14
-if(!is_object($player)) {
14
+if (!is_object($player)) {
15 15
 	$container['body'] = 'game_play.php';
16 16
 } else {
17 17
 	$container['body'] = 'current_sector.php';
Please login to merge, or discard this patch.
engine/Default/message_blacklist_add.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@  discard block
 block discarded – undo
4 4
 $container['url'] = 'skeleton.php';
5 5
 $container['body'] = 'message_blacklist.php';
6 6
 
7
-if(!isset($_REQUEST['PlayerName']) && !isset($var['account_id'])) {
7
+if (!isset($_REQUEST['PlayerName']) && !isset($var['account_id'])) {
8 8
 	$container['error'] = 1;
9 9
 	forward($container);
10 10
 }
11 11
 
12
-if(isset($var['account_id'])) {
12
+if (isset($var['account_id'])) {
13 13
 	$blacklisted_id = $var['account_id'];
14 14
 }
15 15
 else {
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 	$db->query('SELECT account_id FROM player WHERE player_name=' . $db->escapeString($_REQUEST['PlayerName']) . ' AND game_id=' . $db->escapeNumber($player->getGameID()) . ' LIMIT 1');
19 19
 
20
-	if(!$db->nextRecord()) {
20
+	if (!$db->nextRecord()) {
21 21
 		$container['error'] = 1;
22 22
 		forward($container);
23 23
 	}
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 $db->query('SELECT account_id FROM message_blacklist WHERE account_id=' . $db->escapeNumber($player->getAccountID()) . ' AND blacklisted_id=' . $db->escapeNumber($blacklisted_id) . ' AND game_id=' . $db->escapeNumber($player->getGameID()) . ' LIMIT 1');
28 28
 
29
-if($db->nextRecord()) {
29
+if ($db->nextRecord()) {
30 30
 	$container['error'] = 2;
31 31
 	forward($container);
32 32
 }
Please login to merge, or discard this patch.
engine/Default/rankings_alliance_vs_alliance.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','Alliance VS Alliance Rankings');
3
+$template->assign('PageTopic', 'Alliance VS Alliance Rankings');
4 4
 
5 5
 Menu::rankings(1, 4);
6 6
 $db2 = new SmrMySqlDatabase();
Please login to merge, or discard this patch.