Completed
Push — master ( abe207...090b05 )
by Yannick
07:26
created
search-ajax.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@  discard block
 block discarded – undo
6 6
 $Spotter = new Spotter();
7 7
 $orderby = $Spotter->getOrderBy();
8 8
 
9
-$ask = filter_input(INPUT_GET,'ask',FILTER_SANITIZE_STRING);
9
+$ask = filter_input(INPUT_GET, 'ask', FILTER_SANITIZE_STRING);
10 10
 if ($ask == 'manufacturer') {
11 11
 	$manufacturers = $Spotter->getAllManufacturers();
12 12
 	$all_manufacturers = array();
13
-	foreach($manufacturers as $manufacturer)
13
+	foreach ($manufacturers as $manufacturer)
14 14
 	{
15
-		$all_manufacturers[] = array('value' => $manufacturer['aircraft_manufacturer'], 'id' => strtolower(str_replace(' ','-',$manufacturer['aircraft_manufacturer'])));
15
+		$all_manufacturers[] = array('value' => $manufacturer['aircraft_manufacturer'], 'id' => strtolower(str_replace(' ', '-', $manufacturer['aircraft_manufacturer'])));
16 16
 	}
17 17
 	echo json_encode($all_manufacturers);
18 18
 } elseif ($ask == 'aircrafttypes') {
19 19
 	$aircraft_types = $Spotter->getAllAircraftTypes();
20 20
 	$all_aircraft_types = array();
21
-	foreach($aircraft_types as $aircraft_type)
21
+	foreach ($aircraft_types as $aircraft_type)
22 22
 	{
23 23
 		$all_aircraft_types[] = array('id' => $aircraft_type['aircraft_icao'], 'value' => $aircraft_type['aircraft_name'].' ('.$aircraft_type['aircraft_icao'].')');
24 24
 	}
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 } elseif ($ask == 'airlinenames') {
27 27
 	$airline_names = $Spotter->getAllAirlineNames();
28 28
 	$all_airline_names = array();
29
-	foreach($airline_names as $airline_name)
29
+	foreach ($airline_names as $airline_name)
30 30
 	{
31 31
 		$all_airline_names[] = array('id' => $airline_name['airline_icao'], 'value' => $airline_name['airline_name'].' ('.$airline_name['airline_icao'].')');
32 32
 	}
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 } elseif ($ask == 'airlinecountries') {
35 35
 	$airline_countries = $Spotter->getAllAirlineCountries();
36 36
 	$all_airline_countries = array();
37
-	foreach($airline_countries as $airline_country)
37
+	foreach ($airline_countries as $airline_country)
38 38
 	{
39 39
 		$all_airline_countries[] = array('id' => $airline_country['airline_country'], 'value' => $airline_country['airline_country']);
40 40
 	}
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	$airport_names = $Spotter->getAllAirportNames();
44 44
 	ksort($airport_names);
45 45
 	$all_airport_names = array();
46
-	foreach($airport_names as $airport_name)
46
+	foreach ($airport_names as $airport_name)
47 47
 	{
48 48
 		$all_airport_names[] = array('id' => $airport_name['airport_icao'], 'value' => $airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')');
49 49
 	}
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 } elseif ($ask == 'airportcountries') {
52 52
 	$airport_countries = $Spotter->getAllAirportCountries();
53 53
 	$all_airport_countries = array();
54
-	foreach($airport_countries as $airport_country)
54
+	foreach ($airport_countries as $airport_country)
55 55
 	{
56 56
 		$all_airport_countries[] = array('id' => $airport_country['airport_country'], 'value' => $airport_country['airport_country']);
57 57
 	}
Please login to merge, or discard this patch.
search-yaml.php 3 patches
Indentation   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -4,55 +4,55 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6 6
 if (isset($_GET['start_date'])) {
7
-        //for the date manipulation into the query
8
-        if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
9
-                $start_date = $_GET['start_date'].":00";
10
-                $end_date = $_GET['end_date'].":00";
11
-                $sql_date = $start_date.",".$end_date;
12
-        } else if($_GET['start_date'] != ""){
13
-                $start_date = $_GET['start_date'].":00";
14
-                $sql_date = $start_date;
15
-        } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
16
-                $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17
-                $sql_date = $end_date;
18
-        } else $sql_date = '';
7
+		//for the date manipulation into the query
8
+		if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
9
+				$start_date = $_GET['start_date'].":00";
10
+				$end_date = $_GET['end_date'].":00";
11
+				$sql_date = $start_date.",".$end_date;
12
+		} else if($_GET['start_date'] != ""){
13
+				$start_date = $_GET['start_date'].":00";
14
+				$sql_date = $start_date;
15
+		} else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
16
+				$end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17
+				$sql_date = $end_date;
18
+		} else $sql_date = '';
19 19
 } else $sql_date = '';
