@@ -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 | //$file = str_replace('/',DIRECTORY_SEPARATOR,$file); |
15 | 18 | $fp = fopen($file, 'w+'); |
@@ -25,6 +28,9 @@ discard block |
||
25 | 28 | fclose($fp); |
26 | 29 | } |
27 | 30 | |
31 | + /** |
|
32 | + * @param string $in_file |
|
33 | + */ |
|
28 | 34 | public static function gunzip($in_file,$out_file_name = '') { |
29 | 35 | //echo $in_file.' -> '.$out_file_name."\n"; |
30 | 36 | $buffer_size = 4096; // read 4kb at a time |
@@ -46,6 +52,9 @@ discard block |
||
46 | 52 | } |
47 | 53 | } |
48 | 54 | |
55 | + /** |
|
56 | + * @param string $in_file |
|
57 | + */ |
|
49 | 58 | public static function unzip($in_file) { |
50 | 59 | if ($in_file != '' && file_exists($in_file)) { |
51 | 60 | $path = pathinfo(realpath($in_file), PATHINFO_DIRNAME); |
@@ -67,6 +76,9 @@ discard block |
||
67 | 76 | } |
68 | 77 | } |
69 | 78 | |
79 | + /** |
|
80 | + * @param string $database_file |
|
81 | + */ |
|
70 | 82 | public static function retrieve_route_sqlite_to_dest($database_file) { |
71 | 83 | global $globalDebug, $globalTransaction; |
72 | 84 | //$query = 'TRUNCATE TABLE routes'; |
@@ -109,6 +121,10 @@ discard block |
||
109 | 121 | } |
110 | 122 | return ''; |
111 | 123 | } |
124 | + |
|
125 | + /** |
|
126 | + * @param string $database_file |
|
127 | + */ |
|
112 | 128 | public static function retrieve_route_oneworld($database_file) { |
113 | 129 | global $globalDebug, $globalTransaction; |
114 | 130 | //$query = 'TRUNCATE TABLE routes'; |
@@ -150,6 +166,9 @@ discard block |
||
150 | 166 | return ''; |
151 | 167 | } |
152 | 168 | |
169 | + /** |
|
170 | + * @param string $database_file |
|
171 | + */ |
|
153 | 172 | public static function retrieve_route_skyteam($database_file) { |
154 | 173 | global $globalDebug, $globalTransaction; |
155 | 174 | //$query = 'TRUNCATE TABLE routes'; |
@@ -192,6 +211,10 @@ discard block |
||
192 | 211 | } |
193 | 212 | return ''; |
194 | 213 | } |
214 | + |
|
215 | + /** |
|
216 | + * @param string $database_file |
|
217 | + */ |
|
195 | 218 | public static function retrieve_modes_sqlite_to_dest($database_file) { |
196 | 219 | global $globalTransaction; |
197 | 220 | //$query = 'TRUNCATE TABLE aircraft_modes'; |
@@ -258,6 +281,9 @@ discard block |
||
258 | 281 | return ''; |
259 | 282 | } |
260 | 283 | |
284 | + /** |
|
285 | + * @param string $database_file |
|
286 | + */ |
|
261 | 287 | public static function retrieve_modes_flarmnet($database_file) { |
262 | 288 | global $globalTransaction; |
263 | 289 | $Common = new Common(); |
@@ -328,6 +354,9 @@ discard block |
||
328 | 354 | return ''; |
329 | 355 | } |
330 | 356 | |
357 | + /** |
|
358 | + * @param string $database_file |
|
359 | + */ |
|
331 | 360 | public static function retrieve_modes_ogn($database_file) { |
332 | 361 | global $globalTransaction; |
333 | 362 | //$query = 'TRUNCATE TABLE aircraft_modes'; |
@@ -397,6 +426,9 @@ discard block |
||
397 | 426 | return ''; |
398 | 427 | } |
399 | 428 | |
429 | + /** |
|
430 | + * @param string $database_file |
|
431 | + */ |
|
400 | 432 | public static function retrieve_owner($database_file,$country = 'F') { |
401 | 433 | global $globalTransaction, $globalMasterSource; |
402 | 434 | //$query = 'TRUNCATE TABLE aircraft_modes'; |
@@ -1332,6 +1364,10 @@ discard block |
||
1332 | 1364 | return ''; |
1333 | 1365 | } |
1334 | 1366 | |
1367 | + /** |
|
1368 | + * @param string $filename |
|
1369 | + * @param string $tletype |
|
1370 | + */ |
|
1335 | 1371 | public static function tle($filename,$tletype) { |
1336 | 1372 | require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
1337 | 1373 | global $tmp_dir, $globalTransaction; |
@@ -1381,6 +1417,9 @@ discard block |
||
1381 | 1417 | return ''; |
1382 | 1418 | } |
1383 | 1419 | |
1420 | + /** |
|
1421 | + * @param string $filename |
|
1422 | + */ |
|
1384 | 1423 | public static function satellite_ucsdb($filename) { |
1385 | 1424 | global $tmp_dir, $globalTransaction; |
1386 | 1425 | $query = "DELETE FROM satellite"; |
@@ -1428,6 +1467,9 @@ discard block |
||
1428 | 1467 | return ''; |
1429 | 1468 | } |
1430 | 1469 | |
1470 | + /** |
|
1471 | + * @param string $filename |
|
1472 | + */ |
|
1431 | 1473 | public static function satellite_celestrak($filename) { |
1432 | 1474 | global $tmp_dir, $globalTransaction; |
1433 | 1475 | $satcat_sources = array( |
@@ -1743,6 +1785,9 @@ discard block |
||
1743 | 1785 | |
1744 | 1786 | } |
1745 | 1787 | */ |
1788 | + /** |
|
1789 | + * @param string $filename |
|
1790 | + */ |
|
1746 | 1791 | public static function waypoints($filename) { |
1747 | 1792 | //require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
1748 | 1793 | global $tmp_dir, $globalTransaction; |
@@ -1790,6 +1835,9 @@ discard block |
||
1790 | 1835 | return ''; |
1791 | 1836 | } |
1792 | 1837 | |
1838 | + /** |
|
1839 | + * @param string $filename |
|
1840 | + */ |
|
1793 | 1841 | public static function ivao_airlines($filename) { |
1794 | 1842 | //require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
1795 | 1843 | global $tmp_dir, $globalTransaction; |
@@ -6,6 +6,9 @@ discard block |
||
6 | 6 | public $dbs = array(); |
7 | 7 | public $latest_schema = 46; |
8 | 8 | |
9 | + /** |
|
10 | + * @param string $dbname |
|
11 | + */ |
|
9 | 12 | public function __construct($dbc = null,$dbname = null,$user = null,$pass = null) { |
10 | 13 | global $globalNoDB; |
11 | 14 | if (isset($globalNoDB) && $globalNoDB === TRUE) { |
@@ -142,6 +145,9 @@ discard block |
||
142 | 145 | return true; |
143 | 146 | } |
144 | 147 | |
148 | + /** |
|
149 | + * @param string $table |
|
150 | + */ |
|
145 | 151 | public function tableExists($table) |
146 | 152 | { |
147 | 153 | global $globalDBdriver, $globalDBname; |