From e4f411c708f2c214eb54830430a7816e0ef60483 Mon Sep 17 00:00:00 2001 From: int2001 Date: Wed, 6 Mar 2024 06:16:47 +0000 Subject: [PATCH] Catch Clublogerror if log was already sent --- application/controllers/Clublog.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/controllers/Clublog.php b/application/controllers/Clublog.php index 5aa2b630d..f08ba95f3 100644 --- a/application/controllers/Clublog.php +++ b/application/controllers/Clublog.php @@ -109,11 +109,16 @@ class Clublog extends CI_Controller { // If Clublog Accepts mark the QSOs if (preg_match('/\baccepted\b/', $response)) { echo "QSOs uploaded and Logbook QSOs marked as sent to Clublog"."
"; - $this->load->model('clublog_model'); $this->clublog_model->mark_qsos_sent($station_row->station_id); echo "Clublog upload for ".$station_row->station_callsign."
"; log_message('info', 'Clublog upload for '.$station_row->station_callsign.' successfully sent.'); + } else if (preg_match('/checksum duplicate/',$response)) { + echo "QSOs uploaded (asduplicate!) and Logbook QSOs marked as sent to Clublog"."
"; + $this->load->model('clublog_model'); + $this->clublog_model->mark_qsos_sent($station_row->station_id); + echo "Clublog upload for ".$station_row->station_callsign."
"; + log_message('info', 'Clublog DUPLICATE upload for '.$station_row->station_callsign.' successfully sent.'); } else { echo "Error ".$response; log_message('error', 'Clublog upload for '.$station_row->station_callsign.' failed reason '.$response);