From b7075cb2038d19e2d6b71d51203e6dd0b281b992 Mon Sep 17 00:00:00 2001 From: Christoph Kottke Date: Wed, 29 Mar 2023 11:28:20 +0200 Subject: [PATCH] [eQSL] Adjusted query to show only own locations --- application/models/Logbook_model.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 9c715b6d..50438507 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -2543,6 +2543,10 @@ class Logbook_model extends CI_Model { // Show all QSOs we need to send to eQSL function eqsl_not_yet_sent() { + $CI =& get_instance(); + $CI->load->model('logbooks_model'); + $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + $this->db->select('station_profile.*, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_COMMENT, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_PROP_MODE, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_SAT_MODE, '.$this->config->item('table_name').'.COL_QSLMSG'); $this->db->from('station_profile'); $this->db->join($this->config->item('table_name'),'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); @@ -2555,6 +2559,7 @@ class Logbook_model extends CI_Model { $this->db->or_where($this->config->item('table_name').'.COL_EQSL_QSL_SENT', 'Q'); $this->db->or_where($this->config->item('table_name').'.COL_EQSL_QSL_SENT', 'N'); $this->db->group_end(); + $this->db->where_in('station_profile.station_id', $logbooks_locations_array); return $this->db->get(); }