diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index d0408d85..1bc61710 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1035,9 +1035,8 @@ class Logbook_model extends CI_Model { } function get_qso($id) { - $this->db->select(''.$this->config->item('table_name').'.*, station_profile.*'); $this->db->from($this->config->item('table_name')); - + $this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left'); $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); $this->db->where('COL_PRIMARY_KEY', $id); diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php index 04fab5ab..8c5e5006 100644 --- a/application/views/view_log/qso.php +++ b/application/views/view_log/qso.php @@ -473,21 +473,20 @@ $lng = $midpoint[1]; } } else { + if(isset($row->lat)) { + $lat = $row->lat; + } else { + $lat = 0; + } - $CI =& get_instance(); - $CI->load->model('Logbook_model'); - - $result = $CI->Logbook_model->dxcc_lookup($row->COL_CALL, $row->COL_TIME_ON); - - if(isset($result)) { - $lat = $result['lat']; - $lng = $result['long']; + if(isset($row->long)) { + $lng = $row->long; + } else { + $lng = 0; } } ?> - -