20 20
 
21 21
 if (isset($_GET['highest_altitude'])) {
22
-        //for altitude manipulation
23
-        if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
24
-                $end_altitude = $_GET['highest_altitude'];
25
-                $start_altitude = $_GET['lowest_altitude'];
26
-                $sql_altitude = $start_altitude.",".$end_altitude;
27
-        } else if($_GET['highest_altitude'] != ""){
28
-                $end_altitude = $_GET['highest_altitude'];
29
-                $sql_altitude = $end_altitude;
30
-        } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
31
-                $start_altitude = $_GET['lowest_altitude'].",60000";
32
-                $sql_altitude = $start_altitude;
33
-        } else $sql_altitude = '';
22
+		//for altitude manipulation
23
+		if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
24
+				$end_altitude = $_GET['highest_altitude'];
25
+				$start_altitude = $_GET['lowest_altitude'];
26
+				$sql_altitude = $start_altitude.",".$end_altitude;
27
+		} else if($_GET['highest_altitude'] != ""){
28
+				$end_altitude = $_GET['highest_altitude'];
29
+				$sql_altitude = $end_altitude;
30
+		} else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
31
+				$start_altitude = $_GET['lowest_altitude'].",60000";
32
+				$sql_altitude = $start_altitude;
33
+		} else $sql_altitude = '';
34 34
 } else $sql_altitude = '';
35 35
 
36 36
 //calculuation for the pagination
37 37
 if(!isset($_GET['limit']))
38 38
 {
39
-        if (!isset($_GET['number_results']))
40
-        {
41
-                $limit_start = 0;
42
-                $limit_end = 25;
43
-                $absolute_difference = 25;
44
-        } else {
45
-                if ($_GET['number_results'] > 1000){
46
-                        $_GET['number_results'] = 1000;
47
-                }
48
-                $limit_start = 0;
49
-                $limit_end = $_GET['number_results'];
50
-                $absolute_difference = $_GET['number_results'];
51
-        }
39
+		if (!isset($_GET['number_results']))
40
+		{
41
+				$limit_start = 0;
42
+				$limit_end = 25;
43
+				$absolute_difference = 25;
44
+		} else {
45
+				if ($_GET['number_results'] > 1000){
46
+						$_GET['number_results'] = 1000;
47
+				}
48
+				$limit_start = 0;
49
+				$limit_end = $_GET['number_results'];
50
+				$absolute_difference = $_GET['number_results'];
51
+		}
52 52
 }  else {
53
-        $limit_explode = explode(",", $_GET['limit']);
54
-        $limit_start = $limit_explode[0];
55
-        $limit_end = $limit_explode[1];
53
+		$limit_explode = explode(",", $_GET['limit']);
54
+		$limit_start = $limit_explode[0];
55
+		$limit_end = $limit_explode[1];
56 56
 }
57 57
 
58 58
 $absolute_difference = abs($limit_start - $limit_end);
@@ -94,70 +94,70 @@  discard block
 block discarded – undo
94 94
   foreach($spotter_array as $spotter_item)
