Completed
Push — master ( cf2026...d6e0fa )
by Yannick
32:48
created
races-geojson.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,16 +8,16 @@  discard block
 block discarded – undo
8 8
 }
9 9
 header('Content-Type: text/javascript');
10 10
 
11
-$race_id = filter_input(INPUT_GET,'race_id',FILTER_SANITIZE_NUMBER_INT);
11
+$race_id = filter_input(INPUT_GET, 'race_id', FILTER_SANITIZE_NUMBER_INT);
12 12
 $race_array = $Marine->getRace($race_id);
13 13
       
14 14
 $output = '{"type": "FeatureCollection","features": [';
15 15
 if (!empty($race_array))
16 16
 {	
17
-	$course = json_decode($race_array['race_markers'],true);
17
+	$course = json_decode($race_array['race_markers'], true);
18 18
 	$i = 0;
19 19
 	$f = count($course);
20
-	foreach($course as $marker)
20
+	foreach ($course as $marker)
21 21
 	{
22 22
 		date_default_timezone_set('UTC');
23 23
 		$output .= '{"type": "Feature",';
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 		$output .= '"type": "'.$marker['type'].'",';
29 29
 		if ($i == 0 || $i == 1) {
30 30
 			$output .= '"icon": "images/tsk/tsk-start.png",';
31
-		} elseif ($i == $f-1 || $i == $f-2) {
31
+		} elseif ($i == $f - 1 || $i == $f - 2) {
32 32
 			$output .= '"icon": "images/tsk/tsk-finish.png",';
33 33
 		} elseif ($marker['type'] == 4) {
34 34
 			$output .= '"icon": "images/kardinalstonne.png",';
Please login to merge, or discard this patch.