Completed
Push — master ( db2756...3d0574 )
by Yannick
29:36
created
install/index.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -364,17 +364,17 @@  discard block
 block discarded – undo
364 364
 				</tr>
365 365
 				
366 366
 		<?php
367
-		    if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') {
367
+			if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') {
368 368
 		?>
369 369
 		<!--
370 370
 		<?php
371
-			    require_once(dirname(__FILE__).'/../require/class.Connection.php');
372
-			    $Connection = new Connection();
371
+				require_once(dirname(__FILE__).'/../require/class.Connection.php');
372
+				$Connection = new Connection();
373 373
 		?>
374 374
 		-->
375 375
 		<?php
376 376
 			if ($Connection->db != NULL) {
377
-			    if ($Connection->tableExists('source_location')) {
377
+				if ($Connection->tableExists('source_location')) {
378 378
 				require_once(dirname(__FILE__).'/../require/class.Source.php');
379 379
 				$Source = new Source();
380 380
 				//$alllocations = $Source->getAllLocationInfo();
@@ -394,9 +394,9 @@  discard block
 block discarded – undo
394 394
 		
395 395
 		<?php
396 396
 				}
397
-			    }
397
+				}
398
+			}
398 399
 			}
399
-		    }
400 400
 		?>
401 401
 
402 402
 				<tr>
@@ -506,12 +506,12 @@  discard block
 block discarded – undo
506 506
 ?>
507 507
 							<tr>
508 508
 								<?php
509
-								    if (filter_var($source['host'],FILTER_VALIDATE_URL)) {
509
+									if (filter_var($source['host'],FILTER_VALIDATE_URL)) {
510 510
 								?>
511 511
 								<td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td>
512 512
 								<td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td>
513 513
 								<?php
514
-								    } else {
514
+									} else {
515 515
 									$hostport = explode(':',$source['host']);
516 516
 									if (isset($hostport[1])) {
517 517
 										$host = $hostport[0];
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 								<td><input type="text" name="host[]" id="host" value="<?php print $host; ?>" /></td>
525 525
 								<td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php print $port; ?>" /></td>
526 526
 								<?php
527
-								    }
527
+									}
528 528
 								?>
529 529
 								<td>
530 530
 									<select name="format[]" id="format">
@@ -661,9 +661,9 @@  discard block
 block discarded – undo
661 661
 			    </thead>
662 662
 			    <tbody>
663 663
 				<?php
664
-				    if (isset($globalNewsFeeds) && !empty($globalNewsFeeds)) {
664
+					if (isset($globalNewsFeeds) && !empty($globalNewsFeeds)) {
665 665
 					foreach ($globalNewsFeeds as $type => $feedslng) {
666
-					    foreach ($feedslng as $lng => $feeds) {
666
+						foreach ($feedslng as $lng => $feeds) {
667 667
 						foreach ($feeds as $feed) {
668 668
 				?>
669 669
 				<tr>
@@ -688,9 +688,9 @@  discard block
 block discarded – undo
688 688
 				
689 689
 				<?php
690 690
 						}
691
-					    }
691
+						}
692
+					}
692 693
 					}
693
-				    }
694 694
 				?>
695 695
 				<tr>
696 696
 				    <td><input type="url" name="newsurl[]" /></td>
@@ -1076,7 +1076,7 @@  discard block
 block discarded – undo
1076 1076
 			<br />
1077 1077
 			<p>
1078 1078
 			<?php 
1079
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
1079
+				if (extension_loaded('gd') && function_exists('gd_info')) {
1080 1080
 			?>
1081 1081
 				<label for="aircrafticoncolor">Color of aircraft icon on map</label>
1082 1082
 				<input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" />
@@ -1086,11 +1086,11 @@  discard block
 block discarded – undo
1086 1086
 				<b>The directory cache is not writable, aircraft icon will not be cached</b>
1087 1087
 			<?php
1088 1088
 				}
1089
-			    } else {
1089
+				} else {
1090 1090
 			?>
1091 1091
 				<b>PHP GD is not installed, you can't change color of aircraft icon on map</b>
1092 1092
 			<?php
1093
-			    }
1093
+				}
1094 1094
 			?>
1095 1095
 			</p>
1096 1096
 			<br />
@@ -1114,7 +1114,7 @@  discard block
 block discarded – undo