95 95
   {
96 96
 	   	
97
-    $output .= ' - id: '.$spotter_item['spotter_id'];
98
-    $output .= "\n";
99
-    $output .= ' - ident: '.$spotter_item['ident'];
100
-    $output .= "\n";
101
-    $output .= ' - registration: '.$spotter_item['registration'];
102
-    $output .= "\n";
103
-    $output .= ' - aircraft_icao: '.$spotter_item['aircraft_type'];
104
-    $output .= "\n";
105
-    $output .= ' - aircraft_name: '.$spotter_item['aircraft_name'];
106
-    $output .= "\n";
107
-    $output .= ' - aircraft_manufacturer: '.$spotter_item['aircraft_manufacturer'];
108
-    $output .= "\n";
109
-    $output .= ' - airline_name: '.$spotter_item['airline_name'];
110
-    $output .= "\n";
111
-    $output .= ' - airline_icao: '.$spotter_item['airline_icao'];
112
-    $output .= "\n";
113
-    $output .= ' - airline_iata: '.$spotter_item['airline_iata'];
114
-    $output .= "\n";
115
-    $output .= ' - airline_country: '.$spotter_item['airline_country'];
116
-    $output .= "\n";
117
-    $output .= ' - airline_callsign: '.$spotter_item['airline_callsign'];
118
-    $output .= "\n";
119
-    $output .= ' - airline_type: '.$spotter_item['airline_type'];
120
-    $output .= "\n";
121
-    $output .= ' - departure_airport_city: '.$spotter_item['departure_airport_city'];
122
-    $output .= "\n";
123
-    $output .= ' - departure_airport_country: '.$spotter_item['departure_airport_country'];
124
-    $output .= "\n";
125
-    $output .= ' - departure_airport_iata: '.$spotter_item['departure_airport_iata'];
126
-    $output .= "\n";
127
-    $output .= ' - departure_airport_icao: '.$spotter_item['departure_airport_icao'];
128
-    $output .= "\n";
129
-    $output .= ' - departure_airport_latitude: '.$spotter_item['departure_airport_latitude'];
130
-    $output .= "\n";
131
-    $output .= ' - departure_airport_altitude: '.$spotter_item['departure_airport_altitude'];
132
-    $output .= "\n";
133
-    $output .= ' - arrival_airport_city: '.$spotter_item['arrival_airport_city'];
134
-    $output .= "\n";
135
-    $output .= ' - arrival_airport_country: '.$spotter_item['arrival_airport_country'];
136
-    $output .= "\n";
137
-    $output .= ' - arrival_airport_iata: '.$spotter_item['arrival_airport_iata'];
138
-    $output .= "\n";
139
-    $output .= ' - arrival_airport_icao: '.$spotter_item['arrival_airport_icao'];
140
-    $output .= "\n";
141
-    $output .= ' - arrival_airport_latitude: '.$spotter_item['arrival_airport_latitude'];
142
-    $output .= "\n";
143
-    $output .= ' - arrival_airport_altitude: '.$spotter_item['arrival_airport_altitude'];
144
-    $output .= "\n";    
145
-    $output .= ' - latitude: '.$spotter_item['latitude'];
146
-    $output .= "\n";
147
-    $output .= ' - longitude: '.$spotter_item['longitude'];
148
-    $output .= "\n";
149
-    $output .= ' - altitude: '.$spotter_item['altitude'];
150
-    $output .= "\n";
151
-    $output .= ' - ground_speed: '.$spotter_item['ground_speed'];
152
-    $output .= "\n";
153
-    $output .= ' - heading: '.$spotter_item['heading'];
154
-    $output .= "\n";
155
-    $output .= ' - heading_name: '.$spotter_item['heading_name'];
156
-    $output .= "\n";
157
-    $output .= ' - waypoints: '.$spotter_item['waypoints'];
158
-    $output .= "\n";
159
-    $output .= ' - date: '.date("c", strtotime($spotter_item['date_iso_8601']));
160
-    $output .= "\n\n";
97
+	$output .= ' - id: '.$spotter_item['spotter_id'];
98
+	$output .= "\n";
99
+	$output .= ' - ident: '.$spotter_item['ident'];
100
+	$output .= "\n";
101
+	$output .= ' - registration: '.$spotter_item['registration'];
102
+	$output .= "\n";
103
+	$output .= ' - aircraft_icao: '.$spotter_item['aircraft_type'];
104
+	$output .= "\n";
105
+	$output .= ' - aircraft_name: '.$spotter_item['aircraft_name'];
106
+	$output .= "\n";
107
+	$output .= ' - aircraft_manufacturer: '.$spotter_item['aircraft_manufacturer'];
108
+	$output .= "\n";
109
+	$output .= ' - airline_name: '.$spotter_item['airline_name'];
110
+	$output .= "\n";
111
+	$output .= ' - airline_icao: '.$spotter_item['airline_icao'];
112
+	$output .= "\n";
113
+	$output .= ' - airline_iata: '.$spotter_item['airline_iata'];
114
+	$output .= "\n";
115
+	$output .= ' - airline_country: '.$spotter_item['airline_country'];
116
+	$output .= "\n";
117
+	$output .= ' - airline_callsign: '.$spotter_item['airline_callsign'];
118
+	$output .= "\n";
119
+	$output .= ' - airline_type: '.$spotter_item['airline_type'];
120
+	$output .= "\n";
121
+	$output .= ' - departure_airport_city: '.$spotter_item['departure_airport_city'];
122
+	$output .= "\n";
123
+	$output .= ' - departure_airport_country: '.$spotter_item['departure_airport_country'];
124
+	$output .= "\n";
125
+	$output .= ' - departure_airport_iata: '.$spotter_item['departure_airport_iata'];
126
+	$output .= "\n";
127
+	$output .= ' - departure_airport_icao: '.$spotter_item['departure_airport_icao'];
128
+	$output .= "\n";
129
+	$output .= ' - departure_airport_latitude: '.$spotter_item['departure_airport_latitude'];
130
+	$output .= "\n";
131
+	$output .= ' - departure_airport_altitude: '.$spotter_item['departure_airport_altitude'];
132
+	$output .= "\n";
133
+	$output .= ' - arrival_airport_city: '.$spotter_item['arrival_airport_city'];
134
+	$output .= "\n";
135
+	$output .= ' - arrival_airport_country: '.$spotter_item['arrival_airport_country'];
136
+	$output .= "\n";
137
+	$output .= ' - arrival_airport_iata: '.$spotter_item['arrival_airport_iata'];
138
+	$output .= "\n";
139
+	$output .= ' - arrival_airport_icao: '.$spotter_item['arrival_airport_icao'];
140
+	$output .= "\n";
141
+	$output .= ' - arrival_airport_latitude: '.$spotter_item['arrival_airport_latitude'];
142
+	$output .= "\n";
143
+	$output .= ' - arrival_airport_altitude: '.$spotter_item['arrival_airport_altitude'];
144
+	$output .= "\n";    
145
+	$output .= ' - latitude: '.$spotter_item['latitude'];
146
+	$output .= "\n";
147
+	$output .= ' - longitude: '.$spotter_item['longitude'];
148
+	$output .= "\n";
149
+	$output .= ' - altitude: '.$spotter_item['altitude'];
150
+	$output .= "\n";
151
+	$output .= ' - ground_speed: '.$spotter_item['ground_speed'];
152
+	$output .= "\n";
153
+	$output .= ' - heading: '.$spotter_item['heading'];
154
+	$output .= "\n";
155
+	$output .= ' - heading_name: '.$spotter_item['heading_name'];
156
+	$output .= "\n";
157
+	$output .= ' - waypoints: '.$spotter_item['waypoints'];
158
+	$output .= "\n";
159
+	$output .= ' - date: '.date("c", strtotime($spotter_item['date_iso_8601']));
160
+	$output .= "\n\n";
161 161
   }
