Completed
Push — master ( 491897...dd0fde )
by Yannick
29:49
created
airspace-geojson.php 1 patch
Braces   +16 added lines, -6 removed lines patch added patch discarded remove patch
@@ -67,12 +67,22 @@
 block discarded – undo
67 67
 		} else {
68 68
 			$geom = geoPHP::load(stream_get_contents($row['wkb']));
69 69
 		}
70
-		if (isset($properties['type'])) $properties['type'] = trim($properties['type']);
71
-		elseif (isset($properties['class'])) $properties['type'] = trim($properties['class']);
72
-		if (isset($properties['ogr_fid'])) $properties['id'] = $properties['ogr_fid'];
73
-		elseif (isset($properties['ogc_fid'])) $properties['id'] = $properties['ogc_fid'];
74
-		if (isset($properties['ceiling'])) $properties['tops'] = $properties['ceiling'];
75
-		if (isset($properties['floor'])) $properties['base'] = $properties['floor'];
70
+		if (isset($properties['type'])) {
71
+			$properties['type'] = trim($properties['type']);
72
+		} elseif (isset($properties['class'])) {
73
+			$properties['type'] = trim($properties['class']);
74
+		}
75
+		if (isset($properties['ogr_fid'])) {
76
+			$properties['id'] = $properties['ogr_fid'];
77
+		} elseif (isset($properties['ogc_fid'])) {
78
+			$properties['id'] = $properties['ogc_fid'];
79
+		}
80
+		if (isset($properties['ceiling'])) {
81
+			$properties['tops'] = $properties['ceiling'];
82
+		}
83
+		if (isset($properties['floor'])) {
84
+			$properties['base'] = $properties['floor'];
85
+		}
76 86
 		if (preg_match('/^FL(\s)*(?<alt>\d+)/',strtoupper($properties['tops']),$matches)) {
77 87
 			$properties['upper_limit'] = round($matches['alt']*100*0.38048);
78 88
 		} elseif (preg_match('/^(?<alt>\d+)(\s)*(FT|AGL|ALT|MSL)/',strtoupper($properties['tops']),$matches)) {
Please login to merge, or discard this patch.
aircraft-statistics-airline-country.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,9 @@
 block discarded – undo
24 24
     	print '<option></option>';
25 25
     	$Stats = new Stats();
26 26
     	$aircraft_types = $Stats->getAllAircraftTypes();
27
-    	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
27
+    	if (empty($aircraft_types)) {
28
+    		$aircraft_types = $Spotter->getAllAircraftTypes();
29
+    	}
28 30
     	foreach($aircraft_types as $aircrafttype)
29 31
     	{
30 32
     		if($aircraft_type == $aircrafttype['aircraft_icao'])
Please login to merge, or discard this patch.
aircraft-detailed.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 		$limit_start = 0;
15 15
 		$limit_end = 25;
16 16
 		$absolute_difference = 25;
17
-	}  else {
17
+	} else {
18 18
 		$limit_explode = explode(",", $_GET['limit']);
19 19
 		$limit_start = $limit_explode[0];
20 20
 		$limit_end = $limit_explode[1];
@@ -45,7 +45,9 @@  discard block
 block discarded – undo
45 45
     		print '<option></option>';
46 46
     		$Stats = new Stats();
47 47
 		$aircraft_types = $Stats->getAllAircraftTypes();
48
-		if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
48
+		if (empty($aircraft_types)) {
49
+			$aircraft_types = $Spotter->getAllAircraftTypes();
50
+		}
49 51
 		foreach($aircraft_types as $aircrafttype)
50 52
 		{
51 53
 			if($aircraft_type == $aircrafttype['aircraft_icao'])
@@ -66,7 +68,9 @@  discard block
 block discarded – undo
66 68
 	      		print '<h1>'.$spotter_array[0]['aircraft_name'].' ('.$spotter_array[0]['aircraft_type'].')</h1>';
67 69
 	      		print '<div><span class="label">'._("Name").'</span>'.$spotter_array[0]['aircraft_name'].'</div>';
68 70
 	      		print '<div><span class="label">'._("ICAO").'</span>'.$spotter_array[0]['aircraft_type'].'</div>'; 
69
-	      		if (isset($spotter_array[0]['aircraft_manufacturer'])) print '<div><span class="label">'._("Manufacturer").'</span><a href="'.$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $spotter_array[0]['aircraft_manufacturer'])).'">'.$spotter_array[0]['aircraft_manufacturer'].'</a></div>';
71
+	      		if (isset($spotter_array[0]['aircraft_manufacturer'])) {
72
+	      			print '<div><span class="label">'._("Manufacturer").'</span><a href="'.$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $spotter_array[0]['aircraft_manufacturer'])).'">'.$spotter_array[0]['aircraft_manufacturer'].'</a></div>';
73
+	      		}
70 74
 	    		print '</div>';
71 75
 		} else {
72 76
 			print '<div class="alert alert-warning">'._("This special aircraft profile shows all flights in where the aircraft type is unknown.").'</div>';
Please login to merge, or discard this patch.
aircraft-statistics-airline.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 	print '<option></option>';
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26
-	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
+	if (empty($aircraft_types)) {
27
+		$aircraft_types = $Spotter->getAllAircraftTypes();
28
+	}
27 29
 	foreach($aircraft_types as $aircrafttype)
28 30
 	{
29 31
 		if($aircraft_type == $aircrafttype['aircraft_icao'])
Please login to merge, or discard this patch.
aircraft-statistics-route.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 	print '<option></option>';
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26
-	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
+	if (empty($aircraft_types)) {
27
+		$aircraft_types = $Spotter->getAllAircraftTypes();
28
+	}
27 29
 	foreach($aircraft_types as $aircrafttype)
28 30
 	{
29 31
 		if($aircraft_type == $aircrafttype['aircraft_icao'])
Please login to merge, or discard this patch.
aircraft-statistics-arrival-airport-country.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 	print '<option></option>';
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26
-	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
+	if (empty($aircraft_types)) {
27
+		$aircraft_types = $Spotter->getAllAircraftTypes();
28
+	}
27 29
 	foreach($aircraft_types as $aircrafttype)
28 30
 	{
29 31
 		if($aircraft_type == $aircrafttype['aircraft_icao'])
Please login to merge, or discard this patch.
aircraft-statistics-departure-airport.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 	print '<option></option>';
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26
-	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
+	if (empty($aircraft_types)) {
27
+		$aircraft_types = $Spotter->getAllAircraftTypes();
28
+	}
27 29
 	foreach($aircraft_types as $aircrafttype)
28 30
 	{
29 31
 		if($aircraft_type == $aircrafttype['aircraft_icao'])
Please login to merge, or discard this patch.
aircraft-statistics-arrival-airport.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 	print '<option></option>';
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26
-	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
+	if (empty($aircraft_types)) {
27
+		$aircraft_types = $Spotter->getAllAircraftTypes();
28
+	}
27 29
 	foreach($aircraft_types as $aircrafttype)
28 30
 	{
29 31
 		if($aircraft_type == $aircrafttype['aircraft_icao'])
Please login to merge, or discard this patch.
aircraft-statistics-departure-airport-country.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 	print '<option></option>';
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26
-	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
+	if (empty($aircraft_types)) {
27
+		$aircraft_types = $Spotter->getAllAircraftTypes();
28
+	}
27 29
 	foreach($aircraft_types as $aircrafttype)
28 30
 	{
29 31
 		if($aircraft_type == $aircrafttype['aircraft_icao'])
Please login to merge, or discard this patch.