Completed
Push — master ( d44f1f...2285a7 )
by Yannick
09:57
created
airport-geojson.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		date_default_timezone_set('UTC');
27 27
 		//waypoint plotting
28 28
 		$output .= '{"type": "Feature",';
29
-		    $output .= '"properties": {';
29
+			$output .= '"properties": {';
30 30
 			$output .= '"name": "'.str_replace('"',"'",$spotter_item['name']).'",';
31 31
 			$output .= '"city": "'.$spotter_item['city'].'",';
32 32
 			$output .= '"country": "'.$spotter_item['country'].'",';
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
 			$output .= '"homepage": "'.$spotter_item['home_link'].'",';
50 50
 			$output .= '"image_thumb": "'.$spotter_item['image_thumb'].'"';
51 51
 //			$output .= '"photo": "'.$spotter_item['image_thumbnail'].'",';
52
-		    $output .= '},';
53
-		    $output .= '"geometry": {';
52
+			$output .= '},';
53
+			$output .= '"geometry": {';
54 54
 			$output .= '"type": "Point",';
55 55
 			$output .= '"coordinates": [';
56
-			    $output .= $spotter_item['longitude'].', '.$spotter_item['latitude'];
56
+				$output .= $spotter_item['longitude'].', '.$spotter_item['latitude'];
57 57
 			$output .= ']';
58
-		    $output .= '}';
58
+			$output .= '}';
59 59
 		$output .= '},';
60 60
 	}
61 61
 }
Please login to merge, or discard this patch.
airport-statistics-manufacturer.php 1 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['airport'])) {
6
-        header('Location: '.$globalURL.'/airport');
7
-        die();
6
+		header('Location: '.$globalURL.'/airport');
7
+		die();
8 8
 }
9 9
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
airline-statistics-aircraft.php 1 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['airline'])) {
6
-        header('Location: '.$globalURL.'/airline');
7
-        die();
6
+		header('Location: '.$globalURL.'/airline');
7
+		die();
8 8
 }
9 9
 $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
redirect.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 block discarded – undo
7 7
 {
8 8
 	$spotter_id = $Spotter->getSpotterIDBasedOnFlightAwareID($_GET['flightaware_id']);
9 9
     
10
-    if ($spotter_id != "")
11
-    {
12
-        header('Location: '.$globalURL.'/flightid/'.$spotter_id);
13
-    } else {
10
+	if ($spotter_id != "")
11
+	{
12
+		header('Location: '.$globalURL.'/flightid/'.$spotter_id);
13
+	} else {
14 14
 	   header('Location: '.$globalURL);
15
-    }
15
+	}
16 16
 }
17 17
 ?>
18 18
\ No newline at end of file
Please login to merge, or discard this patch.
scripts/cron.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,12 +11,12 @@
 block discarded – undo
11 11
 //checks to see if FlightAware import is set
12 12
 if ($globalFlightAware == TRUE)
13 13
 {
14
-    $SpotterLive = new SpotterLive();
15
-    $Spotter = new Spotter();
16
-    //deletes the spotter LIVE data
17
-    $SpotterLive->deleteLiveSpotterData();
14
+	$SpotterLive = new SpotterLive();
15
+	$Spotter = new Spotter();
16
+	//deletes the spotter LIVE data
17
+	$SpotterLive->deleteLiveSpotterData();
18 18
     
19
-    //imports the new data from FlightAware
20
-    $Spotter->importFromFlightAware();
19
+	//imports the new data from FlightAware
20
+	$Spotter->importFromFlightAware();
21 21
 }
22 22
 ?>
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
scripts/check_data.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
 */
6 6
 require_once(dirname(__FILE__).'/../require/settings.php');
7 7
 if ($globalInstalled) {
8
-    echo '$globalInstalled must be set to FALSE in require/settings.php';
9
-    exit;
8
+	echo '$globalInstalled must be set to FALSE in require/settings.php';
9
+	exit;
10 10
 }
11 11
 
12 12
 require_once('../require/class.Connection.php');
Please login to merge, or discard this patch.
scripts/daemon-acars.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 require_once(dirname(__FILE__).'/../require/class.Connection.php');
12 12
 $schema = new Connection();
13 13
 if ($schema->latest() === false) {
14
-    echo "You MUST update to latest schema. Run install/index.php";
15
-    exit();
14
+	echo "You MUST update to latest schema. Run install/index.php";
15
+	exit();
16 16
 }
