Completed
Push — master ( d6b14e...e982bb )
by Yannick
54:14 queued 25:57
created
sitemap.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	$output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
15 15
 
16 16
 		$spotter_array = $Spotter->getAllFlightsforSitemap();
17
-		foreach($spotter_array as $spotter_item)
17
+		foreach ($spotter_array as $spotter_item)
18 18
 		{
19 19
 			$output .= '<url>';
20 20
 			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/flightid/'.$spotter_item['spotter_id'].'</loc>';
@@ -25,14 +25,14 @@  discard block
 block discarded – undo
25 25
 	$output .= '</urlset>';
26 26
 	
27 27
 	
28
-} else if (isset($_GET['type']) && $_GET['type'] == "aircraft"){
28
+} else if (isset($_GET['type']) && $_GET['type'] == "aircraft") {
29 29
 
30 30
 	$output .= '<?xml version="1.0" encoding="UTF-8"?>';
31 31
 	$output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
32 32
 
33 33
 		$aircraft_types = $Stats->getAllAircraftTypes();
34 34
 		if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
35
-		foreach($aircraft_types as $aircraft_item)
35
+		foreach ($aircraft_types as $aircraft_item)
36 36
 		{
37 37
 			$output .= '<url>';
38 38
 			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/aircraft/'.$aircraft_item['aircraft_icao'].'</loc>';
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 	$output .= '</urlset>';
44 44
 	
45 45
 	
46
-} else if (isset($_GET['type']) && $_GET['type'] == "registration"){
46
+} else if (isset($_GET['type']) && $_GET['type'] == "registration") {
47 47
 
48 48
 	$output .= '<?xml version="1.0" encoding="UTF-8"?>';
49 49
 	$output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
50 50
 
51 51
 		$aircraft_registrations = $Spotter->getAllAircraftRegistrations();
52
-		foreach($aircraft_registrations as $aircraft_item)
52
+		foreach ($aircraft_registrations as $aircraft_item)
53 53
 		{
54 54
 			$output .= '<url>';
55 55
 			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/registration/'.$aircraft_item['registration'].'</loc>';
@@ -59,13 +59,13 @@  discard block
 block discarded – undo
59 59
 		}
60 60
 	$output .= '</urlset>';
61 61
 	
62
-} else if (isset($_GET['type']) && $_GET['type'] == "airline"){
62
+} else if (isset($_GET['type']) && $_GET['type'] == "airline") {
63 63
 
64 64
 	$output .= '<?xml version="1.0" encoding="UTF-8"?>';
65 65
 	$output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
66 66
 
67 67
 		$airline_names = $Stats->getAllAirlineNames();
68
-		foreach($airline_names as $airline_item)
68
+		foreach ($airline_names as $airline_item)
69 69
 		{
70 70
 			$output .= '<url>';
71 71
 			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airline/'.$airline_item['airline_icao'].'</loc>';
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
75 75
 		}
76 76
 	$output .= '</urlset>';
77 77
 	
78
-} else if (isset($_GET['type']) && $_GET['type'] == "airport"){
78
+} else if (isset($_GET['type']) && $_GET['type'] == "airport") {
79 79
 
80 80
 	$output .= '<?xml version="1.0" encoding="UTF-8"?>';
81 81
 	$output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
82 82
 
83 83
 		$airport_names = $Stats->getAllAirportNames();
84 84
 		if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
85
-		foreach($airport_names as $airport_item)
85
+		foreach ($airport_names as $airport_item)
86 86
 		{
87 87
 			$output .= '<url>';
88 88
 			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airport/'.$airport_item['airport_icao'].'</loc>';
@@ -92,14 +92,14 @@  discard block
 block discarded – undo
92 92
 		}
93 93
 	$output .= '</urlset>';
94 94
 	
95
-} else if (isset($_GET['type']) && $_GET['type'] == "manufacturer"){
95
+} else if (isset($_GET['type']) && $_GET['type'] == "manufacturer") {
96 96
 
97 97
 	$output .= '<?xml version="1.0" encoding="UTF-8"?>';
98 98
 	$output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
99 99
 
100 100
 		$manufacturer_names = $Stats->getAllManufacturers();
101 101
 		if (empty($manufacturer_names)) $manufacturer_names = $Spotter->getAllManufacturers();
102
-		foreach($manufacturer_names as $manufacturer_item)
102
+		foreach ($manufacturer_names as $manufacturer_item)
103 103
 		{
104 104
 			$output .= '<url>';
105 105
 			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $manufacturer_item['aircraft_manufacturer'])).'</loc>';
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
 		}
