mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge pull request #406 from int2001/fix_empty_grid
Calculation issue if lat/lon or some grid-information is missing
This commit is contained in:
@@ -397,7 +397,7 @@ class Logbookadvanced extends CI_Controller {
|
||||
if (!empty($qso['COL_GRIDSQUARE']) || !empty($qso['COL_VUCC_GRIDS'])) {
|
||||
$mappedcoordinates[] = $this->calculate($qso, ($qso['station_gridsquare'] ?? ''), ($qso['COL_GRIDSQUARE'] ?? '') == '' ? $qso['COL_VUCC_GRIDS'] : $qso['COL_GRIDSQUARE'], $measurement_base, $var_dist, $custom_date_format);
|
||||
} else {
|
||||
if (!empty($qso['lat']) || !empty($qso['long'])) {
|
||||
if (!empty($qso['lat']) && !empty($qso['long'])) {
|
||||
$mappedcoordinates[] = $this->calculateCoordinates($qso, $qso['lat'], $qso['long'], ($qso['station_gridsquare'] ?? ''), $measurement_base, $var_dist, $custom_date_format);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ class Logbookadvanced_model extends CI_Model {
|
||||
}
|
||||
|
||||
$sql = "
|
||||
SELECT *, dxcc_entities.name as dxccname, mydxcc.name AS station_country, exists(select 1 from qsl_images where qsoid = qsos.COL_PRIMARY_KEY) as qslcount, contest.name as contestname
|
||||
SELECT qsos.*, dxcc_entities.*, station_profile.*, satellite.*, dxcc_entities.name as dxccname, mydxcc.name AS station_country, exists(select 1 from qsl_images where qsoid = qsos.COL_PRIMARY_KEY) as qslcount, contest.name as contestname
|
||||
FROM " . $this->config->item('table_name') . " qsos
|
||||
INNER JOIN station_profile ON qsos.station_id=station_profile.station_id
|
||||
LEFT OUTER JOIN satellite ON qsos.COL_SAT_NAME = satellite.name
|
||||
|
||||
Reference in New Issue
Block a user