From 302c252bca9b3daee12f73291f0a3d2064fb5560 Mon Sep 17 00:00:00 2001 From: int2001 Date: Sun, 2 Feb 2025 14:17:05 +0000 Subject: [PATCH] Used wrong key when disabling clublog --- application/models/Clublog_model.php | 6 +++--- application/models/Logbook_model.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/models/Clublog_model.php b/application/models/Clublog_model.php index 58bec6d8d..0a3e83f49 100644 --- a/application/models/Clublog_model.php +++ b/application/models/Clublog_model.php @@ -367,7 +367,7 @@ class Clublog_model extends CI_Model return $query; } - function push_qso_to_clublog($cl_username, $cl_password, $station_callsign, $adif) { + function push_qso_to_clublog($cl_username, $cl_password, $station_callsign, $adif, $station_id) { // initialise the curl request $returner = []; @@ -398,8 +398,8 @@ class Clublog_model extends CI_Model $returner['status'] = 'OK'; } elseif (substr($response,0,14) == 'Login rejected') { // Deactivate Upload for Station if Clublog rejects it due to wrong credentials (prevent being blacklisted at Clublog) log_message("Error","Clublog deactivated for ".$cl_username." because of wrong creds at Realtime-Pusher"); - $sql = 'update station_profile set clublogignore = 1 where cl_username = ? and cl_password = ?'; - $this->db->query($sql,array($cl_username,$cl_password)); + $sql = 'update station_profile set clublogignore = 1 where station_id = ?'; + $this->db->query($sql,array($station_id)); $returner['status'] = $response; } else { log_message("Error","Uncaught exception at ClubLog-RT for ".$cl_username." / Details: ".$httpcode." : ".$response); diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 9f598054b..01b020a9b 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -796,7 +796,7 @@ class Logbook_model extends CI_Model { } $adif = $this->adifhelper->getAdifLine($qso[0]); - $result = $this->clublog_model->push_qso_to_clublog($result->ucn, $result->ucp, $data['COL_STATION_CALLSIGN'], $adif); + $result = $this->clublog_model->push_qso_to_clublog($result->ucn, $result->ucp, $data['COL_STATION_CALLSIGN'], $adif, $data['station_id']); if ($result['status'] == 'OK') { $this->mark_clublog_qsos_sent($last_id); }