Completed
Push — master ( e17801...597a61 )
by Yannick
25:55
created
country-statistics-aircraft.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['country'])) {
6
-        header('Location: '.$globalURL.'/country');
7
-        die();
6
+		header('Location: '.$globalURL.'/country');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@  discard block
 block discarded – undo
9 9
 $Spotter = new Spotter();
10 10
 
11 11
 $country = ucwords(str_replace("-", " ", $_GET['country']));
12
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
12
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
13 13
 $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort);
14 14
 
15 15
 if (!empty($spotter_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Aircraft from %s"),$country);
17
+	$title = sprintf(_("Most Common Aircraft from %s"), $country);
18 18
 
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	print '<select name="country" class="selectpicker" data-live-search="true">';
23 23
 	print '<option></option>';
24 24
 	$all_countries = $Spotter->getAllCountries();
25
-	foreach($all_countries as $all_country)
25
+	foreach ($all_countries as $all_country)
26 26
 	{
27
-		if($country == $all_country['country'])
27
+		if ($country == $all_country['country'])
28 28
 		{
29 29
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>';
30 30
 		} else {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	if ($_GET['country'] != "NA")
40 40
 	{
41 41
 		print '<div class="info column">';
42
-		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"),$country).'</h1>';
42
+		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"), $country).'</h1>';
43 43
 		print '</div>';
44 44
 	} else {
45 45
 		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>';
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	include('country-sub-menu.php');
49 49
 	print '<div class="column">';
50 50
 	print '<h2>'._("Most Common Aircraft").'</h2>';
51
-	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."),$country).'</p>';
51
+	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."), $country).'</p>';
52 52
 
53 53
 	$aircraft_array = $Spotter->countAllAircraftTypesByCountry($country);
54 54
 	if (!empty($aircraft_array))
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		print '</thead>';
63 63
 		print '<tbody>';
64 64
 		$i = 1;
65
-		foreach($aircraft_array as $aircraft_item)
65
+		foreach ($aircraft_array as $aircraft_item)
66 66
 		{
67 67
 			print '<tr>';
68 68
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
registration-detailed.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 
6
-if (!isset($_GET['registration'])){
6
+if (!isset($_GET['registration'])) {
7 7
 	header('Location: '.$globalURL.'');
8 8
 } else {
9 9
 	$Spotter = new Spotter();
10 10
 	//calculuation for the pagination
11
-	if(!isset($_GET['limit']))
11
+	if (!isset($_GET['limit']))
12 12
 	{
13 13
 		$limit_start = 0;
14 14
 		$limit_end = 25;
15 15
 		$absolute_difference = 25;
16
-	}  else {
16
+	} else {
17 17
 		$limit_explode = explode(",", $_GET['limit']);
18 18
 		$limit_start = $limit_explode[0];
19 19
 		$limit_end = $limit_explode[1];
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 	$limit_next = $limit_end + $absolute_difference;
27 27
 	$limit_previous_1 = $limit_start - $absolute_difference;
28 28
 	$limit_previous_2 = $limit_end - $absolute_difference;
29
-	$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING);
30
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
29
+	$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING);
30
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
31 31
 	
32 32
 	$page_url = $globalURL.'/registration/'.$registration;
33 33
 	
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	
41 41
 	if (!empty($spotter_array))
42 42
 	{
43
-		$title = sprintf(_("Detailed View of aircraft with registration %s"),$registration);
43
+		$title = sprintf(_("Detailed View of aircraft with registration %s"), $registration);
44 44
 		require_once('header.php');
45 45
 		print '<div class="info column">';
46 46
 		print '<h1>'.$registration.' - '.$aircraft_array[0]['aircraft_name'].' ('.$aircraft_array[0]['aircraft_icao'].')</h1>';
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		
52 52
 		include('registration-sub-menu.php');
53 53
 		print '<div class="table column">';
54
-		print '<p>'.sprintf(_("The table below shows the detailed information of all flights of aircraft with the registration <strong>%s</strong>."),$registration).'</p>';
54
+		print '<p>'.sprintf(_("The table below shows the detailed information of all flights of aircraft with the registration <strong>%s</strong>."), $registration).'</p>';
55 55
 
56 56
 		include('table-output.php');
57 57
 		print '<div class="pagination">';
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 		$limit_start = 0;
15 15
 		$limit_end = 25;
16 16
 		$absolute_difference = 25;
17
-	}  else {
17
+	} else {
18 18
 		$limit_explode = explode(",", $_GET['limit']);
19 19
 		$limit_start = $limit_explode[0];
20 20
 		$limit_end = $limit_explode[1];
Please login to merge, or discard this patch.
contribute.php 1 patch
Braces   +13 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,10 +11,21 @@
 block discarded – undo
11 11
     <p>You can contribute to <?php print $globalName; ?> if you have an ADS-B receiver.</p>
12 12
     <h3>You need to : </h3>
13 13
     <ul>
14
-	<li>Create an account on <a href="<?php if (isset($globalContributeLogin)) print $globalContributeLogin.'">'.$globalContributeLogin; else print 'https://login.flightairmap.fr">login.flightairmap.fr'; ?></a></li>
14
+	<li>Create an account on <a href="<?php if (isset($globalContributeLogin)) {
15
+	print $globalContributeLogin.'">'.$globalContributeLogin;
16
+} else {
17
+	print 'https://login.flightairmap.fr">login.flightairmap.fr';
18
+}
19
+?></a></li>
15 20
 	<li>Download dump1090 fork from <a href="https://github.com/Ysurac/dump1090">https://github.com/Ysurac/dump1090</a></li>
16 21
 	<li>Compile zfamup1090 with <em>make zfamup1090</em> (you need to have libcurl installed)</li>
17
-	<li>Run zfamup1090 : <em>./zfamup1090 --net-zfam-user YourUsername --net-zfam-pass YourPassword<?php if (isset($globalContributeURL)) print ' --net-zfam-addr '.$globalContributeURL; if (isset($globalContributePort)) print ' --net-zfam-port '.$globalContributePort; ?></em> (add <em>--net-bo-ipaddr ipofbeastsource --net-bo-port portofbeastsource</em> if needed, default to 127.0.0.1 and 30005)</li>
22
+	<li>Run zfamup1090 : <em>./zfamup1090 --net-zfam-user YourUsername --net-zfam-pass YourPassword<?php if (isset($globalContributeURL)) {
23
+	print ' --net-zfam-addr '.$globalContributeURL;
24
+}
25
+if (isset($globalContributePort)) {
26
+	print ' --net-zfam-port '.$globalContributePort;
27
+}
28
+?></em> (add <em>--net-bo-ipaddr ipofbeastsource --net-bo-port portofbeastsource</em> if needed, default to 127.0.0.1 and 30005)</li>
18 29
     </ul>
19 30
 </div>
20 31
 <?php
Please login to merge, or discard this patch.
ident-statistics-manufacturer.php 2 patches
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
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
11
-$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
12
-$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$ident = filter_input(INPUT_GET, 'ident', 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 Manufacturer of %s"),$spotter_array[0]['ident']);
16
+	$title = sprintf(_("Most Common Aircraft Manufacturer 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 Manufacturer").'</h2>';
27
-	print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer 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 Manufacturer of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>';
28 28
 
29 29
 	$manufacturers_array = $Spotter->countAllAircraftManufacturerByIdent($ident);
30 30
 	if (!empty($manufacturers_array))
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 		print '</thead>';
40 40
 		print '<tbody>';
41 41
 		$i = 1;
42
-		foreach($manufacturers_array as $manufacturer_item)
42
+		foreach ($manufacturers_array as $manufacturer_item)
43 43
 		{
44 44
 			print '<tr>';
45 45
 			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['ident'])) {
6
-        header('Location: '.$globalURL.'/ident');
7
-        die();
6
+		header('Location: '.$globalURL.'/ident');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
footer.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 	<?php
5 5
 	    if (isset($sql_time)) {
6 6
 	?>
7
-	<i><?php echo _("Page generated in").' '.round($sql_time+$page_time,2); ?>s (<?php print round($page_time,2); ?>ms PHP - <?php print round($sql_time,2); ?>ms SQL)</i>
7
+	<i><?php echo _("Page generated in").' '.round($sql_time + $page_time, 2); ?>s (<?php print round($page_time, 2); ?>ms PHP - <?php print round($sql_time, 2); ?>ms SQL)</i>
8 8
 	<br />
9 9
 	<?php
10 10
 	    }
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@
 block discarded – undo
6 6
 </div>
7 7
 <footer class="container">
8 8
 	<?php
9
-	    if (isset($sql_time)) {
9
+		if (isset($sql_time)) {
10 10
 	?>
11 11
 	<i><?php echo _("Page generated in").' '.round($sql_time+$page_time,2); ?>s (<?php print round($page_time,2); ?>ms PHP - <?php print round($sql_time,2); ?>ms SQL)</i>
12 12
 	<br />
13 13
 	<?php
14
-	    }
14
+		}
15 15
 	?>
16 16
 	<span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source &amp; Credits</a></span> - <span><a href="https://www.flightairmap.fr/" target="_blank">Get source code</a></span>
17 17
 </footer>
Please login to merge, or discard this patch.
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,10 @@  discard block
 block discarded – undo
1 1
 </section>
2 2
 <div class="pub onmap">
3 3
 <?php
4
-	if (isset($globalPub)) print $globalPub;
5
-?>
4
+	if (isset($globalPub)) {
5
+		print $globalPub;
6
+	}
7
+	?>
6 8
 </div>
7 9
 <footer class="container">
8 10
 	<?php
@@ -13,7 +15,10 @@  discard block
 block discarded – undo
13 15
 	<?php
14 16
 	    }
15 17
 	?>
16
-	<span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source &amp; Credits</a></span> - <span><a href="https://www.flightairmap.fr/" target="_blank">Get source code</a></span>
18
+	<span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) {
19
+	print $globalURL;
20
+}
21
+?>/about#source">Source &amp; Credits</a></span> - <span><a href="https://www.flightairmap.fr/" target="_blank">Get source code</a></span>
17 22
 </footer>
18 23
 
19 24
 <div class="notifications bottom-left"></div>
Please login to merge, or discard this patch.
tools-acars.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
 $page_url = $globalURL.'/tools-acars';
10 10
 
11
-$message = filter_input(INPUT_POST,'acars_message',FILTER_SANITIZE_STRING);
11
+$message = filter_input(INPUT_POST, 'acars_message', FILTER_SANITIZE_STRING);
12 12
 
13 13
 print '<div class="info column">';
14 14
 print '<h1>'._("Parse ACARS messages").'</h1>';
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
 print '<fieldset class="form-group">';
22 22
 print '<label for="acars_message">'._("ACARS Message").'</label>';
23 23
 print '<textarea class="form-control" name="acars_message" id="acars_message" rows="5">';
24
-if ($message != '') print $message;
24
+if ($message != '') {
25
+	print $message;
26
+}
25 27
 print '</textarea>';
26 28
 print '</fieldset>';
27 29
 print '<button type="submit" class="btn btn-primary">Submit</button>';
Please login to merge, or discard this patch.
install/install_db.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,30 +1,30 @@
 block discarded – undo
1 1
 #!/usr/bin/php
2 2
 <?php
3
-    require_once('../require/settings.php');
4
-    if ($globalInstalled) {
5
-        echo '$globalInstalled must be set to FALSE in require/settings.php';
6
-        exit;
7
-    }
8
-    require('class.create_db.php');
9
-    echo "Create and import all tables...";
10
-    create_db::import_all_db('../db/');
11
-    echo "Done !\n";
3
+	require_once('../require/settings.php');
4
+	if ($globalInstalled) {
5
+		echo '$globalInstalled must be set to FALSE in require/settings.php';
6
+		exit;
7
+	}
8
+	require('class.create_db.php');
9
+	echo "Create and import all tables...";
10
+	create_db::import_all_db('../db/');
11
+	echo "Done !\n";
12 12
 
13
-    require('class.update_db.php');
14
-    echo "Populate all tables...\n";
15
-    update_db::update_all();
16
-    echo "\nInstall waypoints...(VERY slow!)";
17
-    update_db::update_waypoints();
18
-    echo "Done !\n";
19
-    echo "Install airspace...";
20
-    update_db::update_airspace();
21
-    echo "Done !\n";
22
-    echo 'All is now installed ! Thanks'."\n";
23
-    if ($globalSBS1) {
24
-            echo 'You need to run cron-sbs.php as a daemon. You can use init script in the install/init directory.'."\n";
25
-    }
26
-    if ($globalACARS) {
27
-            echo 'You need to run cron-acars.php as a daemon. You can use init script in the install/init directory.'."\n";
28
-    }
13
+	require('class.update_db.php');
14
+	echo "Populate all tables...\n";
15
+	update_db::update_all();
16
+	echo "\nInstall waypoints...(VERY slow!)";
17
+	update_db::update_waypoints();
18
+	echo "Done !\n";
19
+	echo "Install airspace...";
20
+	update_db::update_airspace();
21
+	echo "Done !\n";
22
+	echo 'All is now installed ! Thanks'."\n";
23
+	if ($globalSBS1) {
24
+			echo 'You need to run cron-sbs.php as a daemon. You can use init script in the install/init directory.'."\n";
25
+	}
26
+	if ($globalACARS) {
27
+			echo 'You need to run cron-acars.php as a daemon. You can use init script in the install/init directory.'."\n";
28
+	}
29 29
     
30 30
 ?>
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
install/populate_ivao.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@
 block discarded – undo
1 1
 #!/usr/bin/php
2 2
 <?php
3
-    require_once('../require/settings.php');
4
-    if ($globalInstalled) {
5
-        echo '$globalInstalled must be set to FALSE in require/settings.php';
6
-        exit;
7
-    }
8
-    require('class.update_db.php');
9
-    if (isset($globalVATSIM) && $globalVATSIM) {
3
+	require_once('../require/settings.php');
4
+	if ($globalInstalled) {
5
+		echo '$globalInstalled must be set to FALSE in require/settings.php';
6
+		exit;
7
+	}
8
+	require('class.update_db.php');
9
+	if (isset($globalVATSIM) && $globalVATSIM) {
10 10
 	echo "Install VATSIM airlines...";
11 11
 	update_db::update_vatsim();
12 12
 	echo "Done !\n";
13
-    }
14
-    if (isset($globalIVAO) && $globalIVAO) {
13
+	}
14
+	if (isset($globalIVAO) && $globalIVAO) {
15 15
 	if (!file_exists('tmp/ivae_feb2013.zip')) {
16 16
 		echo "You have to download the file ivae_feb2013.zip from https://www.ivao.aero/softdev/mirrors.asp?software=IvAeDataUp and put it in install/tmp directory";
17 17
 	} else {
18
-	        echo "Install IVAO airlines and logos...";
19
-	        update_db::update_IVAO();
18
+			echo "Install IVAO airlines and logos...";
19
+			update_db::update_IVAO();
20 20
 		echo "Done !\n";
21 21
 	}
22
-    }
22
+	}
23 23
 ?>
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
install/install-action.php 3 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -68,27 +68,27 @@  discard block
 block discarded – undo
68 68
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'database_import') {
69 69
 	if (update_schema::check_version(false) == '0') {
70 70
 		if ($globalDBdriver == 'mysql') {
71
-		    $error .= create_db::import_all_db('../db/');
71
+			$error .= create_db::import_all_db('../db/');
72 72
 		} elseif ($globalDBdriver == 'pgsql') {
73
-		    $error .= create_db::import_all_db('../db/pgsql/');
73
+			$error .= create_db::import_all_db('../db/pgsql/');
74 74
 		}
75 75
 		if ($error != '') {
76
-                        $_SESSION['error'] = $error;
76
+						$_SESSION['error'] = $error;
77 77
 		}
78 78
 		$_SESSION['done'] = array_merge($_SESSION['done'],array('Create and import tables'));
79 79
 		if ($globalSBS1 && !$globalIVAO && !$globalVATSIM && !$globalphpVMS) {
80 80
 			$_SESSION['install'] = 'populate';
81 81
 			$_SESSION['next'] = 'Populate aircraft_modes table with externals data for ADS-B';
82 82
 		} else {
83
-		    $_SESSION['install'] = 'sources';
84
-		    $_SESSION['next'] = 'Insert data in source table';
83
+			$_SESSION['install'] = 'sources';
84
+			$_SESSION['next'] = 'Insert data in source table';
85 85
 		}
86 86
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
87 87
 		print json_encode($result);
88 88
 	} else {
89 89
 		$error .= update_schema::check_version(true);
90 90
 		if ($error != '') {
91
-                        $_SESSION['error'] = $error;
91
+						$_SESSION['error'] = $error;
92 92
 		}
93 93
 		$_SESSION['done'] = array_merge($_SESSION['done'],array('Update schema if needed'));
94 94
 		$_SESSION['install'] = 'sources';
@@ -118,25 +118,25 @@  discard block
 block discarded – undo
118 118
 	$error .= update_db::update_countries();
119 119
 	$_SESSION['done'] = array_merge($_SESSION['done'],array('Populate countries database'));
120 120
 	if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') {
121
-	    $_SESSION['install'] = 'notam';
122
-	    $_SESSION['next'] = 'Populate NOTAM table with externals data';
123
-	    $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
124
-	    print json_encode($result);
121
+		$_SESSION['install'] = 'notam';
122
+		$_SESSION['next'] = 'Populate NOTAM table with externals data';
123
+		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
124
+		print json_encode($result);
125 125
 	} elseif (isset($_SESSION['owner']) && $_SESSION['owner'] == 1) {
126
-	    $_SESSION['install'] = 'owner';
127
-	    $_SESSION['next'] = 'Populate owner table with externals data';
128
-	    unset($_SESSION['owner']);
129
-	    $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
130
-	    print json_encode($result);
126
+		$_SESSION['install'] = 'owner';
127
+		$_SESSION['next'] = 'Populate owner table with externals data';
128
+		unset($_SESSION['owner']);
129
+		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
130
+		print json_encode($result);
131 131
 	} else {
132
-	    $_SESSION['install'] = 'sources';
133
-	    $_SESSION['next'] = 'Insert data in source table';
134
-	    $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
135
-	    print json_encode($result);
132
+		$_SESSION['install'] = 'sources';
133
+		$_SESSION['next'] = 'Insert data in source table';
134
+		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
135
+		print json_encode($result);
136 136
 	}
137 137
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'populate') {
138 138
 	if (!is_writable('tmp')) {
139
-                $error = 'The directory <i>install/tmp</i> must be writable.';
139
+				$error = 'The directory <i>install/tmp</i> must be writable.';
140 140
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
141 141
 		print json_encode($result);
142 142
 	} else {
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	}
153 153
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'populate_flarm') {
154 154
 	if (!is_writable('tmp')) {
155
-                $error = 'The directory <i>install/tmp</i> must be writable.';
155
+				$error = 'The directory <i>install/tmp</i> must be writable.';
156 156
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
157 157
 		print json_encode($result);
158 158
 	} else {
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	}
186 186
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'routes') {
187 187
 	if (!is_writable('tmp')) {
188
-                $error = 'The directory <i>install/tmp</i> must be writable.';
188
+				$error = 'The directory <i>install/tmp</i> must be writable.';
189 189
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
190 190
 		print json_encode($result);
191 191
 	} else {
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	}
201 201
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'translation') {
202 202
 	if (!is_writable('tmp')) {
203
-                $error = 'The directory <i>install/tmp</i> must be writable.';
203
+				$error = 'The directory <i>install/tmp</i> must be writable.';
204 204
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
205 205
 		print json_encode($result);
206 206
 	} else {
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	}
230 230
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'owner') {
231 231
 	if (!is_writable('tmp')) {
232
-                $error = 'The directory <i>install/tmp</i> must be writable.';
232
+				$error = 'The directory <i>install/tmp</i> must be writable.';
233 233
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
234 234
 		print json_encode($result);
235 235
 	} else {
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 	}
245 245
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'notam') {
246 246
 	if (!is_writable('tmp')) {
247
-                $error = 'The directory <i>install/tmp</i> must be writable.';
247
+				$error = 'The directory <i>install/tmp</i> must be writable.';
248 248
 		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
249 249
 		print json_encode($result);
250 250
 	} else {
@@ -296,17 +296,17 @@  discard block
 block discarded – undo
296 296
 */
297 297
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'sources') {
298 298
 	if (isset($_SESSION['sources']) && count($_SESSION['sources']) > 0) {
299
-	    $sources = $_SESSION['sources'];
299
+		$sources = $_SESSION['sources'];
300 300
 
301
-	    include_once('../require/class.Source.php');
302
-	    $globalDebug = FALSE;
303
-	    $Source = new Source();
304
-	    $Source->deleteAllLocation();
305
-	    foreach ($sources as $src) {
301
+		include_once('../require/class.Source.php');
302
+		$globalDebug = FALSE;
303
+		$Source = new Source();
304
+		$Source->deleteAllLocation();
305
+		foreach ($sources as $src) {
306 306
 		if (isset($src['latitude']) && $src['latitude'] != '') $Source->addLocation($src['name'],$src['latitude'],$src['longitude'],$src['altitude'],$src['city'],$src['country'],$src['source'],'antenna.png');
307
-	    }
308
-	    $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert data in source table'));
309
-	    unset($_SESSION['sources']);
307
+		}
308
+		$_SESSION['done'] = array_merge($_SESSION['done'],array('Insert data in source table'));
309
+		unset($_SESSION['sources']);
310 310
 	}
311 311
 	/*
312 312
 	if (isset($globalIVAO) && $globalIVAO) $_SESSION['install'] = 'ivao';
Please login to merge, or discard this patch.
Braces   +23 added lines, -9 removed lines patch added patch discarded remove patch
@@ -164,15 +164,21 @@  discard block
 block discarded – undo
164 164
 
165 165
 		if ((isset($globalVATSIM) && $globalVATSIM) && (isset($globalIVAO) && $globalIVAO)) {
166 166
 			$_SESSION['install'] = 'vatsim';
167
-			if (file_exists('tmp/ivae_feb2013.zip')) $_SESSION['next'] = 'Insert IVAO data';
168
-			else $_SESSION['next'] = 'Insert VATSIM data';
167
+			if (file_exists('tmp/ivae_feb2013.zip')) {
168
+				$_SESSION['next'] = 'Insert IVAO data';
169
+			} else {
170
+				$_SESSION['next'] = 'Insert VATSIM data';
171
+			}
169 172
 		} elseif (isset($globalVATSIM) && $globalVATSIM) {
170 173
 			$_SESSION['install'] = 'vatsim';
171 174
 			$_SESSION['next'] = 'Insert VATSIM data';
172 175
 		} elseif (isset($globalIVAO) && $globalIVAO) {
173 176
 			$_SESSION['install'] = 'vatsim';
174
-			if (file_exists('tmp/ivae_feb2013.zip')) $_SESSION['next'] = 'Insert IVAO data';
175
-			else $_SESSION['next'] = 'Insert VATSIM data (IVAO not found)';
177
+			if (file_exists('tmp/ivae_feb2013.zip')) {
178
+				$_SESSION['next'] = 'Insert IVAO data';
179
+			} else {
180
+				$_SESSION['next'] = 'Insert VATSIM data (IVAO not found)';
181
+			}
176 182
 		} elseif (isset($globalphpVMS) && $globalphpVMS) {
177 183
 			$_SESSION['install'] = 'vatsim';
178 184
 			$_SESSION['next'] = 'Insert phpVMS data';
@@ -303,7 +309,9 @@  discard block
 block discarded – undo
303 309
 	    $Source = new Source();
304 310
 	    $Source->deleteAllLocation();
305 311
 	    foreach ($sources as $src) {
306
-		if (isset($src['latitude']) && $src['latitude'] != '') $Source->addLocation($src['name'],$src['latitude'],$src['longitude'],$src['altitude'],$src['city'],$src['country'],$src['source'],'antenna.png');
312
+		if (isset($src['latitude']) && $src['latitude'] != '') {
313
+			$Source->addLocation($src['name'],$src['latitude'],$src['longitude'],$src['altitude'],$src['city'],$src['country'],$src['source'],'antenna.png');
314
+		}
307 315
 	    }
308 316
 	    $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert data in source table'));
309 317
 	    unset($_SESSION['sources']);
@@ -314,15 +322,21 @@  discard block
 block discarded – undo
314 322
 	*/
315 323
 	if ((isset($globalVATSIM) && $globalVATSIM) && (isset($globalIVAO) && $globalIVAO)) {
316 324
 		$_SESSION['install'] = 'vatsim';
317
-		if (file_exists('tmp/ivae_feb2013.zip')) $_SESSION['next'] = 'Insert IVAO data';
318
-		else $_SESSION['next'] = 'Insert VATSIM data';
325
+		if (file_exists('tmp/ivae_feb2013.zip')) {
326
+			$_SESSION['next'] = 'Insert IVAO data';
327
+		} else {
328
+			$_SESSION['next'] = 'Insert VATSIM data';
329
+		}
319 330
 	} elseif (isset($globalVATSIM) && $globalVATSIM) {
320 331
 		$_SESSION['install'] = 'vatsim';
321 332
 		$_SESSION['next'] = 'Insert VATSIM data';
322 333
 	} elseif (isset($globalIVAO) && $globalIVAO) {
323 334
 		$_SESSION['install'] = 'vatsim';
324
-		if (file_exists('tmp/ivae_feb2013.zip')) $_SESSION['next'] = 'Insert IVAO data';
325
-		else $_SESSION['next'] = 'Insert VATSIM data (IVAO not found)';
335
+		if (file_exists('tmp/ivae_feb2013.zip')) {
336
+			$_SESSION['next'] = 'Insert IVAO data';
337
+		} else {
338
+			$_SESSION['next'] = 'Insert VATSIM data (IVAO not found)';
339
+		}
326 340
 	} elseif (isset($globalphpVMS) && $globalphpVMS) {
327 341
 		$_SESSION['install'] = 'vatsim';
328 342
 		$_SESSION['next'] = 'Insert phpVMS data';
Please login to merge, or discard this patch.
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -68,15 +68,15 @@  discard block
 block discarded – undo
68 68
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'database_create') {
69 69
 	$dbroot = $_SESSION['database_root'];
70 70
 	$dbrootpass = $_SESSION['database_rootpass'];
71
-	$error .= create_db::create_database($dbroot,$dbrootpass,$globalDBuser,$globalDBpass,$globalDBname,$globalDBdriver,$globalDBhost);
71
+	$error .= create_db::create_database($dbroot, $dbrootpass, $globalDBuser, $globalDBpass, $globalDBname, $globalDBdriver, $globalDBhost);
72 72
 	sleep(5);
73 73
 	if ($error != '') {
74 74
 		$_SESSION['error'] = $error;
75 75
 	}
76
-	$_SESSION['done'] = array_merge($_SESSION['done'],array('Create database'));
76
+	$_SESSION['done'] = array_merge($_SESSION['done'], array('Create database'));
77 77
 	$_SESSION['install'] = 'database_import';
78 78
 	$_SESSION['next'] = 'Create and import tables';
79
-	$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
79
+	$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
80 80
 	print json_encode($result);
81 81
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'database_import') {
82 82
 	if (update_schema::check_version(false) == '0') {
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 		if ($error != '') {
89 89
                         $_SESSION['error'] = $error;
90 90
 		}
91
-		$_SESSION['done'] = array_merge($_SESSION['done'],array('Create and import tables'));
91
+		$_SESSION['done'] = array_merge($_SESSION['done'], array('Create and import tables'));
92 92
 		if ($globalSBS1 && !$globalIVAO && !$globalVATSIM && !$globalphpVMS) {
93 93
 			$_SESSION['install'] = 'populate';
94 94
 			$_SESSION['next'] = 'Populate aircraft_modes table with externals data for ADS-B';
@@ -96,84 +96,84 @@  discard block
 block discarded – undo
96 96
 		    $_SESSION['install'] = 'sources';
97 97
 		    $_SESSION['next'] = 'Insert data in source table';
98 98
 		}
99
-		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
99
+		$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
100 100
 		print json_encode($result);
101 101
 	} else {
102 102
 		$error .= update_schema::check_version(true);
103 103
 		if ($error != '') {
104 104
                         $_SESSION['error'] = $error;
105 105
 		}
106
-		$_SESSION['done'] = array_merge($_SESSION['done'],array('Update schema if needed'));
106
+		$_SESSION['done'] = array_merge($_SESSION['done'], array('Update schema if needed'));
107 107
 		$_SESSION['install'] = 'sources';
108 108
 		$_SESSION['next'] = 'Insert data in source table';
109
-		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
109
+		$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
110 110
 		print json_encode($result);
111 111
 	}
112 112
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'waypoints') {
113 113
 	include_once('class.update_db.php');
114 114
 	$error .= update_db::update_waypoints();
115
-	$_SESSION['done'] = array_merge($_SESSION['done'],array('Populate waypoints database'));
115
+	$_SESSION['done'] = array_merge($_SESSION['done'], array('Populate waypoints database'));
116 116
 
117 117
 	$_SESSION['install'] = 'airspace';
118 118
 	$_SESSION['next'] = 'Populate airspace table';
119
-	$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
119
+	$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
120 120
 	print json_encode($result);
121 121
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'airspace') {
122 122
 	include_once('class.update_db.php');
123 123
 	$error .= update_db::update_airspace_fam();
124
-	$_SESSION['done'] = array_merge($_SESSION['done'],array('Populate airspace database'));
124
+	$_SESSION['done'] = array_merge($_SESSION['done'], array('Populate airspace database'));
125 125
 	$_SESSION['install'] = 'countries';
126 126
 	$_SESSION['next'] = 'Populate countries table';
127
-	$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
127
+	$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
128 128
 	print json_encode($result);
129 129
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'countries') {
130 130
 	include_once('class.update_db.php');
131 131
 	$error .= update_db::update_countries();
132
-	$_SESSION['done'] = array_merge($_SESSION['done'],array('Populate countries database'));
132
+	$_SESSION['done'] = array_merge($_SESSION['done'], array('Populate countries database'));
133 133
 	if (isset($globalNOTAM) && $globalNOTAM && isset($globalNOTAMSource) && $globalNOTAMSource != '') {
134 134
 	    $_SESSION['install'] = 'notam';
135 135
 	    $_SESSION['next'] = 'Populate NOTAM table with externals data';
136
-	    $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
136
+	    $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
137 137
 	    print json_encode($result);
138 138
 	} elseif (isset($_SESSION['owner']) && $_SESSION['owner'] == 1) {
139 139
 	    $_SESSION['install'] = 'owner';
140 140
 	    $_SESSION['next'] = 'Populate owner table with externals data';
141 141
 	    unset($_SESSION['owner']);
142
-	    $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
142
+	    $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
143 143
 	    print json_encode($result);
144 144
 	} else {
145 145
 	    $_SESSION['install'] = 'sources';
146 146
 	    $_SESSION['next'] = 'Insert data in source table';
147
-	    $result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
147
+	    $result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
148 148
 	    print json_encode($result);
149 149
 	}
150 150
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'populate') {
151 151
 	if (!is_writable('tmp')) {
152 152
                 $error = 'The directory <i>install/tmp</i> must be writable.';
153
-		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
153
+		$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
154 154
 		print json_encode($result);
155 155
 	} else {
156 156
 		include_once('class.update_db.php');
157 157
 		$globalDebug = FALSE;
158 158
 		$error .= update_db::update_ModeS_fam();
159
-		$_SESSION['done'] = array_merge($_SESSION['done'],array('Populate aircraft_modes table with externals data for ADS-B'));
159
+		$_SESSION['done'] = array_merge($_SESSION['done'], array('Populate aircraft_modes table with externals data for ADS-B'));
160 160
 
161 161
 		$_SESSION['install'] = 'populate_flarm';
162 162
 		$_SESSION['next'] = 'Populate aircraft_modes table with externals data for FLARM';
163
-		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
163
+		$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
164 164
 		print json_encode($result);
165 165
 	}
166 166
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'populate_flarm') {
167 167
 	if (!is_writable('tmp')) {
168 168
                 $error = 'The directory <i>install/tmp</i> must be writable.';
169
-		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
169
+		$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
170 170
 		print json_encode($result);
171 171
 	} else {
172 172
 		include_once('class.update_db.php');
173 173
 		$globalDebug = FALSE;
174 174
 		//$error .= update_db::update_ModeS_flarm();
175 175
 		$error .= update_db::update_ModeS_ogn();
176
-		$_SESSION['done'] = array_merge($_SESSION['done'],array('Populate aircraft_modes table with externals data for FLARM'));
176
+		$_SESSION['done'] = array_merge($_SESSION['done'], array('Populate aircraft_modes table with externals data for FLARM'));
177 177
 
178 178
 		if ((isset($globalVATSIM) && $globalVATSIM) && (isset($globalIVAO) && $globalIVAO)) {
179 179
 			$_SESSION['install'] = 'vatsim';
@@ -193,34 +193,34 @@  discard block
 block discarded – undo
193 193
 			$_SESSION['install'] = 'routes';
194 194
 			$_SESSION['next'] = 'Populate routes table with externals data';
195 195
 		}
196
-		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
196
+		$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
197 197
 		print json_encode($result);
198 198
 	}
199 199
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'routes') {
200 200
 	if (!is_writable('tmp')) {
201 201
                 $error = 'The directory <i>install/tmp</i> must be writable.';
202
-		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
202
+		$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
203 203
 		print json_encode($result);
204 204
 	} else {
205 205
 		include_once('class.update_db.php');
206 206
 		$globalDebug = FALSE;
207 207
 		$error .= update_db::update_routes();
208
-		$_SESSION['done'] = array_merge($_SESSION['done'],array('Populate routes table with externals data'));
208
+		$_SESSION['done'] = array_merge($_SESSION['done'], array('Populate routes table with externals data'));
209 209
 		$_SESSION['install'] = 'translation';
210 210
 		$_SESSION['next'] = 'Populate translation table with externals data';
211
-		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
211
+		$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
212 212
 		print json_encode($result);
213 213
 	}
214 214
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'translation') {
215 215
 	if (!is_writable('tmp')) {
216 216
                 $error = 'The directory <i>install/tmp</i> must be writable.';
217
-		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
217
+		$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
218 218
 		print json_encode($result);
219 219
 	} else {
220 220
 		include_once('class.update_db.php');
221 221
 		$globalDebug = FALSE;
222 222
 		$error .= update_db::update_translation();
223
-		$_SESSION['done'] = array_merge($_SESSION['done'],array('Populate translation table with externals data'));
223
+		$_SESSION['done'] = array_merge($_SESSION['done'], array('Populate translation table with externals data'));
224 224
 
225 225
 		if ($_SESSION['waypoints'] == 1) {
226 226
 			$_SESSION['install'] = 'waypoints';
@@ -237,48 +237,48 @@  discard block
 block discarded – undo
237 237
 			$_SESSION['install'] = 'sources';
238 238
 			$_SESSION['next'] = 'Insert data in source table';
239 239
 		}
240
-		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
240
+		$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
241 241
 		print json_encode($result);
242 242
 	}
243 243
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'owner') {
244 244
 	if (!is_writable('tmp')) {
245 245
                 $error = 'The directory <i>install/tmp</i> must be writable.';
246
-		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
246
+		$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
247 247
 		print json_encode($result);
248 248
 	} else {
249 249
 		include_once('class.update_db.php');
250 250
 		$globalDebug = FALSE;
251 251
 		$error = update_db::update_owner_fam();
252
-		$_SESSION['done'] = array_merge($_SESSION['done'],array('Populate owner table with externals data'));
252
+		$_SESSION['done'] = array_merge($_SESSION['done'], array('Populate owner table with externals data'));
253 253
 		$_SESSION['install'] = 'sources';
254 254
 		$_SESSION['next'] = 'Insert data in source table';
255
-		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
255
+		$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
256 256
 		print json_encode($result);
257 257
 	}
258 258
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'notam') {
259 259
 	if (!is_writable('tmp')) {
260 260
                 $error = 'The directory <i>install/tmp</i> must be writable.';
261
-		$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
261
+		$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
262 262
 		print json_encode($result);
263 263
 	} else {
264 264
 		include_once('class.update_db.php');
265 265
 		$globalDebug = FALSE;
266 266
 		if (isset($globalNOTAMSource) && $globalNOTAMSource != '') {
267 267
 			$error .= update_db::update_notam();
268
-			$_SESSION['done'] = array_merge($_SESSION['done'],array('Populate notam table with externals data'));
268
+			$_SESSION['done'] = array_merge($_SESSION['done'], array('Populate notam table with externals data'));
269 269
 		} else {
270
-			$_SESSION['done'] = array_merge($_SESSION['done'],array('Populate notam table with externals data (no source defined)'));
270
+			$_SESSION['done'] = array_merge($_SESSION['done'], array('Populate notam table with externals data (no source defined)'));
271 271
 		}
272 272
 		if (isset($_SESSION['owner']) && $_SESSION['owner'] == 1) {
273 273
 			$_SESSION['install'] = 'owner';
274 274
 			$_SESSION['next'] = 'Populate owner table';
275 275
 			unset($_SESSION['owner']);
276
-			$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
276
+			$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
277 277
 			print json_encode($result);
278 278
 		} else {
279 279
 			$_SESSION['install'] = 'sources';
280 280
 			$_SESSION['next'] = 'Insert data in source table';
281
-			$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
281
+			$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
282 282
 			print json_encode($result);
283 283
 		}
284 284
 	}
@@ -316,9 +316,9 @@  discard block
 block discarded – undo
316 316
 	    $Source = new Source();
317 317
 	    $Source->deleteAllLocation();
318 318
 	    foreach ($sources as $src) {
319
-		if (isset($src['latitude']) && $src['latitude'] != '') $Source->addLocation($src['name'],$src['latitude'],$src['longitude'],$src['altitude'],$src['city'],$src['country'],$src['source'],'antenna.png');
319
+		if (isset($src['latitude']) && $src['latitude'] != '') $Source->addLocation($src['name'], $src['latitude'], $src['longitude'], $src['altitude'], $src['city'], $src['country'], $src['source'], 'antenna.png');
320 320
 	    }
321
-	    $_SESSION['done'] = array_merge($_SESSION['done'],array('Insert data in source table'));
321
+	    $_SESSION['done'] = array_merge($_SESSION['done'], array('Insert data in source table'));
322 322
 	    unset($_SESSION['sources']);
323 323
 	}
324 324
 	/*
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 		$_SESSION['install'] = 'finish';
344 344
 		$_SESSION['next'] = 'finish';
345 345
 	}
346
-	$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
346
+	$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
347 347
 	print json_encode($result);
348 348
 } else if (isset($_SESSION['install']) && $_SESSION['install'] == 'vatsim') {
349 349
 	include_once('../install/class.create_db.php');
@@ -353,36 +353,36 @@  discard block
 block discarded – undo
353 353
 	if ((isset($globalVATSIM) && $globalVATSIM) && (isset($globalIVAO) && $globalIVAO)) {
354 354
 		if (file_exists('tmp/ivae_feb2013.zip')) {
355 355
 			$error .= update_db::update_IVAO();
356
-			$_SESSION['done'] = array_merge($_SESSION['done'],array('Insert IVAO data'));
356
+			$_SESSION['done'] = array_merge($_SESSION['done'], array('Insert IVAO data'));
357 357
 		} else {
358 358
 			$error .= update_db::update_vatsim();
359
-			$_SESSION['done'] = array_merge($_SESSION['done'],array('Insert VATSIM data'));
359
+			$_SESSION['done'] = array_merge($_SESSION['done'], array('Insert VATSIM data'));
360 360
 		}
361 361
 	} elseif (isset($globalVATSIM) && $globalVATSIM) {
362 362
 		$error .= update_db::update_vatsim();
363
-		$_SESSION['done'] = array_merge($_SESSION['done'],array('Insert VATSIM data'));
363
+		$_SESSION['done'] = array_merge($_SESSION['done'], array('Insert VATSIM data'));
364 364
 	} elseif (isset($globalIVAO) && $globalIVAO) {
365 365
 		if (file_exists('tmp/ivae_feb2013.zip')) {
366 366
 			$error .= update_db::update_IVAO();
367
-			$_SESSION['done'] = array_merge($_SESSION['done'],array('Insert IVAO data'));
367
+			$_SESSION['done'] = array_merge($_SESSION['done'], array('Insert IVAO data'));
368 368
 		} else {
369 369
 			$error .= update_db::update_vatsim();
370
-			$_SESSION['done'] = array_merge($_SESSION['done'],array('Insert VATSIM data (IVAO not found)'));
370
+			$_SESSION['done'] = array_merge($_SESSION['done'], array('Insert VATSIM data (IVAO not found)'));
371 371
 		}
372 372
 	} elseif (isset($globalphpVMS) && $globalphpVMS) {
373
-		$_SESSION['done'] = array_merge($_SESSION['done'],array('Insert phpVMS data'));
373
+		$_SESSION['done'] = array_merge($_SESSION['done'], array('Insert phpVMS data'));
374 374
 	}
375 375
 	//$_SESSION['install'] = 'routes';
376 376
 	//$_SESSION['next'] = 'Populate routes table with externals data';
377 377
 	$_SESSION['install'] = 'finish';
378 378
 	$_SESSION['next'] = 'finish';
379 379
 
380
-	$result = array('error' => $error,'done' => $_SESSION['done'],'next' => $_SESSION['next'],'install' => $_SESSION['install']);
380
+	$result = array('error' => $error, 'done' => $_SESSION['done'], 'next' => $_SESSION['next'], 'install' => $_SESSION['install']);
381 381
 	print json_encode($result);
382 382
 } else {
383 383
 	//unset($_SESSION['install']);
384 384
 	$_SESSION['error'] = 'Unknwon task : '.$_SESSION['install'];
385
-	$result = array('error' => 'Unknwon task : '.$_SESSION['install'],'done' => $_SESSION['done'],'next' => 'finish','install' => 'finish');
385
+	$result = array('error' => 'Unknwon task : '.$_SESSION['install'], 'done' => $_SESSION['done'], 'next' => 'finish', 'install' => 'finish');
386 386
 	print json_encode($result);
387 387
 }
388 388
 ?>
389 389
\ No newline at end of file
Please login to merge, or discard this patch.