17 17
 
18 18
 $debug = true;
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
 date_default_timezone_set('UTC');
22 22
 // signal handler - playing nice with sockets and dump1090
23 23
 pcntl_signal(SIGINT,  function($signo) {
24
-    global $sock;
25
-    echo "\n\nctrl-c or kill signal received. Tidying up ... ";
26
-    socket_shutdown($sock, 0);
27
-    socket_close($sock);
28
-    die("Bye!\n");
24
+	global $sock;
25
+	echo "\n\nctrl-c or kill signal received. Tidying up ... ";
26
+	socket_shutdown($sock, 0);
27
+	socket_close($sock);
28
+	die("Bye!\n");
29 29
 });
30 30
 pcntl_signal_dispatch();
31 31
 
@@ -38,24 +38,24 @@  discard block
 block discarded – undo
38 38
 // Bind the source address
39 39
 if( !socket_bind($sock, $globalACARSHost , $globalACARSPort) )
40 40
 {
41
-    $errorcode = socket_last_error();
42
-    $errormsg = socket_strerror($errorcode);
41
+	$errorcode = socket_last_error();
42
+	$errormsg = socket_strerror($errorcode);
43 43
      
44
-    die("Could not bind socket : [$errorcode] $errormsg \n");
44
+	die("Could not bind socket : [$errorcode] $errormsg \n");
45 45
 }
46 46
 
47 47
 echo "LISTEN UDP MODE \n\n";
48 48
 while(1) {
49
-    $r = socket_recvfrom($sock, $buffer, 512, 0, $remote_ip, $remote_port);
50
-
51
-    // lets play nice and handle signals such as ctrl-c/kill properly
52
-    pcntl_signal_dispatch();
53
-    $dataFound = false;
54
-    //  (null) 2 23/02/2015 14:46:06 0 -16 X .D-AIPW ! 1L 7 M82A LH077P 010952342854:VP-MIBI+W+0)-V+(),GB1
55
-    echo $buffer."\n";
56
-    $ACARS->add(trim($buffer));
57
-    socket_sendto($sock, "OK " . $buffer , 100 , 0 , $remote_ip , $remote_port);
58
-    $ACARS->deleteLiveAcarsData();
49
+	$r = socket_recvfrom($sock, $buffer, 512, 0, $remote_ip, $remote_port);
50
+
51
+	// lets play nice and handle signals such as ctrl-c/kill properly
52
+	pcntl_signal_dispatch();
53
+	$dataFound = false;
54
+	//  (null) 2 23/02/2015 14:46:06 0 -16 X .D-AIPW ! 1L 7 M82A LH077P 010952342854:VP-MIBI+W+0)-V+(),GB1
55
+	echo $buffer."\n";
56
+	$ACARS->add(trim($buffer));
57
+	socket_sendto($sock, "OK " . $buffer , 100 , 0 , $remote_ip , $remote_port);
58
+	$ACARS->deleteLiveAcarsData();
59 59
 }
60 60
 pcntl_exec($_,$argv);
61 61
 ?>
Please login to merge, or discard this patch.
airline-statistics-arrival-airport.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['airline'])) {
6
-        header('Location: '.$globalURL.'/airline');
7
-        die();
6
+		header('Location: '.$globalURL.'/airline');
7
+		die();
8 8
 }
9 9
 $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     
73 73
         var data = google.visualization.arrayToDataTable([ 
74 74
         	["'._("Airport").'", "'._("# of times").'"],';
75
-        $airport_data = '';
75
+		$airport_data = '';
76 76
 	foreach($airport_airport_array as $airport_item)
77 77
 	{
78 78
 		$name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')';
Please login to merge, or discard this patch.
airline-statistics-departure-airport.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['airline'])) {
6
-        header('Location: '.$globalURL.'/airline');
7
-        die();
6
+		header('Location: '.$globalURL.'/airline');
7
+		die();
8 8
 }
9 9
 $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
62 62
 	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
63 63
 	$airport_airport_array = $Spotter->countAllDepartureAirportsByAirline($airline);
64
-    	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>
64
+		print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>
65 65
     	<script>
66 66
     	google.load("visualization", "1", {packages:["geochart"]});
67 67
     	google.setOnLoadCallback(drawCharts);
Please login to merge, or discard this patch.