Completed
Push — master ( 48e459...9276af )
by Yannick
06:03
created
statistics-airline-country.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,9 @@
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 $Stats = new Stats();
6 6
 $title = _("Statistics").' - '._("Most common Airline by Country");
7
-if (!isset($filter_name)) $filter_name = '';
7
+if (!isset($filter_name)) {
8
+	$filter_name = '';
9
+}
8 10
 require_once('header.php');
9 11
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
10 12
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
Please login to merge, or discard this patch.
statistics-airline.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
 $Stats = new Stats();
6 6
 $title = _("Statistics").' - '._("Most common Airline");
7 7
 require_once('header.php');
8
-if (!isset($filter_name)) $filter_name = '';
8
+if (!isset($filter_name)) {
9
+	$filter_name = '';
10
+}
9 11
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
10 12
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
11 13
 include('statistics-sub-menu.php'); 
Please login to merge, or discard this patch.
pilot.php 1 patch
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,9 @@  discard block
 block discarded – undo
31 31
 			}
32 32
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
33 33
 		}
34
-		if ($firstLetter != "'") $previous = $firstLetter;
34
+		if ($firstLetter != "'") {
35
+			$previous = $firstLetter;
36
+		}
35 37
 	}
36 38
 	print '</div>';
37 39
 	$previous = null;
@@ -46,10 +48,15 @@  discard block
 block discarded – undo
46 48
 				}
47 49
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
48 50
 			}
49
-			if ($firstLetter != "'") $previous = $firstLetter;
51
+			if ($firstLetter != "'") {
52
+				$previous = $firstLetter;
53
+			}
50 54
 			print '<div class="alphabet-item">';
51
-			if (isset($value['pilot_id']) && $value['pilot_id'] != '') print '<a href="'.$globalURL.'/pilot/'.$value['pilot_id'].'">'.$value['pilot_name'].' ('.$value['pilot_id'].')';
52
-			else print '<a href="'.$globalURL.'/pilot/'.$value['pilot_name'].'">'.$value['pilot_name'];
55
+			if (isset($value['pilot_id']) && $value['pilot_id'] != '') {
56
+				print '<a href="'.$globalURL.'/pilot/'.$value['pilot_id'].'">'.$value['pilot_name'].' ('.$value['pilot_id'].')';
57
+			} else {
58
+				print '<a href="'.$globalURL.'/pilot/'.$value['pilot_name'].'">'.$value['pilot_name'];
59
+			}
53 60
 			print '</a>';
54 61
 			print '</div>';
55 62
 		}
Please login to merge, or discard this patch.
owner-detailed.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,12 @@
 block discarded – undo
