From f765a1c1698c43371cd4fd3eb3602db0fcd09d0f Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Tue, 28 Sep 2021 11:12:35 +0100 Subject: [PATCH] [QSO Entry] Changed worked_grid_before in Logbooks.php to use All station locations --- application/controllers/Logbook.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index 196780da..729d7d06 100755 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -226,9 +226,8 @@ class Logbook extends CI_Controller { return false; $CI =& get_instance(); - $CI->load->model('Stations'); - $station_id = $CI->Stations->find_active(); - + $CI->load->model('logbooks_model'); + $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); if($type == "SAT") { $this->db->where('COL_PROP_MODE', 'SAT'); @@ -238,7 +237,7 @@ class Logbook extends CI_Controller { $this->db->where('COL_PROP_MODE !=','SAT'); } - $this->db->where('station_id', $station_id); + $this->db->where_in('station_id', $logbooks_locations_array); $this->db->like('SUBSTRING(COL_GRIDSQUARE, 1, 4)', substr($gridsquare, 0, 4)); $this->db->order_by($this->config->item('table_name').".COL_TIME_ON", "desc"); $this->db->limit(1);