@@ -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'; |
@@ -1341,6 +1373,10 @@ discard block |
||
1341 | 1373 | return ''; |
1342 | 1374 | } |
1343 | 1375 | |
1376 | + /** |
|
1377 | + * @param string $filename |
|
1378 | + * @param string $tletype |
|
1379 | + */ |
|
1344 | 1380 | public static function tle($filename,$tletype) { |
1345 | 1381 | require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
1346 | 1382 | global $tmp_dir, $globalTransaction; |
@@ -1390,6 +1426,9 @@ discard block |
||
1390 | 1426 | return ''; |
1391 | 1427 | } |
1392 | 1428 | |
1429 | + /** |
|
1430 | + * @param string $filename |
|
1431 | + */ |
|
1393 | 1432 | public static function satellite_ucsdb($filename) { |
1394 | 1433 | global $tmp_dir, $globalTransaction; |
1395 | 1434 | $query = "DELETE FROM satellite"; |
@@ -1436,6 +1475,9 @@ discard block |
||
1436 | 1475 | return ''; |
1437 | 1476 | } |
1438 | 1477 | |
1478 | + /** |
|
1479 | + * @param string $filename |
|
1480 | + */ |
|
1439 | 1481 | public static function satellite_celestrak($filename) { |
1440 | 1482 | global $tmp_dir, $globalTransaction; |
1441 | 1483 | $satcat_sources = array( |
@@ -1753,6 +1795,9 @@ discard block |
||
1753 | 1795 | |
1754 | 1796 | } |
1755 | 1797 | */ |
1798 | + /** |
|
1799 | + * @param string $filename |
|
1800 | + */ |
|
1756 | 1801 | public static function waypoints($filename) { |
1757 | 1802 | //require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
1758 | 1803 | global $tmp_dir, $globalTransaction; |
@@ -1800,6 +1845,9 @@ discard block |
||
1800 | 1845 | return ''; |
1801 | 1846 | } |
1802 | 1847 | |
1848 | + /** |
|
1849 | + * @param string $filename |
|
1850 | + */ |
|
1803 | 1851 | public static function ivao_airlines($filename) { |
1804 | 1852 | //require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
1805 | 1853 | global $tmp_dir, $globalTransaction; |