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
htdocs/resend_password_processing.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,6 @@
 block discarded – undo
38 38
 	header('Location: /reset_password.php');
39 39
 	exit;
40 40
 
41
-}
42
-catch(Throwable $e) {
41
+} catch(Throwable $e) {
43 42
 	handleException($e);
44 43
 }
Please login to merge, or discard this patch.
htdocs/weapon_list.php 1 patch
Braces   +13 added lines, -12 removed lines patch added patch discarded remove patch
@@ -115,18 +115,20 @@  discard block
 block discarded – undo
115 115
 	
116 116
 	echo ('<body onload="resetBoxes()">');
117 117
 	$seq = isset($_REQUEST['seq']) ? $_REQUEST['seq'] : '';
118
-	if (empty($seq))
119
-		$seq = 'ASC';
120
-	elseif ($seq == 'ASC')
121
-		$seq = 'DESC';
122
-	else
123
-		$seq = 'ASC';
118
+	if (empty($seq)) {
119
+			$seq = 'ASC';
120
+	} elseif ($seq == 'ASC') {
121
+			$seq = 'DESC';
122
+	} else {
123
+			$seq = 'ASC';
124
+	}
124 125
 	
125 126
 	$columnNames = array('weapon_name','race_name','cost','shield_damage','armour_damage','accuracy','power_level','buyer_restriction');
126
-	if (isset($_REQUEST['order'])&&in_array($_REQUEST['order'],$columnNames))
127
-		$order_by = $_REQUEST['order'];
128
-	else
129
-		$order_by = 'weapon_type_id';
127
+	if (isset($_REQUEST['order'])&&in_array($_REQUEST['order'],$columnNames)) {
128
+			$order_by = $_REQUEST['order'];
129
+	} else {
130
+			$order_by = 'weapon_type_id';
131
+	}
130 132
 	
131 133
 	//$race 		= buildSelector($db, "racePick", "race_name", "race");
132 134
 	$race = "";
@@ -182,8 +184,7 @@  discard block
 block discarded – undo
182 184
 	
183 185
 
184 186
 
185
-}
186
-catch(Throwable $e) {
187
+} catch(Throwable $e) {
187 188
 	handleException($e);
188 189
 }
189 190
 
Please login to merge, or discard this patch.
htdocs/level_requirements.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@
 block discarded – undo
29 29
 		</tr><?php
30 30
 	} ?>
31 31
 	</table><?php
32
-}
33
-catch(Throwable $e) {
32
+} catch(Throwable $e) {
34 33
 	handleException($e);
35 34
 }
36 35
 ?>
Please login to merge, or discard this patch.
htdocs/manual.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,8 +5,9 @@  discard block
 block discarded – undo
5 5
 	require_once(ENGINE . 'Default/help.inc');
6 6
 
7 7
 	$topic_id = $_SERVER['QUERY_STRING'];
8
-	if (empty($topic_id)||!is_numeric($topic_id))
9
-		$topic_id = 1;
8
+	if (empty($topic_id)||!is_numeric($topic_id)) {
9
+			$topic_id = 1;
10
+	}
10 11
 	?>
11 12
 <!DOCTYPE html>
12 13
 
@@ -48,8 +49,7 @@  discard block
 block discarded – undo
48 49
 
49 50
 	</body>
50 51
 	</html><?php
51
-}
52
-catch(Throwable $e) {
52
+} catch(Throwable $e) {
53 53
 	handleException($e);
54 54
 }
55 55
 ?>
Please login to merge, or discard this patch.
htdocs/login_create_processing.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -148,8 +148,7 @@  discard block
 block discarded – undo
148 148
 	// creates a new user account object
