Code Duplication    Length = 8-10 lines in 2 locations

location-geojson.php 1 location

@@ 12-21 (lines=10) @@
9
}
10
header('Content-Type: text/javascript');
11
12
if (!isset($globalDemo)) {
13
	if (isset($_GET['coord'])) 
14
	{
15
		$coords = explode(',',$_GET['coord']);
16
//		$spotter_array = Source::getAllLocationInfobyCoord($coords);
17
		$spotter_array = $Source->getAllLocationInfo();
18
	} else {
19
		$spotter_array = $Source->getAllLocationInfo();
20
	}
21
}
22
23
$output = '{"type": "FeatureCollection","features": [';
24
if (!empty($spotter_array))

notam-geojson.php 1 location

@@ 11-18 (lines=8) @@
8
}
9
header('Content-Type: text/javascript');
10
11
if (isset($_GET['coord'])) 
12
{
13
	$coords = explode(',',$_GET['coord']);
14
//	$spotter_array = Spotter::getAllNOTAMbyCoord($coords);
15
	$spotter_array = $NOTAM->getAllNOTAM();
16
} else {
17
	$spotter_array = $NOTAM->getAllNOTAM();
18
}
19
      
20
$output = '{"type": "FeatureCollection","features": [';
21