@@ -10,6 +10,9 @@ discard block |
||
10 | 10 | class update_db { |
11 | 11 | public static $db_sqlite; |
12 | 12 | |
13 | + /** |
|
14 | + * @param string $file |
|
15 | + */ |
|
13 | 16 | public static function download($url, $file, $referer = '') { |
14 | 17 | global $globalProxy, $globalForceIPv4; |
15 | 18 | $fp = fopen($file, 'w'); |
@@ -34,6 +37,9 @@ discard block |
||
34 | 37 | fclose($fp); |
35 | 38 | } |
36 | 39 | |
40 | + /** |
|
41 | + * @param string $in_file |
|
42 | + */ |
|
37 | 43 | public static function gunzip($in_file,$out_file_name = '') { |
38 | 44 | //echo $in_file.' -> '.$out_file_name."\n"; |
39 | 45 | $buffer_size = 4096; // read 4kb at a time |
@@ -55,6 +61,9 @@ discard block |
||
55 | 61 | } |
56 | 62 | } |
57 | 63 | |
64 | + /** |
|
65 | + * @param string $in_file |
|
66 | + */ |
|
58 | 67 | public static function unzip($in_file) { |
59 | 68 | if ($in_file != '' && file_exists($in_file)) { |
60 | 69 | $path = pathinfo(realpath($in_file), PATHINFO_DIRNAME); |
@@ -76,6 +85,9 @@ discard block |
||
76 | 85 | } |
77 | 86 | } |
78 | 87 | |
88 | + /** |
|
89 | + * @param string $database_file |
|
90 | + */ |
|
79 | 91 | public static function retrieve_route_sqlite_to_dest($database_file) { |
80 | 92 | global $globalDebug, $globalTransaction; |
81 | 93 | //$query = 'TRUNCATE TABLE routes'; |
@@ -118,6 +130,10 @@ discard block |
||
118 | 130 | } |
119 | 131 | return ''; |
120 | 132 | } |
133 | + |
|
134 | + /** |
|
135 | + * @param string $database_file |
|
136 | + */ |
|
121 | 137 | public static function retrieve_route_oneworld($database_file) { |
122 | 138 | global $globalDebug, $globalTransaction; |
123 | 139 | //$query = 'TRUNCATE TABLE routes'; |
@@ -159,6 +175,9 @@ discard block |
||
159 | 175 | return ''; |
160 | 176 | } |
161 | 177 | |
178 | + /** |
|
179 | + * @param string $database_file |
|
180 | + */ |
|
162 | 181 | public static function retrieve_route_skyteam($database_file) { |
163 | 182 | global $globalDebug, $globalTransaction; |
164 | 183 | //$query = 'TRUNCATE TABLE routes'; |
@@ -201,6 +220,10 @@ discard block |
||
201 | 220 | } |
202 | 221 | return ''; |
203 | 222 | } |
223 | + |
|
224 | + /** |
|
225 | + * @param string $database_file |
|
226 | + */ |
|
204 | 227 | public static function retrieve_modes_sqlite_to_dest($database_file) { |
205 | 228 | global $globalTransaction; |
206 | 229 | //$query = 'TRUNCATE TABLE aircraft_modes'; |
@@ -267,6 +290,9 @@ discard block |
||
267 | 290 | return ''; |
268 | 291 | } |
269 | 292 | |
293 | + /** |
|
294 | + * @param string $database_file |
|
295 | + */ |
|
270 | 296 | public static function retrieve_modes_flarmnet($database_file) { |
271 | 297 | global $globalTransaction; |
272 | 298 | $Common = new Common(); |
@@ -337,6 +363,9 @@ discard block |
||
337 | 363 | return ''; |
338 | 364 | } |
339 | 365 | |
366 | + /** |
|
367 | + * @param string $database_file |
|
368 | + */ |
|
340 | 369 | public static function retrieve_modes_ogn($database_file) { |
341 | 370 | global $globalTransaction; |
342 | 371 | //$query = 'TRUNCATE TABLE aircraft_modes'; |
@@ -406,6 +435,9 @@ discard block |
||
406 | 435 | return ''; |
407 | 436 | } |
408 | 437 | |
438 | + /** |
|
439 | + * @param string $database_file |
|
440 | + */ |
|
409 | 441 | public static function retrieve_owner($database_file,$country = 'F') { |
410 | 442 | global $globalTransaction, $globalMasterSource; |
411 | 443 | //$query = 'TRUNCATE TABLE aircraft_modes'; |
@@ -1438,6 +1470,10 @@ discard block |
||
1438 | 1470 | return ''; |
1439 | 1471 | } |
1440 | 1472 | |
1473 | + /** |
|
1474 | + * @param string $filename |
|
1475 | + * @param string $tletype |
|
1476 | + */ |
|
1441 | 1477 | public static function tle($filename,$tletype) { |
1442 | 1478 | require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
1443 | 1479 | global $tmp_dir, $globalTransaction; |
@@ -1487,6 +1523,9 @@ discard block |
||
1487 | 1523 | return ''; |
1488 | 1524 | } |
1489 | 1525 | |
1526 | + /** |
|
1527 | + * @param string $filename |
|
1528 | + */ |
|
1490 | 1529 | public static function satellite_ucsdb($filename) { |
1491 | 1530 | global $tmp_dir, $globalTransaction; |
1492 | 1531 | |
@@ -1535,6 +1574,9 @@ discard block |
||
1535 | 1574 | return ''; |
1536 | 1575 | } |
1537 | 1576 | |
1577 | + /** |
|
1578 | + * @param string $filename |
|
1579 | + */ |
|
1538 | 1580 | public static function satellite_celestrak($filename) { |
1539 | 1581 | global $tmp_dir, $globalTransaction, $globalDebug; |
1540 | 1582 | $satcat_sources = array( |
@@ -1861,6 +1903,9 @@ discard block |
||
1861 | 1903 | |
1862 | 1904 | } |
1863 | 1905 | */ |
1906 | + /** |
|
1907 | + * @param string $filename |
|
1908 | + */ |
|
1864 | 1909 | public static function waypoints($filename) { |
1865 | 1910 | //require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
1866 | 1911 | global $tmp_dir, $globalTransaction; |
@@ -1938,6 +1983,9 @@ discard block |
||
1938 | 1983 | } |
1939 | 1984 | } |
1940 | 1985 | |
1986 | + /** |
|
1987 | + * @param string $filename |
|
1988 | + */ |
|
1941 | 1989 | public static function ivao_airlines($filename) { |
1942 | 1990 | //require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
1943 | 1991 | global $tmp_dir, $globalTransaction; |