53 53
 	{
54 54
 		$title = sprintf(_("Detailed View for %s"),$spotter_array[0]['aircraft_owner']);
55 55
 		//$ident = $spotter_array[0]['ident'];
56
-		if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude'];
57
-		if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude'];
56
+		if (isset($spotter_array[0]['latitude'])) {
57
+			$latitude = $spotter_array[0]['latitude'];
58
+		}
59
+		if (isset($spotter_array[0]['longitude'])) {
60
+			$longitude = $spotter_array[0]['longitude'];
61
+		}
58 62
 		require_once('header.php');
59 63
 		/*
60 64
 		if (isset($globalArchive) && $globalArchive) {
Please login to merge, or discard this patch.
owner.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,9 @@  discard block
 block discarded – undo
33 33
 			}
34 34
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
35 35
 		}
36
-		if ($firstLetter != "'" && $firstLetter != '"') $previous = $firstLetter;
36
+		if ($firstLetter != "'" && $firstLetter != '"') {
37
+			$previous = $firstLetter;
38
+		}
37 39
 	}
38 40
 	print '</div>';
39 41
 	$previous = null;
@@ -48,7 +50,9 @@  discard block
 block discarded – undo
48 50
 				}
49 51
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
50 52
 			}
51
-			if ($firstLetter != "'" && $firstLetter != '"') $previous = $firstLetter;
53
+			if ($firstLetter != "'" && $firstLetter != '"') {
54
+				$previous = $firstLetter;
55
+			}
52 56
 			print '<div class="alphabet-item">';
53 57
 			print '<a href="'.$globalURL.'/owner/'.$value['owner_name'].'">';
54 58
 			print $value['owner_name'];
Please login to merge, or discard this patch.
require/class.Common.php 1 patch
Braces   +60 added lines, -25 removed lines patch added patch discarded remove patch
@@ -27,8 +27,11 @@  discard block
 block discarded – undo
27 27
 		} else {
28 28
 			curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
29 29
 		}
30
-		if ($timeout == '') curl_setopt($ch, CURLOPT_TIMEOUT, 10); 
31
-		else curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); 
30
+		if ($timeout == '') {
31
+			curl_setopt($ch, CURLOPT_TIMEOUT, 10);
32
+		} else {
33
+			curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
34
+		}
32 35
 		curl_setopt($ch, CURLOPT_HEADERFUNCTION, array('Common',"curlResponseHeaderCallback"));
33 36
 		if ($type == 'post') {
34 37
 			curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
@@ -74,8 +77,9 @@  discard block
 block discarded – undo
74 77
 	private function curlResponseHeaderCallback($ch, $headerLine) {
75 78
 		//global $cookies;
76 79
 		$cookies = array();
77
-		if (preg_match('/^Set-Cookie:\s*([^;]*)/mi', $headerLine, $cookie) == 1)
78
-			$cookies[] = $cookie;
80
+		if (preg_match('/^Set-Cookie:\s*([^;]*)/mi', $headerLine, $cookie) == 1) {
81
+					$cookies[] = $cookie;
82
+		}
79 83
 		return strlen($headerLine); // Needed by curl
80 84
 	}
81 85
 
@@ -86,11 +90,15 @@  discard block
 block discarded – undo
86 90
 		curl_setopt($ch, CURLOPT_URL, $url);
87 91
 		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
88 92
 		curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
89
-		if ($referer != '') curl_setopt($ch, CURLOPT_REFERER, $referer);
93
+		if ($referer != '') {
94
+			curl_setopt($ch, CURLOPT_REFERER, $referer);
95
+		}
90 96
 		curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5');
91 97
 		curl_setopt($ch, CURLOPT_FILE, $fp);
92 98
 		curl_exec($ch);
93
-		if (curl_errno($ch) && $globalDebug) echo 'Download error: '.curl_error($ch);
99
+		if (curl_errno($ch) && $globalDebug) {
100
+			echo 'Download error: '.curl_error($ch);
101
+		}
94 102
 		curl_close($ch);
95 103
 		fclose($fp);
96 104
 	}
@@ -101,10 +109,16 @@  discard block
 block discarded – undo
101 109
 	* @return Array array of the tables in HTML page
102 110
 	*/
103 111
 	public function table2array($data) {
104
-		if (!is_string($data)) return array();
105
-		if ($data == '') return array();
112
+		if (!is_string($data)) {
113
+			return array();
114
+		}
115
+		if ($data == '') {
116
+			return array();
117
+		}
106 118
 		$html = str_get_html($data);
107
-		if ($html === false) return array();
119
+		if ($html === false) {
120
+			return array();
121
+		}
108 122
 		$tabledata=array();
109 123
 		foreach($html->find('tr') as $element)
110 124
 		{
@@ -139,7 +153,9 @@  discard block
 block discarded – undo
139 153
 	*/
140 154
 	public function text2array($data) {
141 155
 		$html = str_get_html($data);
142
-		if ($html === false) return array();
156
+		if ($html === false) {
157
+			return array();
158
+		}
143 159
 		$tabledata=array();
144 160
 		foreach($html->find('p') as $element)
145 161
 		{
@@ -160,7 +176,9 @@  discard block
 block discarded – undo
160 176
 	* @return Float Distance in $unit
161 177
 	*/
162 178
 	public function distance($lat, $lon, $latc, $lonc, $unit = 'km') {
163
-		if ($lat == $latc && $lon == $lonc) return 0;
179
+		if ($lat == $latc && $lon == $lonc) {
180
+			return 0;
181
+		}
164 182
 		$dist = rad2deg(acos(sin(deg2rad(floatval($lat)))*sin(deg2rad(floatval($latc)))+ cos(deg2rad(floatval($lat)))*cos(deg2rad(floatval($latc)))*cos(deg2rad(floatval($lon)-floatval($lonc)))))*60*1.1515;
165 183
 		if ($unit == "km") {
166 184
 			return round($dist * 1.609344);
@@ -184,10 +202,16 @@  discard block
 block discarded – undo
184 202
 	public function withinThreshold ($timeDifference, $distance) {
185 203
 		$x = abs($timeDifference);
186 204
 		$d = abs($distance);
187
-		if ($x == 0 || $d == 0) return true;
205
+		if ($x == 0 || $d == 0) {
206
+			return true;
207
+		}
188 208
 		// may be due to Internet jitter; distance is realistic
189
-		if ($x < 0.7 && $d < 2000) return true;
190
-		else return $d/$x < 1500*0.27778; // 1500 km/h max
209
+		if ($x < 0.7 && $d < 2000) {
210
+			return true;
211
+		} else {
212
+			return $d/$x < 1500*0.27778;
213
+		}
214
+		// 1500 km/h max
191 215
 	}
192 216
 
193 217
 
@@ -247,7 +271,9 @@  discard block
 block discarded – undo
247 271
 	public function hex2str($hex) {
248 272
 		$str = '';
249 273
 		$hexln = strlen($hex);
250
-		for($i=0;$i<$hexln;$i+=2) $str .= chr(hexdec(substr($hex,$i,2)));
274
+		for($i=0;$i<$hexln;$i+=2) {
275
+			$str .= chr(hexdec(substr($hex,$i,2)));
276
+		}
251 277
 		return $str;
252 278
 	}
253 279
 	
@@ -275,8 +301,11 @@  discard block
 block discarded – undo
275 301
 		$b = $lat2 - $lat1;
276 302
 		$c = -($a*$lat1+$b*$lon1);
277 303
 		$d = $a*$lat3+$b*$lon3+$c;
278
-		if ($d > -$approx && $d < $approx) return true;
279
-		else return false;
304
+		if ($d > -$approx && $d < $approx) {
305
+			return true;
306
+		} else {
307
+			return false;
308
+		}
280 309
 	}
281 310
 	
282 311
 	public function array_merge_noappend() {
@@ -312,7 +341,9 @@  discard block
 block discarded – undo
312 341
 			return $result;
313 342
 		}
314 343
 		$handle = @opendir('./locale');
315
-		if ($handle === false) return $result;
344
+		if ($handle === false) {
345
+			return $result;
346
+		}
316 347
 		while (false !== ($file = readdir($handle))) {
317 348
 			$path = './locale'.'/'.$file.'/LC_MESSAGES/fam.mo';
318 349
 			if ($file != "." && $file != ".." && @file_exists($path)) {
@@ -379,8 +410,9 @@  discard block
 block discarded – undo
379 410
 		$error = false; 
380 411
 		if ($fp_out = gzopen($dest, $mode)) { 
381 412
 			if ($fp_in = fopen($source,'rb')) { 
382
-				while (!feof($fp_in)) 
383
-					gzwrite($fp_out, fread($fp_in, 1024 * 512)); 
413
+				while (!feof($fp_in)) {
414
+									gzwrite($fp_out, fread($fp_in, 1024 * 512));
415
+				}
384 416
 				fclose($fp_in); 
385 417
 			} else {
386 418
 				$error = true; 
@@ -389,14 +421,17 @@  discard block
 block discarded – undo
389 421
 		} else {
390 422
 			$error = true; 
391 423
 		}
392
-		if ($error)
393
-			return false; 
394
-		else
395
-			return $dest; 
424
+		if ($error) {
425
+					return false;
426
+		} else {
427
+					return $dest;
428
+		}
396 429
 	} 
397 430
 	
398 431
 	public function remove_accents($string) {
399
-		if ( !preg_match('/[\x80-\xff]/', $string) ) return $string;
432
+		if ( !preg_match('/[\x80-\xff]/', $string) ) {
433
+			return $string;
434
+		}
400 435
 		$chars = array(
401 436
 		    // Decompositions for Latin-1 Supplement
402 437
 		    chr(195).chr(128) => 'A', chr(195).chr(129) => 'A',
Please login to merge, or discard this patch.
require/class.Connection.php 1 patch
Braces   +77 added lines, -30 removed lines patch added patch discarded remove patch
@@ -64,8 +64,11 @@  discard block
 block discarded – undo
64 64
 				$globalDBSname = $globalDBname;
65 65
 				$globalDBSuser = $globalDBuser;
66 66
 				$globalDBSpass = $globalDBpass;
67
-				if (!isset($globalDBport) || $globalDBport === NULL || $globalDBport == '') $globalDBSport = 3306;
68
-				else $globalDBSport = $globalDBport;
67
+				if (!isset($globalDBport) || $globalDBport === NULL || $globalDBport == '') {
68
+					$globalDBSport = 3306;
69
+				} else {
70
+					$globalDBSport = $globalDBport;
71
+				}
69 72
 			} else {
70 73
 				$DBname = 'default';
71 74
 				$globalDBSdriver = $globalDBdriver;
@@ -73,8 +76,11 @@  discard block
 block discarded – undo
73 76
 				$globalDBSname = $globalDBname;
74 77
 				$globalDBSuser = $user;
75 78
 				$globalDBSpass = $pass;
76
-				if (!isset($globalDBport) || $globalDBport === NULL || $globalDBport == '') $globalDBSport = 3306;
77
-				else $globalDBSport = $globalDBport;
79
+				if (!isset($globalDBport) || $globalDBport === NULL || $globalDBport == '') {
80
+					$globalDBSport = 3306;
81
+				} else {
82
+					$globalDBSport = $globalDBport;
83
+				}
78 84
 			}
79 85
 		} else {
80 86
 			$globalDBSdriver = $globalDB[$DBname]['driver'];
@@ -82,11 +88,16 @@  discard block
 block discarded – undo
82 88
 			$globalDBSname = $globalDB[$DBname]['name'];
83 89
 			$globalDBSuser = $globalDB[$DBname]['user'];
84 90
 			$globalDBSpass = $globalDB[$DBname]['pass'];
85
-			if (isset($globalDB[$DBname]['port'])) $globalDBSport = $globalDB[$DBname]['port'];
86
-			else $globalDBSport = 3306;
91
+			if (isset($globalDB[$DBname]['port'])) {
92
+				$globalDBSport = $globalDB[$DBname]['port'];
93
+			} else {
94
+				$globalDBSport = 3306;
95
+			}
87 96
 		}
88 97
 		// Set number of try to connect to DB
89
-		if (!isset($globalDBretry) || $globalDBretry == '' || $globalDBretry === NULL) $globalDBretry = 5;
98
+		if (!isset($globalDBretry) || $globalDBretry == '' || $globalDBretry === NULL) {
99
+			$globalDBretry = 5;
100
+		}
90 101
 		$i = 0;
91 102
 		while (true) {
92 103
 			try {
@@ -95,10 +106,16 @@  discard block
 block discarded – undo
95 106
 					$this->dbs[$DBname]->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, "SET NAMES 'utf8'");
96 107
 					$this->dbs[$DBname]->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
97 108
 					$this->dbs[$DBname]->setAttribute(PDO::ATTR_CASE,PDO::CASE_LOWER);
98
-					if (!isset($globalDBTimeOut)) $this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT,500);
99
-					else $this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT,$globalDBTimeOut);
100
-					if (!isset($globalDBPersistent)) $this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT,true);
101
-					else $this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT,$globalDBPersistent);
109
+					if (!isset($globalDBTimeOut)) {
110
+						$this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT,500);
111
+					} else {
112
+						$this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT,$globalDBTimeOut);
113
+					}
114
+					if (!isset($globalDBPersistent)) {
115
+						$this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT,true);
116
+					} else {
117
+						$this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT,$globalDBPersistent);
118
+					}
102 119
 					$this->dbs[$DBname]->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
103 120
 					$this->dbs[$DBname]->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
104 121
 					// Workaround against "ONLY_FULL_GROUP_BY" mode
@@ -112,23 +129,35 @@  discard block
 block discarded – undo
112 129
 					//$this->dbs[$DBname]->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, "SET NAMES 'utf8'");
113 130
 					$this->dbs[$DBname]->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
114 131
 					$this->dbs[$DBname]->setAttribute(PDO::ATTR_CASE,PDO::CASE_LOWER);
115
-					if (!isset($globalDBTimeOut)) $this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT,200);
116
-					else $this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT,$globalDBTimeOut);
117
-					if (!isset($globalDBPersistent)) $this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT,true);
118
-					else $this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT,$globalDBPersistent);
132
+					if (!isset($globalDBTimeOut)) {
133
+						$this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT,200);
134
+					} else {
135
+						$this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT,$globalDBTimeOut);
136
+					}
137
+					if (!isset($globalDBPersistent)) {
138
+						$this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT,true);
139
+					} else {
140
+						$this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT,$globalDBPersistent);
141
+					}
119 142
 					$this->dbs[$DBname]->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
