Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f78434b71 | ||
|
|
723f66a382 | ||
|
|
27be992395 | ||
|
|
6160d57790 | ||
|
|
7fabd57e13 |
@@ -76,3 +76,4 @@ error_log
|
|||||||
/config.php
|
/config.php
|
||||||
/config.bak.php
|
/config.bak.php
|
||||||
/VERSION
|
/VERSION
|
||||||
|
sync.sh
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
This file was added by Shift #54503 in order to open a
|
||||||
|
Pull Request since no other commits were made.
|
||||||
|
|
||||||
|
You should remove this file.
|
||||||
@@ -166,6 +166,27 @@ class ImportExport
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strpos($split_values[0], '?') !== false) {
|
||||||
|
// This contains the query string, which turns it into a multi-level array
|
||||||
|
$query_str = explode('?', $split_values[0]);
|
||||||
|
$parent = trim($query_str[0]);
|
||||||
|
|
||||||
|
$children = [];
|
||||||
|
$kvp = explode('&', trim($query_str[1]));
|
||||||
|
foreach ($kvp as $items) {
|
||||||
|
if (!$items) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->kvpToArray($items, $children);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ret[$parent] = $children;
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is not a query string, return it back untouched
|
||||||
return [$split_values[0]];
|
return [$split_values[0]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb1
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -54,7 +55,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb2
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -72,7 +74,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb3
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -90,7 +93,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb34
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -108,7 +112,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb35
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -126,7 +131,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb36
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -144,7 +150,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb37
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -162,7 +169,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb38
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -180,7 +188,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb39
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
|
|||||||
@@ -34,6 +34,17 @@ airports:
|
|||||||
lon: -97.6698889
|
lon: -97.6698889
|
||||||
hub: 1
|
hub: 1
|
||||||
ground_handling_cost: 100
|
ground_handling_cost: 100
|
||||||
|
- id: KPHN
|
||||||
|
iata: HPN
|
||||||
|
icao: KPHN
|
||||||
|
name: Westchester County Airport
|
||||||
|
location: White Plains
|
||||||
|
country: United States
|
||||||
|
timezone: America/New_York
|
||||||
|
lat: 41.067
|
||||||
|
lon: -73.7076
|
||||||
|
hub: 1
|
||||||
|
ground_handling_cost: 100
|
||||||
- id: KJFK
|
- id: KJFK
|
||||||
iata: JFK
|
iata: JFK
|
||||||
icao: KJFK
|
icao: KJFK
|
||||||
@@ -448,6 +459,21 @@ flights:
|
|||||||
- id: flightid_1
|
- id: flightid_1
|
||||||
airline_id: 1
|
airline_id: 1
|
||||||
flight_number: 100
|
flight_number: 100
|
||||||
|
dpt_airport_id: KHPN
|
||||||
|
arr_airport_id: KJFK
|
||||||
|
route: DCT CMK V374 DENNA V44 BELTT/N0346F140 V44 DPK DCT
|
||||||
|
distance: 113
|
||||||
|
level: 110
|
||||||
|
dpt_time: 6PM CST
|
||||||
|
arr_time: 11PM EST
|
||||||
|
flight_time: 240
|
||||||
|
flight_type: J
|
||||||
|
load_factor: 100
|
||||||
|
created_at: NOW
|
||||||
|
updated_at: NOW
|
||||||
|
- id: flightid_2
|
||||||
|
airline_id: 1
|
||||||
|
flight_number: 101
|
||||||
dpt_airport_id: KAUS
|
dpt_airport_id: KAUS
|
||||||
arr_airport_id: KJFK
|
arr_airport_id: KJFK
|
||||||
route: KAUS SID TNV J87 IAH J2 LCH J22 MEI J239 ATL J52 AJFEB J14 BYJAC Q60 JAXSN J14 COLIN J61 HUBBS J55 SIE STAR KJFK
|
route: KAUS SID TNV J87 IAH J2 LCH J22 MEI J239 ATL J52 AJFEB J14 BYJAC Q60 JAXSN J14 COLIN J61 HUBBS J55 SIE STAR KJFK
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -253,8 +253,9 @@ class FlightImporter extends ImportExport
|
|||||||
$fare_attributes = [];
|
$fare_attributes = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$fare = Fare::updateOrCreate(['code' => $fare_code], ['name' => $fare_code]);
|
$fare = Fare::firstOrCreate(['code' => $fare_code], ['name' => $fare_code]);
|
||||||
$this->fareSvc->setForFlight($flight, $fare, $fare_attributes);
|
$this->fareSvc->setForFlight($flight, $fare, $fare_attributes);
|
||||||
|
$fare->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,8 +84,9 @@ class SubfleetImporter extends ImportExport
|
|||||||
$fare_attributes = [];
|
$fare_attributes = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$fare = Fare::updateOrCreate(['code' => $fare_code], ['name' => $fare_code]);
|
$fare = Fare::firstOrCreate(['code' => $fare_code], ['name' => $fare_code]);
|
||||||
$this->fareSvc->setForSubfleet($subfleet, $fare, $fare_attributes);
|
$this->fareSvc->setForSubfleet($subfleet, $fare, $fare_attributes);
|
||||||
|
$fare->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,6 +134,11 @@ class Database
|
|||||||
->where($id_col, $row[$id_col])
|
->where($id_col, $row[$id_col])
|
||||||
->update($row);
|
->update($row);
|
||||||
} else {
|
} else {
|
||||||
|
// Remove ID column if it exists and its empty, let the DB set it
|
||||||
|
/*if (array_key_exists($id_col, $row) && empty($row[$id_col])) {
|
||||||
|
unset($row[$id_col]);
|
||||||
|
}*/
|
||||||
|
|
||||||
DB::table($table)->insert($row);
|
DB::table($table)->insert($row);
|
||||||
}
|
}
|
||||||
} catch (QueryException $e) {
|
} catch (QueryException $e) {
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: phpvms:latest
|
image: nabeelio/phpvms
|
||||||
environment:
|
environment:
|
||||||
DB_HOST: mysql
|
DB_HOST: mysql
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
|
|||||||
Reference in New Issue
Block a user