162 162
  }
163 163
 
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@  discard block
 block discarded – undo
5 5
 $Spotter = new Spotter();
6 6
 if (isset($_GET['start_date'])) {
7 7
         //for the date manipulation into the query
8
-        if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
8
+        if ($_GET['start_date'] != "" && $_GET['end_date'] != "") {
9 9
                 $start_date = $_GET['start_date'].":00";
10 10
                 $end_date = $_GET['end_date'].":00";
11 11
                 $sql_date = $start_date.",".$end_date;
12
-        } else if($_GET['start_date'] != ""){
12
+        } else if ($_GET['start_date'] != "") {
13 13
                 $start_date = $_GET['start_date'].":00";
14 14
                 $sql_date = $start_date;
15
-        } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
15
+        } else if ($_GET['start_date'] == "" && $_GET['end_date'] != "") {
16 16
                 $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17 17
                 $sql_date = $end_date;
18 18
         } else $sql_date = '';
@@ -20,21 +20,21 @@  discard block
 block discarded – undo
20 20
 
21 21
 if (isset($_GET['highest_altitude'])) {
22 22
         //for altitude manipulation
23
-        if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
23
+        if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") {
24 24
                 $end_altitude = $_GET['highest_altitude'];
25 25
                 $start_altitude = $_GET['lowest_altitude'];
26 26
                 $sql_altitude = $start_altitude.",".$end_altitude;
27
-        } else if($_GET['highest_altitude'] != ""){
27
+        } else if ($_GET['highest_altitude'] != "") {
28 28
                 $end_altitude = $_GET['highest_altitude'];
29 29
                 $sql_altitude = $end_altitude;
30
-        } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
30
+        } else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") {
31 31
                 $start_altitude = $_GET['lowest_altitude'].",60000";
32 32
                 $sql_altitude = $start_altitude;
33 33
         } else $sql_altitude = '';
34 34
 } else $sql_altitude = '';
35 35
 
36 36
 //calculuation for the pagination