120 143
 					$this->dbs[$DBname]->exec('SET timezone="UTC"');
121 144
 				}
122 145
 				break;
123 146
 			} catch(PDOException $e) {
124 147
 				$i++;
125
-				if (isset($globalDebug) && $globalDebug) echo 'Error connecting to DB: '.$globalDBSname.' - Error: '.$e->getMessage()."\n";
148
+				if (isset($globalDebug) && $globalDebug) {
149
+					echo 'Error connecting to DB: '.$globalDBSname.' - Error: '.$e->getMessage()."\n";
150
+				}
126 151
 				//exit;
127
-				if ($i > $globalDBretry) return false;
152
+				if ($i > $globalDBretry) {
153
+					return false;
154
+				}
128 155
 				//return false;
129 156
 			}
130 157
 		}
131
-		if ($DBname === 'default') $this->db = $this->dbs['default'];
158
+		if ($DBname === 'default') {
159
+			$this->db = $this->dbs['default'];
160
+		}
132 161
 		return true;
133 162
 	}
134 163
 
@@ -140,7 +169,9 @@  discard block
 block discarded – undo
140 169
 		} else {
141 170
 			$query = "SELECT * FROM pg_catalog.pg_tables WHERE tablename = '".$table."'";
142 171
 		}
143
-		if ($this->db == NULL) return false;
172
+		if ($this->db == NULL) {
173
+			return false;
174
+		}
144 175
 		try {
145 176
 			//$Connection = new Connection();
146 177
 			$results = $this->db->query($query);
@@ -149,21 +180,28 @@  discard block
 block discarded – undo
149 180
 		}
