mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge pull request #2838 from phl0/nullDistance
Show 0km instead of blank (same as QSO view)
This commit is contained in:
@@ -1546,7 +1546,9 @@ class Logbook_model extends CI_Model {
|
||||
$dclrdate = $qso->COL_DCL_QSLRDATE;
|
||||
}
|
||||
|
||||
if (($this->input->post('distance')) && (is_numeric($this->input->post('distance')))) {
|
||||
if (is_numeric($this->input->post('distance')) && $this->input->post('distance') == 0) {
|
||||
$distance = 0;
|
||||
} elseif (($this->input->post('distance')) && (is_numeric($this->input->post('distance')))) {
|
||||
$distance = $this->input->post('distance');
|
||||
} else {
|
||||
$distance = null;
|
||||
|
||||
@@ -1362,7 +1362,6 @@ class Logbookadvanced_model extends CI_Model {
|
||||
|
||||
$this->db->where("COL_GRIDSQUARE is NOT NULL");
|
||||
$this->db->where("COL_GRIDSQUARE != ''");
|
||||
$this->db->where("COL_GRIDSQUARE != station_gridsquare");
|
||||
$this->db->where_in("COL_PRIMARY_KEY", $idarray);
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ function getBearing($grid = '') {
|
||||
}
|
||||
|
||||
function getDistance($distance) {
|
||||
if (($distance ?? 0) == 0) return '';
|
||||
if ($distance === null) return '';
|
||||
|
||||
$ci =& get_instance();
|
||||
if ($ci->session->userdata('user_measurement_base') == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user