149 149
 	try {
150 150
 		$account = SmrAccount::createAccount($login, $password, $email, $timez, $referral);
151
-	}
152
-	catch(AccountNotFoundException $e) {
151
+	} catch(AccountNotFoundException $e) {
153 152
 		$msg = 'Invalid referral account ID!';
154 153
 		header('Location: /error.php?msg=' . rawurlencode(htmlspecialchars($msg, ENT_QUOTES)));
155 154
 		exit;
@@ -192,7 +191,6 @@  discard block
 block discarded – undo
192 191
 	$container['login'] = $login;
193 192
 	$container['password'] = $password;
194 193
 	forwardURL($container);
195
-}
196
-catch(Throwable $e) {
194
+} catch(Throwable $e) {
197 195
 	handleException($e);
198 196
 }
Please login to merge, or discard this patch.
htdocs/login.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@
 block discarded – undo
26 26
 		exit;
27 27
 	}
28 28
 	
29
-	if(isset($_REQUEST['msg']))
30
-		$template->assign('Message',htmlentities(trim($_REQUEST['msg']),ENT_COMPAT,'utf-8'));
29
+	if(isset($_REQUEST['msg'])) {
30
+			$template->assign('Message',htmlentities(trim($_REQUEST['msg']),ENT_COMPAT,'utf-8'));
31
+	}
31 32
 
32 33
 	require_once(ENGINE . 'Default/login.inc');
33 34
 
34
-}
35
-catch(Throwable $e) {
35
+} catch(Throwable $e) {
36 36
 	handleException($e);
37 37
 }
Please login to merge, or discard this patch.
htdocs/manual_toc.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@
 block discarded – undo
68 68
 
69 69
 	</body>
70 70
 </html><?php
71
-}
72
-catch(Throwable $e) {
71
+} catch(Throwable $e) {
73 72
 	handleException($e);
74 73
 }
75 74
 ?>
Please login to merge, or discard this patch.
htdocs/album/index.php 1 patch
Braces   +21 added lines, -20 removed lines patch added patch discarded remove patch
@@ -56,36 +56,37 @@
 block discarded – undo
56 56
 						  approved = \'YES\'
57 57
 					ORDER BY hof_name');
58 58
 			
59
-			if ($db2->nextRecord())
60
-				album_entry($db2->getField('album_id'));
61
-			else {
59
+			if ($db2->nextRecord()) {
60
+							album_entry($db2->getField('album_id'));
61
+			} else {
62 62
 				// get all id's and build array
63 63
 				$album_ids = array();
64 64
 		
65
-				while ($db->nextRecord())
66
-					$album_ids[] = $db->getField('album_id');
65
+				while ($db->nextRecord()) {
66
+									$album_ids[] = $db->getField('album_id');
67
+				}
67 68
 		
68 69
 				// double check if we have id's
69
-				if (count($album_ids) > 0)
70
-					search_result($album_ids);
71
-				else
72
-					main_page();
70
+				if (count($album_ids) > 0) {
71
+									search_result($album_ids);
72
+				} else {
73
+									main_page();
74
+				}
73 75
 			}
74 76
 	
77
+		} elseif ($db->getNumRows() == 1) {
78
+			if ($db->nextRecord()) {
79
+							album_entry($db->getField('album_id'));
80
+			} else {
81
+							main_page();
82
+			}
83
+		} else {
84
+					main_page();
75 85
 		}
76
-		elseif ($db->getNumRows() == 1) {
77
-			if ($db->nextRecord())
78
-				album_entry($db->getField('album_id'));
79
-			else
80
-				main_page();
81
-		}
82
-		else
86
+	} else {
83 87
 			main_page();
84 88
 	}
85
-	else
86
-		main_page();
87
-}
88
-catch(Throwable $e) {
89
+	} catch(Throwable $e) {
89 90
 	handleException($e);
90 91
 }
91 92
 ?>
Please login to merge, or discard this patch.
htdocs/album/album_comment.php 1 patch
Braces   +28 added lines, -22 removed lines patch added patch discarded remove patch
@@ -10,25 +10,30 @@  discard block
 block discarded – undo