150 181
 		if($results->rowCount()>0) {
151 182
 		    return true; 
183
+		} else {
184
+			return false;
152 185
 		}
153
-		else return false;
154 186
 	}
155 187
 
156 188
 	public function connectionExists()
157 189
 	{
158 190
 		global $globalDBdriver, $globalDBCheckConnection;
159
-		if (isset($globalDBCheckConnection) && $globalDBCheckConnection === FALSE) return true;
191
+		if (isset($globalDBCheckConnection) && $globalDBCheckConnection === FALSE) {
192
+			return true;
193
+		}
160 194
 		$query = "SELECT 1 + 1";
161
-		if ($this->db === null) return false;
195
+		if ($this->db === null) {
196
+			return false;
197
+		}
162 198
 		try {
163 199
 			$sum = @$this->db->query($query);
164 200
 			if ($sum instanceof \PDOStatement) {
165 201
 				$sum = $sum->fetchColumn(0);
166
-			} else $sum = 0;
202
+			} else {
203
+				$sum = 0;
204
+			}
167 205
 			if (intval($sum) !== 2) {
168 206
 			     return false;
169 207
 			}
@@ -198,8 +236,9 @@  discard block
 block discarded – undo
198 236
 		$nb = $results->fetchAll(PDO::FETCH_ASSOC);
199 237
 		if($nb[0]['nb'] > 0) {
200 238
 			return true; 
239
+		} else {
240
+			return false;
201 241
 		}
202
-		else return false;
203 242
 	}