37
-if(!isset($_GET['limit']))
37
+if (!isset($_GET['limit']))
38 38
 {
39 39
         if (!isset($_GET['number_results']))
40 40
         {
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
                 $limit_end = 25;
43 43
                 $absolute_difference = 25;
44 44
         } else {
45
-                if ($_GET['number_results'] > 1000){
45
+                if ($_GET['number_results'] > 1000) {
46 46
                         $_GET['number_results'] = 1000;
47 47
                 }
48 48
                 $limit_start = 0;
49 49
                 $limit_end = $_GET['number_results'];
50 50
                 $absolute_difference = $_GET['number_results'];
51 51
         }
52
-}  else {
52
+} else {
53 53
         $limit_explode = explode(",", $_GET['limit']);
54 54
         $limit_start = $limit_explode[0];
55 55
         $limit_end = $limit_explode[1];
@@ -69,29 +69,29 @@  discard block
 block discarded – undo
69 69
 
70 70
 if (isset($_GET['sort'])) $sort = $_GET['sort'];
71 71
 else $sort = '';
72
-$q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING);
73
-$registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING);
74
-$aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING);
75
-$manufacturer = filter_input(INPUT_GET,'manufacturer',FILTER_SANITIZE_STRING);
76
-$highlights = filter_input(INPUT_GET,'highlights',FILTER_SANITIZE_STRING);
77
-$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
78
-$airline_country = filter_input(INPUT_GET,'airline_country',FILTER_SANITIZE_STRING);
79
-$airline_type = filter_input(INPUT_GET,'airline_type',FILTER_SANITIZE_STRING);
80
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
81
-$airport_country = filter_input(INPUT_GET,'airport_country',FILTER_SANITIZE_STRING);
82
-$callsign = filter_input(INPUT_GET,'callsign',FILTER_SANITIZE_STRING);
83
-$owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING);
84
-$pilot_id = filter_input(INPUT_GET,'pilot_id',FILTER_SANITIZE_STRING);
85
-$pilot_name = filter_input(INPUT_GET,'pilot_name',FILTER_SANITIZE_STRING);
86
-$departure_airport_route = filter_input(INPUT_GET,'departure_airport_route',FILTER_SANITIZE_STRING);
87
-$arrival_airport_route = filter_input(INPUT_GET,'arrival_airport_route',FILTER_SANITIZE_STRING);
88
-$spotter_array = $Spotter->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,'');
72
+$q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING);
73
+$registration = filter_input(INPUT_GET, 'registratrion', FILTER_SANITIZE_STRING);
74
+$aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING);
75
+$manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING);
76
+$highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING);
77
+$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
78
+$airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING);
79
+$airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING);
80
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
81
+$airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING);
82
+$callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING);
83
+$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING);
84
+$pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING);
85
+$pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING);
86
+$departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING);
87
+$arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING);
88
+$spotter_array = $Spotter->searchSpotterData($q, $registration, $aircraft, strtolower(str_replace("-", " ", $manufacturer)), $highlights, $airline, $airline_country, $airline_type, $airport, $airport_country, $callsign, $departure_airport_route, $arrival_airport_route, $owner, $pilot_id, $pilot_name, $sql_altitude, $sql_date, $limit_start.",".$absolute_difference, $sort, '');
89 89
        
90 90
 $output = "-flights:\n";
91 91
 
92 92
 if (!empty($spotter_array))
93 93
 {
94
-  foreach($spotter_array as $spotter_item)
94
+  foreach ($spotter_array as $spotter_item)
95 95
   {
96 96
 	   	
97 97
     $output .= ' - id: '.$spotter_item['spotter_id'];
Please login to merge, or discard this patch.
Braces   +18 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,8 +15,12 @@  discard block
 block discarded – undo
15 15
         } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
16 16
                 $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17 17
                 $sql_date = $end_date;
18
-        } else $sql_date = '';
19
-} else $sql_date = '';
18
+        } else {
19
+        	$sql_date = '';
20
+        }
21
+        } else {
22
+	$sql_date = '';
23
+}
20 24
 
21 25
 if (isset($_GET['highest_altitude'])) {
22 26
         //for altitude manipulation
@@ -30,8 +34,12 @@  discard block
 block discarded – undo
30 34
         } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
31 35
                 $start_altitude = $_GET['lowest_altitude'].",60000";
32 36
                 $sql_altitude = $start_altitude;
33
-        } else $sql_altitude = '';
34
-} else $sql_altitude = '';
37
+        } else {
38
+        	$sql_altitude = '';
39
+        }
40
+        } else {
41
+	$sql_altitude = '';
42
+}
35 43
 
36 44
 //calculuation for the pagination
37 45
 if(!isset($_GET['limit']))
@@ -49,7 +57,7 @@  discard block
 block discarded – undo