10 10
 	require_once(LIB . 'Default/smr.inc');
11 11
 	require_once(LIB . 'Album/album_functions.php');
12 12
 
13
-	if (SmrSession::$account_id == 0)
14
-		create_error_offline('You need to logged in to post comments!');
13
+	if (SmrSession::$account_id == 0) {
14
+			create_error_offline('You need to logged in to post comments!');
15
+	}
15 16
 
16
-	if (!isset($_GET['album_id']) || empty($_GET['album_id']))
17
-		create_error_offline('Which picture do you want comment?');
18
-	else
19
-		$album_id = $_GET['album_id'];
17
+	if (!isset($_GET['album_id']) || empty($_GET['album_id'])) {
18
+			create_error_offline('Which picture do you want comment?');
19
+	} else {
20
+			$album_id = $_GET['album_id'];
21
+	}
20 22
 
21
-	if (!is_numeric($album_id))
22
-		create_error_offline('Picture ID has to be numeric!');
23
+	if (!is_numeric($album_id)) {
24
+			create_error_offline('Picture ID has to be numeric!');
25
+	}
23 26
 
24
-	if ($album_id < 1)
25
-		create_error_offline('Picture ID has to be positive!');
27
+	if ($album_id < 1) {
28
+			create_error_offline('Picture ID has to be positive!');
29
+	}
26 30
 
27 31
 	$account = SmrAccount::getAccount(SmrSession::$account_id);
28 32
 
29 33
 	if (isset($_GET['action']) && $_GET['action'] == 'Moderate') {
30
-		if(!$account->hasPermission(PERMISSION_MODERATE_PHOTO_ALBUM))
31
-			create_error_offline('You do not have permission to do that!');
34
+		if(!$account->hasPermission(PERMISSION_MODERATE_PHOTO_ALBUM)) {
35
+					create_error_offline('You do not have permission to do that!');
36
+		}
32 37
 		$container = create_container('skeleton.php', 'album_moderate.php');
33 38
 		$container['account_id'] = $album_id;
34 39
 
@@ -37,10 +42,11 @@  discard block
 block discarded – undo
37 42
 
38 43
 	$db = new SmrMySqlDatabase();
39 44
 
40
-	if (!isset($_GET['comment']) || empty($_GET['comment']))
41
-		create_error_offline('Please enter a comment.');
42
-	else
43
-		$comment = $_GET['comment'];
45
+	if (!isset($_GET['comment']) || empty($_GET['comment'])) {
46
+			create_error_offline('Please enter a comment.');
47
+	} else {
48
+			$comment = $_GET['comment'];
49
+	}
44 50
 
45 51
 	// get current time
46 52
 	$curr_time = TIME;
@@ -52,10 +58,11 @@  discard block
 block discarded – undo
52 58
 	$db->lockTable('album_has_comments');
53 59
 
54 60
 	$db->query('SELECT MAX(comment_id) FROM album_has_comments WHERE album_id = '.$db->escapeNumber($album_id));
55
-	if ($db->nextRecord())
56
-		$comment_id = $db->getField('MAX(comment_id)') + 1;
57
-	else
58
-		$comment_id = 1;
61
+	if ($db->nextRecord()) {
62
+			$comment_id = $db->getField('MAX(comment_id)') + 1;
63
+	} else {
64
+			$comment_id = 1;
65
+	}
59 66
 
60 67
 	$db->query('INSERT INTO album_has_comments
61 68
 				(album_id, comment_id, time, post_id, msg)
@@ -64,7 +71,6 @@  discard block
 block discarded – undo
64 71
 
65 72
 	header('Location: /album/?' . get_album_nick($album_id));
66 73
 	exit;
67
-}
68
-catch(Throwable $e) {
74
+} catch(Throwable $e) {
69 75
 	handleException($e);
70 76
 }
Please login to merge, or discard this patch.