204 243
 
205 244
 	/*
@@ -243,9 +282,12 @@  discard block
 block discarded – undo
243 282
 			}
244 283
 			$result = $sth->fetch(PDO::FETCH_ASSOC);
245 284
 			$sth->closeCursor();
246
-			if ($result['nb'] > 0) return true;
247
-			else return false;
248
-/*		} else {
285
+			if ($result['nb'] > 0) {
286
+				return true;
287
+			} else {
288
+				return false;
289
+			}
290
+			/*		} else {
249 291
 			$query = "SELECT * FROM ".$table." LIMIT 0";
250 292
 			try {
251 293
 				$results = $this->db->query($query);
@@ -284,7 +326,9 @@  discard block
 block discarded – undo
284 326
 				$sth->closeCursor();
285 327
 				return $result['value'];
286 328
 			}
287
-		} else return $version;
329
+		} else {
330
+			return $version;
331
+		}
288 332
 	}
289 333
 	
290 334
 	/*
@@ -292,8 +336,11 @@  discard block
 block discarded – undo
292 336
 	* @return Boolean if latest version or not
293 337
 	*/
294 338
 	public function latest() {
295
-	    if ($this->check_schema_version() == $this->latest_schema) return true;
296
-	    else return false;
339
+	    if ($this->check_schema_version() == $this->latest_schema) {
340
+	    	return true;
341
+	    } else {
342
+	    	return false;
343
+	    }
297 344
 	}