49 57
                 $limit_end = $_GET['number_results'];
50 58
                 $absolute_difference = $_GET['number_results'];
51 59
         }
52
-}  else {
60
+} else {
53 61
         $limit_explode = explode(",", $_GET['limit']);
54 62
         $limit_start = $limit_explode[0];
55 63
         $limit_end = $limit_explode[1];
@@ -67,8 +75,11 @@  discard block
 block discarded – undo
67 75
 
68 76
 header("Content-type: text/yaml");
69 77
 
70
-if (isset($_GET['sort'])) $sort = $_GET['sort'];
71
-else $sort = '';
78
+if (isset($_GET['sort'])) {
79
+	$sort = $_GET['sort'];
80
+} else {
81
+	$sort = '';
82
+}
72 83
 $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING);
73 84
 $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING);
74 85
 $aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
ident-statistics-registration.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['ident'])) {
6
-        header('Location: '.$globalURL.'/ident');
7
-        die();
6
+		header('Location: '.$globalURL.'/ident');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
12
-$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort);
10
+$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
11
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
12
+$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort);
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Aircraft by Registration of %s"),$spotter_array[0]['ident']);
16
+	$title = sprintf(_("Most Common Aircraft by Registration of %s"), $spotter_array[0]['ident']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="info column">';
19 19
 	print '<h1>'.$spotter_array[0]['ident'].'</h1>';
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	include('ident-sub-menu.php');
25 25
 	print '<div class="column">';
26 26
 	print '<h2>'._("Most Common Aircraft by Registration").'</h2>';
27
-	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by Registration of flights using the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
27
+	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by Registration of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>';
28 28
 
29 29
 	$aircraft_array = $Spotter->countAllAircraftRegistrationByIdent($ident);
30 30
 	
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 		print '</thead>';
43 43
 		print '<tbody>';
44 44
 		$i = 1;
45
-		foreach($aircraft_array as $aircraft_item)
45
+		foreach ($aircraft_array as $aircraft_item)
46 46
 		{
47 47
 			print '<tr>';
48 48
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
newest.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,18 +13,18 @@  discard block
 block discarded – undo
13 13
 require_once('header.php');
14 14
 
15 15
 //calculuation for the pagination
16
-if(!isset($_GET['limit']))
16
+if (!isset($_GET['limit']))
17 17
 {
18 18
   $limit_start = 0;
19 19
   $limit_end = 25;
20 20
   $absolute_difference = 25;
21
-}  else {
21
+} else {
22 22
 	$limit_explode = explode(",", $_GET['limit']);
23 23
 	$limit_start = $limit_explode[0];
24 24
 	$limit_end = $limit_explode[1];
25 25
 }
26 26
 
27
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
27
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
28 28
 
29 29
 $absolute_difference = abs($limit_start - $limit_end);
30 30
 $limit_next = $limit_end + $absolute_difference;
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 {
36 36
 	$category = "aircraft";
37 37
 } else {
38
-	$category = filter_input(INPUT_GET,'category',FILTER_SANITIZE_STRING);
38
+	$category = filter_input(INPUT_GET, 'category', FILTER_SANITIZE_STRING);
39 39
 }
40 40
 
41 41
 $page_url = $globalURL.'/newest/'.$category;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
   $limit_start = 0;
19 19
   $limit_end = 25;
20 20
   $absolute_difference = 25;
21
-}  else {
21
+} else {
22 22
 	$limit_explode = explode(",", $_GET['limit']);
23 23
 	$limit_start = $limit_explode[0];
24 24
 	$limit_end = $limit_explode[1];
Please login to merge, or discard this patch.
country-sub-menu.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@  discard block
 block discarded – undo
3 3
 </span>
4 4
 <div class="sub-menu sub-menu-container">
5 5
 	<ul class="nav nav-pills">
6
-		<li><a href="<?php print $globalURL; ?>/country/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li>
6
+		<li><a href="<?php print $globalURL; ?>/country/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li>
7 7
 		<li class="dropdown">
8
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "country-statistics-aircraft" || strtolower($current_page) == "country-statistics-registration" || strtolower($current_page) == "country-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
8
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "country-statistics-aircraft" || strtolower($current_page) == "country-statistics-registration" || strtolower($current_page) == "country-statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#">
9 9
 		      <?php echo _("Aircraft"); ?> <span class="caret"></span>
10 10
 		    </a>
11 11
 		    <ul class="dropdown-menu" role="menu">
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 		    </ul>
16 16
 		</li>
17 17
 		<li class="dropdown">
18
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "country-statistics-airline" || strtolower($current_page) == "country-statistics-airline-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
18
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "country-statistics-airline" || strtolower($current_page) == "country-statistics-airline-country") { print 'active'; } ?>" data-toggle="dropdown" href="#">
19 19
 		      <?php echo _("Airline"); ?> <span class="caret"></span>
20 20
 		    </a>
21 21
 		    <ul class="dropdown-menu" role="menu">
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		    </ul>
25 25
 		</li>
26 26
 		<li class="dropdown">
27
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "country-statistics-departure-airport" || strtolower($current_page) == "country-statistics-departure-airport-country" || strtolower($current_page) == "country-statistics-arrival-airport" || strtolower($current_page) == "country-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
27
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "country-statistics-departure-airport" || strtolower($current_page) == "country-statistics-departure-airport-country" || strtolower($current_page) == "country-statistics-arrival-airport" || strtolower($current_page) == "country-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#">
28 28
 		      <?php echo _("Airport"); ?> <span class="caret"></span>
29 29
 		    </a>
30 30
 		    <ul class="dropdown-menu" role="menu">
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 			  <li><a href="<?php print $globalURL; ?>/country/statistics/arrival-airport-country/<?php print $country; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li>
35 35
 		    </ul>
36 36
 		</li>
37
-		<li><a href="<?php print $globalURL; ?>/country/statistics/route/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li>
38
-		<li><a href="<?php print $globalURL; ?>/country/statistics/time/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li>
37
+		<li><a href="<?php print $globalURL; ?>/country/statistics/route/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li>
38
+		<li><a href="<?php print $globalURL; ?>/country/statistics/time/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li>
39 39
 	</ul>
40 40
 </div>
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
registration-statistics-time.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,14 +3,14 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
7
-$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING);
6
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
7
+$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING);
8 8
 $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort);