110 110
 	$output .= '</urlset>';
111 111
 	
112
-} else if (isset($_GET['type']) && $_GET['type'] == "country"){
112
+} else if (isset($_GET['type']) && $_GET['type'] == "country") {
113 113
 
114 114
 	$output .= '<?xml version="1.0" encoding="UTF-8"?>';
115 115
 	$output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
116 116
 
117 117
 		$country_names = $Spotter->getAllCountries();
118
-		foreach($country_names as $country_item)
118
+		foreach ($country_names as $country_item)
119 119
 		{
120 120
 			$output .= '<url>';
121 121
 			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/country/'.strtolower(str_replace(" ", "-", $country_item['country'])).'</loc>';
@@ -125,13 +125,13 @@  discard block
 block discarded – undo
125 125
 		}
126 126
 	$output .= '</urlset>';
127 127
 	
128
-} else if (isset($_GET['type']) && $_GET['type'] == "ident"){
128
+} else if (isset($_GET['type']) && $_GET['type'] == "ident") {
129 129
 
130 130
 	$output .= '<?xml version="1.0" encoding="UTF-8"?>';
131 131
 	$output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
132 132
 
133 133
 		$ident_names = $Spotter->getAllIdents();
134
-		foreach($ident_names as $ident_item)
134
+		foreach ($ident_names as $ident_item)
135 135
 		{
136 136
 			if (ctype_alnum($ident_item['ident'])) {
137 137
 				$output .= '<url>';
@@ -143,13 +143,13 @@  discard block
 block discarded – undo
143 143
 		}
144 144
 	$output .= '</urlset>';
145 145
 	
146
-} else if (isset($_GET['type']) && $_GET['type'] == "date"){
146
+} else if (isset($_GET['type']) && $_GET['type'] == "date") {
147 147
 
148 148
 	$output .= '<?xml version="1.0" encoding="UTF-8"?>';
149 149
 	$output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
150 150
 
151 151
 		$date_names = $Spotter->getAllDates();
152
-		foreach($date_names as $date_item)
152
+		foreach ($date_names as $date_item)
153 153
 		{
154 154
 			$output .= '<url>';
155 155
 			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/date/'.date("Y-m-d", strtotime($date_item['date'])).'</loc>';
@@ -159,13 +159,13 @@  discard block
 block discarded – undo
159 159
 		}
160 160
 	$output .= '</urlset>';
161 161
 	
162
-} else if (isset($_GET['type']) && $_GET['type'] == "route"){
162
+} else if (isset($_GET['type']) && $_GET['type'] == "route") {
163 163
 
164 164
 	$output .= '<?xml version="1.0" encoding="UTF-8"?>';
165 165
 	$output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
166 166
 
167 167
 		$route_names = $Spotter->getAllRoutes();
168
-		foreach($route_names as $route_item)
168
+		foreach ($route_names as $route_item)
169 169
 		{
170 170
 			$output .= '<url>';
171 171
 			    $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/route/'.$route_item['airport_departure_icao'].'/'.$route_item['airport_arrival_icao'].'</loc>';
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		}
176 176
 	$output .= '</urlset>';
177 177
 	
178
-} else if (isset($_GET['type']) && $_GET['type'] == "static"){
178
+} else if (isset($_GET['type']) && $_GET['type'] == "static") {
179 179
 
180 180
 	$output .= '<?xml version="1.0" encoding="UTF-8"?>';
181 181
 	$output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">';
Please login to merge, or discard this patch.