Completed
Push — master ( 57ec45...7a0770 )
by Yannick
33:58
created
pilot-statistics-departure-airport.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,12 @@
 block discarded – undo
12 12
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13 13
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
15
+if ($year != '') {
16
+	$filter = array_merge($filter,array('year' => $year));
17
+}
18
+if ($month != '') {
19
+	$filter = array_merge($filter,array('month' => $month));
20
+}
17 21
 $spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
18 22
 
19 23
 if (!empty($spotter_array))
Please login to merge, or discard this patch.
pilot-statistics-registration.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,12 @@
 block discarded – undo
12 12
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13 13
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
15
+if ($year != '') {
16
+	$filter = array_merge($filter,array('year' => $year));
17
+}
18
+if ($month != '') {
19
+	$filter = array_merge($filter,array('month' => $month));
20
+}
17 21
 $spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
18 22
 
19 23
 if (!empty($spotter_array))
Please login to merge, or discard this patch.
owner-statistics-manufacturer.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,12 @@
 block discarded – undo
12 12
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13 13
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
15
+if ($year != '') {
16
+	$filter = array_merge($filter,array('year' => $year));
17
+}
18
+if ($month != '') {
19
+	$filter = array_merge($filter,array('month' => $month));
20
+}
17 21
 $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter);
18 22
 
19 23
 if (!empty($spotter_array))
Please login to merge, or discard this patch.
pilot-statistics-manufacturer.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,12 @@
 block discarded – undo
12 12
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13 13
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
15
+if ($year != '') {
16
+	$filter = array_merge($filter,array('year' => $year));
17
+}
18
+if ($month != '') {
19
+	$filter = array_merge($filter,array('month' => $month));
20
+}
17 21
 $spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
18 22
 
19 23
 if (!empty($spotter_array))
Please login to merge, or discard this patch.
pilot-statistics-departure-airport-country.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,12 @@
 block discarded – undo
12 12
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13 13
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
15
+if ($year != '') {
16
+	$filter = array_merge($filter,array('year' => $year));
17
+}
18
+if ($month != '') {
19
+	$filter = array_merge($filter,array('month' => $month));
20
+}
17 21
 $spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
18 22
 
19 23
 if (!empty($spotter_array))
Please login to merge, or discard this patch.
pilot-statistics-arrival-airport-country.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,12 @@
 block discarded – undo
12 12
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13 13
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
15
+if ($year != '') {
16
+	$filter = array_merge($filter,array('year' => $year));
17
+}
18
+if ($month != '') {
19
+	$filter = array_merge($filter,array('month' => $month));
20
+}
17 21
 $spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
18 22
 
19 23
 if (!empty($spotter_array))
Please login to merge, or discard this patch.
owner-statistics-airline.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,12 @@
 block discarded – undo
12 12
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13 13
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
15
+if ($year != '') {
16
+	$filter = array_merge($filter,array('year' => $year));
17
+}
18
+if ($month != '') {
19
+	$filter = array_merge($filter,array('month' => $month));
20
+}
17 21
 $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter);
18 22
 
19 23
 if (!empty($spotter_array))
Please login to merge, or discard this patch.
owner-detailed.php 1 patch
Braces   +23 added lines, -8 removed lines patch added patch discarded remove patch
@@ -40,8 +40,12 @@  discard block
 block discarded – undo
40 40
 	$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
41 41
 	$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
42 42
 	$filter = array();
43
-	if ($year != '') $filter = array_merge($filter,array('year' => $year));
44
-	if ($month != '') $filter = array_merge($filter,array('month' => $month));
43
+	if ($year != '') {
44
+		$filter = array_merge($filter,array('year' => $year));
45
+	}
46
+	if ($month != '') {
47
+		$filter = array_merge($filter,array('month' => $month));
48
+	}
45 49
 	if ($sort != '') 
46 50
 	{
47 51
 		$spotter_array = $Spotter->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference, $sort,$filter);
@@ -59,8 +63,12 @@  discard block
 block discarded – undo
59 63
 	{
60 64
 		$title = sprintf(_("Detailed View for %s"),$spotter_array[0]['aircraft_owner']);
61 65
 		//$ident = $spotter_array[0]['ident'];
62
-		if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude'];
63
-		if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude'];
66
+		if (isset($spotter_array[0]['latitude'])) {
67
+			$latitude = $spotter_array[0]['latitude'];
68
+		}
69
+		if (isset($spotter_array[0]['longitude'])) {
70
+			$longitude = $spotter_array[0]['longitude'];
71
+		}
64 72
 		require_once('header.php');
65 73
 		/*
66 74
 		if (isset($globalArchive) && $globalArchive) {
@@ -115,9 +123,14 @@  discard block
 block discarded – undo
115 123
 		print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>';
116 124
 		//print '<div><span class="label">'._("Owner").'</span>'.$spotter_array[0]['aircraft_owner'].'</div>';
117 125
 		$Stats = new Stats();
118
-		if ($year == '' && $month == '') $flights = $Stats->getStatsOwner($owner);
119
-		else $flights = 0;
120
-		if ($flights == 0) $flights = $Spotter->countFlightsByOwner($owner,$filter);
126
+		if ($year == '' && $month == '') {
127
+			$flights = $Stats->getStatsOwner($owner);
128
+		} else {
129
+			$flights = 0;
130
+		}
131
+		if ($flights == 0) {
132
+			$flights = $Spotter->countFlightsByOwner($owner,$filter);
133
+		}
121 134
 		print '<div><span class="label">'._("Flights").'</span>'.$flights.'</div>';
122 135
 		$aircraft_type = count($Spotter->countAllAircraftTypesByOwner($owner,$filter));
123 136
 		print '<div><span class="label">'._("Aircrafts type").'</span>'.$aircraft_type.'</div>';
@@ -128,7 +141,9 @@  discard block
 block discarded – undo
128 141
 		$airlines = count($Spotter->countAllAirlinesByOwner($owner,$filter));
129 142
 		print '<div><span class="label">'._("Airlines").'</span>'.$airlines.'</div>';
130 143
 		$duration = $Spotter->getFlightDurationByOwner($owner,$filter);
131
-		if ($duration != '0') print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>';
144
+		if ($duration != '0') {
145
+			print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>';
146
+		}
132 147
 		print '</div>';
133 148
 	
134 149
 		include('owner-sub-menu.php');
Please login to merge, or discard this patch.
route-statistics-manufacturer.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,9 @@
 block discarded – undo
14 14
 $arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING);
15 15
 if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) {
16 16
 	$spotter_array = $Spotter->getSpotterDataByRoute($departure_airport, $arrival_airport, "0,1", $sort);
17
-} else $spotter_array = array();  
17
+} else {
18
+	$spotter_array = array();
19
+}
18 20
 
19 21
 if (!empty($spotter_array))
20 22
 {
Please login to merge, or discard this patch.