298 345
 
299 346
 }
Please login to merge, or discard this patch.
statistics-fatalities-month.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,11 @@
 block discarded – undo
71 71
 		print '<tr>';
72 72
 		print '<td><strong>'.$i.'</strong></td>';
73 73
 		print '<td>';
74
-		if ($date_item['month'] < 10) $month = '0'.$date_item['month'];
75
-		else $month = $date_item['month'];
74
+		if ($date_item['month'] < 10) {
75
+			$month = '0'.$date_item['month'];
76
+		} else {
77
+			$month = $date_item['month'];
78
+		}
76 79
 		print '<a href="'.$globalURL.'/accident/'.$date_item['year'].'-'.$month.'">'.date('F, Y',strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'</a>';
77 80
 		print '</td>';
78 81
 		print '<td>';
Please login to merge, or discard this patch.
statistics-registration.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,11 +5,15 @@
 block discarded – undo
5 5
 $Stats = new Stats();
6 6
 $title = _("Statistics").' - '._("Most common Aircraft Registrations");
7 7
 
8
-if (!isset($filter_name)) $filter_name = '';
8
+if (!isset($filter_name)) {
9
+	$filter_name = '';
10
+}
9 11
 $airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10 12
 if ($airline_icao == '' && isset($globalFilter)) {
11
-    if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
12
-}
13
+    if (isset($globalFilter['airline'])) {
14
+    	$airline_icao = $globalFilter['airline'][0];
15
+    }
16
+    }
13 17
 setcookie('stats_airline_icao',$airline_icao,time()+60*60*24,'/');
14 18
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
15 19
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
Please login to merge, or discard this patch.