1114 1114
 	</p>
1115 1115
 <?php
1116 1116
 	require('../footer.php');
1117
-        exit;
1117
+		exit;
1118 1118
 }
1119 1119
 // '	
1120 1120
 $settings = array();
@@ -1205,8 +1205,8 @@  discard block
 block discarded – undo
1205 1205
 	
1206 1206
 	$sources = array();
1207 1207
 	foreach ($source_name as $keys => $name) {
1208
-	    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]);
1209
-	    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]);
1208
+		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]);
1209
+		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]);
1210 1210
 	}
1211 1211
 	if (count($sources) > 0) $_SESSION['sources'] = $sources;
1212 1212
 
@@ -1216,13 +1216,13 @@  discard block
 block discarded – undo
1216 1216
 	
1217 1217
 	$newsfeeds = array();
1218 1218
 	foreach($newsurl as $newskey => $url) {
1219
-	    if ($url != '') {
1219
+		if ($url != '') {
1220 1220
 		$type = $newstype[$newskey];
1221 1221
 		$lng = $newslng[$newskey];
1222 1222
 		if (isset($newsfeeds[$type][$lng])) {
1223
-		    $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url));
1223
+			$newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url));
1224 1224
 		} else $newsfeeds[$type][$lng] = array($url);
1225
-	    }
1225
+		}
1226 1226
 	}
1227 1227
 	$settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds));
1228 1228
 
@@ -1663,14 +1663,14 @@  discard block
 block discarded – undo
1663 1663
 
1664 1664
 	// Set some defaults values...
1665 1665
 	if (!isset($globalAircraftImageSources)) {
1666
-	    $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters');
1667
-	    $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources));
1666
+		$globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters');
1667
+		$settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources));
1668 1668
 	}
1669 1669
 
1670 1670
 	if (!isset($globalSchedulesSources)) {
1671
-	    $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
1672
-    	    $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources));
1673
-    	}
1671
+		$globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
1672
+			$settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources));
1673
+		}
1674 1674
 
1675 1675
 	$settings = array_merge($settings,array('globalInstalled' => 'TRUE'));
1676 1676
 
@@ -1718,21 +1718,21 @@  discard block
 block discarded – undo
1718 1718
 	$popi = false;
1719 1719
 	$popw = false;
1720 1720
 	foreach ($_SESSION['done'] as $done) {
1721
-	    print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1722
-	    if ($done == 'Create database') $pop = true;
1723
-	    if ($_SESSION['install'] == 'database_create') $pop = true;
1724
-	    if ($_SESSION['install'] == 'database_import') $popi = true;
1725
-	    if ($_SESSION['install'] == 'waypoints') $popw = true;
1721
+		print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1722
+		if ($done == 'Create database') $pop = true;
1723
+		if ($_SESSION['install'] == 'database_create') $pop = true;
1724
+		if ($_SESSION['install'] == 'database_import') $popi = true;
1725
+		if ($_SESSION['install'] == 'waypoints') $popw = true;
1726 1726
 	}
1727 1727
 	if ($pop) {
1728
-	    sleep(5);
1729
-	    print '<li>Create database....<img src="../images/loading.gif" /></li>';
1728
+		sleep(5);
1729
+		print '<li>Create database....<img src="../images/loading.gif" /></li>';
1730 1730
 	} else if ($popi) {
1731
-	    sleep(5);
1732
-	    print '<li>Create and import tables....<img src="../images/loading.gif" /></li>';
1731
+		sleep(5);
1732
+		print '<li>Create and import tables....<img src="../images/loading.gif" /></li>';
1733 1733
 	} else if ($popw) {
1734
-	    sleep(5);
1735
-	    print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>';
1734
+		sleep(5);
1735
+		print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>';
1736 1736
 	} else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>';
1737 1737
 	print '</div></ul>';
1738 1738
 	print '<div id="error"></div>';
@@ -1798,7 +1798,7 @@  discard block
 block discarded – undo
1798 1798
 	unset($_COOKIE['install']);
1799 1799
 	print '<div class="info column"><ul>';
1800 1800
 	foreach ($_SESSION['done'] as $done) {
1801
-	    print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1801
+		print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1802 1802
 	}
1803 1803
 	print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>';
1804 1804
 	print '</ul></div>';
Please login to merge, or discard this patch.