Completed
Push — master ( 19913c...fa71c2 )
by Yannick
10:30
created
install/index.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -317,18 +317,18 @@  discard block
 block discarded – undo
317 317
 				</tr>
318 318
 				<!--
319 319
 		<?php
320
-		    require_once(dirname(__FILE__).'/../require/class.Connection.php');
321
-		    $Connection = new Connection();
320
+			require_once(dirname(__FILE__).'/../require/class.Connection.php');
321
+			$Connection = new Connection();
322 322
 		?>
323 323
 				-->
324 324
 		<?php
325
-		    if ($Connection->db != NULL) {
325
+			if ($Connection->db != NULL) {
326 326
 			if ($Connection->tableExists('source_location')) {
327
-			    require_once(dirname(__FILE__).'/../require/class.Source.php');
328
-			    $Source = new Source();
329
-			    //$alllocations = $Source->getAllLocationInfo();
330
-			    $alllocations = $Source->getLocationInfobyType('');
331
-			    foreach ($alllocations as $location) {
327
+				require_once(dirname(__FILE__).'/../require/class.Source.php');
328
+				$Source = new Source();
329
+				//$alllocations = $Source->getAllLocationInfo();
330
+				$alllocations = $Source->getLocationInfobyType('');
331
+				foreach ($alllocations as $location) {
332 332
 		?>
333 333
 				<tr>
334 334
 	    				<input type="hidden" name="source_id[]" value="<?php print $location['id']; ?>" />
@@ -342,9 +342,9 @@  discard block
 block discarded – undo
342 342
 				</tr>
343 343
 		
344 344
 		<?php
345
-			    }
345
+				}
346
+			}
346 347
 			}
347
-		    }
348 348
 		?>
349 349
 
350 350
 				<tr>
@@ -452,12 +452,12 @@  discard block
 block discarded – undo
452 452
 ?>
453 453
 							<tr>
454 454
 								<?php
455
-								    if (filter_var($source['host'],FILTER_VALIDATE_URL)) {
455
+									if (filter_var($source['host'],FILTER_VALIDATE_URL)) {
456 456
 								?>
457 457
 								<td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td>
458 458
 								<td><input type="number" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td>
459 459
 								<?php
460
-								    } else {
460
+									} else {
461 461
 									$hostport = explode(':',$source['host']);
462 462
 									if (isset($hostport[1])) {
463 463
 										$host = $hostport[0];
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 								<td><input type="text" name="host[]" id="host" value="<?php print $host; ?>" /></td>
471 471
 								<td><input type="number" name="port[]" id="port" class="col-xs-2" value="<?php print $port; ?>" /></td>
472 472
 								<?php
473
-								    }
473
+									}
474 474
 								?>
475 475
 								<td>
476 476
 									<select name="format[]" id="format">
@@ -879,7 +879,7 @@  discard block
 block discarded – undo
879 879
 			<br />
880 880
 			<p>
881 881
 			<?php 
882
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
882
+				if (extension_loaded('gd') && function_exists('gd_info')) {
883 883
 			?>
884 884
 				<label for="aircrafticoncolor">Color of aircraft icon on map</label>
885 885
 				<input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" />
@@ -889,12 +889,12 @@  discard block
 block discarded – undo
889 889
 				<b>The directory cache is not writable, aircraft icon will not be cached</b>
890 890
 			<?php
891 891
 				}
892
-			    } else {
892
+				} else {
893 893
 			?>
894 894
 				<b>PHP GD is not installed, you can't change color of aircraft icon on map</b>
895 895
 			<?php
896
-			    // '
897
-			    }
896
+				// '
897
+				}
898 898
 			?>
899 899
 			</p>
900 900
 			<br />
@@ -918,7 +918,7 @@  discard block
 block discarded – undo
918 918
 	</p>
919 919
 <?php
920 920
 	require('../footer.php');
921
-        exit;
921
+		exit;
922 922
 }
923 923
 	
924 924
 $settings = array();
@@ -1009,8 +1009,8 @@  discard block
 block discarded – undo
1009 1009
 	
1010 1010
 	$sources = array();
1011 1011
 	foreach ($source_name as $keys => $name) {
1012
-	    if (isset($source_id[$keys])) $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'id' => $source_id[$keys],'source' => $source_ref[$keys]);
1013
-	    else $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'source' => $source_ref[$keys]);
1012
+		if (isset($source_id[$keys])) $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'id' => $source_id[$keys],'source' => $source_ref[$keys]);
1013
+		else $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'source' => $source_ref[$keys]);
1014 1014
 	}
1015 1015
 	if (count($sources) > 0) $_SESSION['sources'] = $sources;
1016 1016
 
@@ -1392,14 +1392,14 @@  discard block
 block discarded – undo
1392 1392
 
1393 1393
 	// Set some defaults values...
1394 1394
 	if (!isset($globalAircraftImageSources)) {
1395
-	    $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters');
1396
-	    $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources));
1395
+		$globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters');
1396
+		$settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources));
1397 1397
 	}
1398 1398
 
1399 1399
 	if (!isset($globalSchedulesSources)) {
1400
-	    $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
1401
-    	    $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources));
1402
-    	}
1400
+		$globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
1401
+			$settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources));
1402
+		}
1403 1403
 
1404 1404
 	$settings = array_merge($settings,array('globalInstalled' => 'TRUE'));
1405 1405
 
@@ -1451,21 +1451,21 @@  discard block
 block discarded – undo
1451 1451
 	$popi = false;
1452 1452
 	$popw = false;
1453 1453
 	foreach ($_SESSION['done'] as $done) {
1454
-	    print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1455
-	    if ($done == 'Create database') $pop = true;
1456
-	    if ($_SESSION['install'] == 'database_create') $pop = true;
1457
-	    if ($_SESSION['install'] == 'database_import') $popi = true;
1458
-	    if ($_SESSION['install'] == 'waypoints') $popw = true;
1454
+		print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1455
+		if ($done == 'Create database') $pop = true;
1456
+		if ($_SESSION['install'] == 'database_create') $pop = true;
1457
+		if ($_SESSION['install'] == 'database_import') $popi = true;
1458
+		if ($_SESSION['install'] == 'waypoints') $popw = true;
1459 1459
 	}
1460 1460
 	if ($pop) {
1461
-	    sleep(5);
1462
-	    print '<li>Create database....<img src="../images/loading.gif" /></li>';
1461
+		sleep(5);
1462
+		print '<li>Create database....<img src="../images/loading.gif" /></li>';
1463 1463
 	} else if ($popi) {
1464
-	    sleep(5);
1465
-	    print '<li>Create and import tables....<img src="../images/loading.gif" /></li>';
1464
+		sleep(5);
1465
+		print '<li>Create and import tables....<img src="../images/loading.gif" /></li>';
1466 1466
 	} else if ($popw) {
1467
-	    sleep(5);
1468
-	    print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>';
1467
+		sleep(5);
1468
+		print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>';
1469 1469
 	} else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>';
1470 1470
 	print '</div></ul>';
1471 1471
 	print '<div id="error"></div>';
@@ -1528,7 +1528,7 @@  discard block
 block discarded – undo
1528 1528
 	unset($_COOKIE['install']);
1529 1529
 	print '<div class="info column"><ul>';
1530 1530
 	foreach ($_SESSION['done'] as $done) {
1531
-	    print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1531
+		print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1532 1532
 	}
1533 1533
 	print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>';
1534 1534
 	print '</ul></div>';
Please login to merge, or discard this patch.