Check for RT-Flag while saving QSO

This commit is contained in:
int2001
2023-11-27 14:28:22 +00:00
parent 0df09dfb2d
commit 218e5a267b
2 changed files with 4 additions and 2 deletions

View File

@@ -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);

View File

@@ -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)),