diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 45d99fd1..200b28ce 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -566,7 +566,7 @@ class Logbook_model extends CI_Model { $result = $this->exists_clublog_credentials($data['station_id']); - if (isset($result->ucp) && isset($result->ucn) && (($result->ucp ?? '') != '') && (($result->ucn ?? '') != '')) { // && $result->hrdlogrealtime == 1) { + if (isset($result->ucp) && isset($result->ucn) && (($result->ucp ?? '') != '') && (($result->ucn ?? '') != '') && ($result->clublogrealtime == 1)) { $CI =& get_instance(); $CI->load->library('AdifHelper'); $qso = $this->get_qso($last_id,true)->result(); @@ -650,7 +650,7 @@ class Logbook_model extends CI_Model { * Function checks if a Clublog Credebtials exists in the table with the given station id */ function exists_clublog_credentials($station_id) { - $sql = 'select auth.user_clublog_name ucn, auth.user_clublog_password ucp from '.$this->config->item('auth_table').' auth inner join station_profile prof on (auth.user_id=prof.user_id) where prof.station_id = ?'; + $sql = 'select auth.user_clublog_name ucn, auth.user_clublog_password ucp, prof.clublogrealtime from '.$this->config->item('auth_table').' auth inner join station_profile prof on (auth.user_id=prof.user_id) where prof.station_id = ? and prof.clublogrealtime=1'; $query = $this->db->query($sql, $station_id); diff --git a/application/models/Stations.php b/application/models/Stations.php index 03b89aa7..6a51e018 100644 --- a/application/models/Stations.php +++ b/application/models/Stations.php @@ -103,6 +103,7 @@ class Stations extends CI_Model { 'eqslqthnickname' => xss_clean($this->input->post('eqslnickname', true)), 'hrdlog_code' => xss_clean($this->input->post('hrdlog_code', true)), 'hrdlogrealtime' => xss_clean($this->input->post('hrdlogrealtime', true)), + 'clublogrealtime' => xss_clean($this->input->post('clublogrealtime', true)), 'qrzapikey' => xss_clean($this->input->post('qrzapikey', true)), 'qrzrealtime' => xss_clean($this->input->post('qrzrealtime', true)), 'oqrs' => xss_clean($this->input->post('oqrs', true)), @@ -146,6 +147,7 @@ class Stations extends CI_Model { 'eqslqthnickname' => xss_clean($this->input->post('eqslnickname', true)), 'hrdlog_code' => xss_clean($this->input->post('hrdlog_code', true)), 'hrdlogrealtime' => xss_clean($this->input->post('hrdlogrealtime', true)), + 'clublogrealtime' => xss_clean($this->input->post('clublogrealtime', true)), 'qrzapikey' => xss_clean($this->input->post('qrzapikey', true)), 'qrzrealtime' => xss_clean($this->input->post('qrzrealtime', true)), 'oqrs' => xss_clean($this->input->post('oqrs', true)),