9 9
 $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration);
10 10
 
11 11
 if (!empty($spotter_array))
12 12
 {
13
-	$title = sprintf(_("Most Common Time of Day of aircraft with registration %s"),$registration);
13
+	$title = sprintf(_("Most Common Time of Day of aircraft with registration %s"), $registration);
14 14
 	require_once('header.php');
15 15
   
16 16
 	print '<div class="info column">';
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	include('registration-sub-menu.php');
24 24
 	print '<div class="column">';
25 25
 	print '<h2>'._("Most Common Time of Day").'</h2>';
26
-	print '<p>'.sprintf(_("The statistic below shows the most common time of day from aircraft with registration <strong>%s</strong>."),$registration).'</p>';
26
+	print '<p>'.sprintf(_("The statistic below shows the most common time of day from aircraft with registration <strong>%s</strong>."), $registration).'</p>';
27 27
 
28 28
 	$hour_array = $Spotter->countAllHoursByRegistration($registration);
29 29
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             var data = google.visualization.arrayToDataTable([
36 36
             	["'._("Hour").'", "'._("# of Flights").'"], ';
37 37
             	$hour_data = '';
38
-	foreach($hour_array as $hour_item)
38
+	foreach ($hour_array as $hour_item)
39 39
 	{
40 40
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
41 41
 	}
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
           function drawChart() {
39 39
             var data = google.visualization.arrayToDataTable([
40 40
             	["'._("Hour").'", "'._("# of Flights").'"], ';
41
-            	$hour_data = '';
41
+				$hour_data = '';
42 42
 	foreach($hour_array as $hour_item)
43 43
 	{
44 44
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
Please login to merge, or discard this patch.
country-statistics-registration.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)));
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
10
+$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING)));
11
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
12 12
 if (isset($_GET['sort'])) {
13 13
 	$spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort);
14 14
 } else {
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
 
18 18
 if (!empty($spotter_array))
19 19
 {
20
-	$title = sprintf(_("Most Common Aircraft by registration from %s"),$country);
20
+	$title = sprintf(_("Most Common Aircraft by registration from %s"), $country);
21 21
 	require_once('header.php');
22 22
 	print '<div class="select-item">';
23 23
 	print '<form action="'.$globalURL.'/country" method="post">';
24 24
 	print '<select name="country" class="selectpicker" data-live-search="true">';
25 25
 	print '<option></option>';
26 26
 	$all_countries = $Spotter->getAllCountries();
27
-	foreach($all_countries as $all_country)
27
+	foreach ($all_countries as $all_country)
28 28
 	{
29
-		if($country == $all_country['country'])
29
+		if ($country == $all_country['country'])
30 30
 		{
31 31
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>';
32 32
 		} else {
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	if ($_GET['country'] != "NA")
42 42
 	{
43 43
 		print '<div class="info column">';
44
-		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"),$country).'</h1>';
44
+		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"), $country).'</h1>';
45 45
 		print '</div>';
46 46
 	} else {
47 47
 		print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>';
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	include('country-sub-menu.php');
51 51
 	print '<div class="column">';
52 52
 	print '<h2>'._("Most Common Aircraft by Registration").'</h2>';
53
-	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of airlines or departure/arrival airports from <strong>%s</strong>."),$country).'</p>';
53
+	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of airlines or departure/arrival airports from <strong>%s</strong>."), $country).'</p>';
54 54
 	$aircraft_array = $Spotter->countAllAircraftRegistrationByCountry($country);
55 55
 	if (!empty($aircraft_array))
56 56
 	{
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		print '</thead>';
66 66
 		print '<tbody>';
67 67
 		$i = 1;
68
-		foreach($aircraft_array as $aircraft_item)
68
+		foreach ($aircraft_array as $aircraft_item)
69 69
 		{
70 70
 			print '<tr>';
71 71
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['country'])) {
6
-        header('Location: '.$globalURL.'/country');
7
-        die();
6
+		header('Location: '.$globalURL.'/country');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)));
Please login to merge, or discard this patch.
route.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
 
6 6
 if ($_POST['departure_airport'] != "" || $_POST['arrival_airport'])
7 7
 {
8
-	$departure_airport = filter_input(INPUT_POST,'departure_airport',FILTER_SANITIZE_STRING);
9
-	$arrival_airport = filter_input(INPUT_POST,'arrival_airport',FILTER_SANITIZE_STRING);
8
+	$departure_airport = filter_input(INPUT_POST, 'departure_airport', FILTER_SANITIZE_STRING);
9
+	$arrival_airport = filter_input(INPUT_POST, 'arrival_airport', FILTER_SANITIZE_STRING);
10 10
 	header('Location: '.$globalURL.'/route/'.$departure_airport.'/'.$arrival_airport);
11 11
 } else {
12 12
 	header('Location: '.$globalURL);
Please login to merge, or discard this patch.
registration-statistics-arrival-airport.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,16 +3,16 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6
-$sort=filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
7
-$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING);
6
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
7
+$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING);
8 8
 if ($registration != '') {
9 9
 	$spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort);
10 10
 	$aircraft_array = $Spotter->getAircraftInfoByRegistration($registration);
11
-} else $spotter_array=array();
11
+} else $spotter_array = array();
12 12
 
13 13
 if (!empty($spotter_array))
14 14
 {
15
-	$title = sprintf(_("Most Common Arrival Airports of aircraft with registration %s"),$registration);
15
+	$title = sprintf(_("Most Common Arrival Airports of aircraft with registration %s"), $registration);
16 16
 
17 17
 	require_once('header.php');
18 18
 		print '<div class="info column">';
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	include('registration-sub-menu.php');
26 26
 	print '<div class="column">';
27 27
 	print '<h2>'._("Most Common Arrival Airports").'</h2>';
28
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with aircraft registration <strong>%s</strong>."),$registration).'</p>';
28
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with aircraft registration <strong>%s</strong>."), $registration).'</p>';
29 29
 	$airport_airport_array = $Spotter->countAllArrivalAirportsByRegistration($registration);
30 30
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>
31 31
     	<script>
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         	["'._("Airport").'", "'._("# of times").'"],';
41 41
 
42 42
 	$airport_data = '';
43
-	foreach($airport_airport_array as $airport_item)
43
+	foreach ($airport_airport_array as $airport_item)
44 44
 	{
45 45
 		$name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')';
46 46
 		$name = str_replace("'", "", $name);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	print '</thead>';
79 79
 	print '<tbody>';
80 80
 	$i = 1;
81
-	foreach($airport_airport_array as $airport_item)
81
+	foreach ($airport_airport_array as $airport_item)
82 82
 	{
83 83
 		print '<tr>';
84 84
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,9 @@
 block discarded – undo
8 8
 if ($registration != '') {
9 9
 	$spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort);
10 10
 	$aircraft_array = $Spotter->getAircraftInfoByRegistration($registration);
11
-} else $spotter_array=array();
11
+} else {
12
+	$spotter_array=array();
13
+}
12 14
 
13 15
 if (!empty($spotter_array))
14 16
 {
Please login to merge, or discard this patch.