From 3e7429d464470eb9d72efd050c04dee271e0de11 Mon Sep 17 00:00:00 2001 From: phl0 Date: Tue, 24 Oct 2023 15:13:48 +0200 Subject: [PATCH] Check if grid worked on default band for callbook results --- application/controllers/Logbook.php | 3 +++ application/views/search/result.php | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index d5484a23..37f469c3 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -919,6 +919,9 @@ function worked_grid_before($gridsquare, $type, $band, $mode) } $data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname')); + $CI = &get_instance(); + $CI->load->model('logbook_model'); + $data['grid_worked'] = $CI->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band')); } /*else { // Lookup using hamli $this->load->library('hamli'); diff --git a/application/views/search/result.php b/application/views/search/result.php index b40db7b6..587c1c13 100644 --- a/application/views/search/result.php +++ b/application/views/search/result.php @@ -5,7 +5,6 @@

Callbook Search for

- @@ -25,7 +24,15 @@ - +
Gridsquare + ".strtoupper($callsign['gridsquare']).""; + } else { + echo " ".strtoupper($callsign['gridsquare']).""; + } + ?> +