From 828c7391ec363a93d0bb1009c53bc5f0ae55acf0 Mon Sep 17 00:00:00 2001 From: phl0 Date: Sun, 21 May 2023 18:18:58 +0200 Subject: [PATCH] We need to update QSO dates on cert update as well --- application/controllers/Lotw.php | 2 +- application/models/LotwCert.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 1c415fe9..01cb8f7d 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -156,7 +156,7 @@ class Lotw extends CI_Controller { } else { // Certificate is in the system time to update - $this->LotwCert->update_certificate($this->session->userdata('user_id'), $info['issued_callsign'], $info['dxcc-id'], $info['validFrom'], $info['validTo_Date'], $info['pem_key'], $info['general_cert']); + $this->LotwCert->update_certificate($this->session->userdata('user_id'), $info['issued_callsign'], $info['dxcc-id'], $info['validFrom'], $info['validTo_Date'], $info['qso-first-date'], $info['qso-end-date'], $info['pem_key'], $info['general_cert']); // Cert success flash message $this->session->set_flashdata('Success', $info['issued_callsign'].' Certificate Updated.'); diff --git a/application/models/LotwCert.php b/application/models/LotwCert.php index 228ea6d1..1d1fd03d 100644 --- a/application/models/LotwCert.php +++ b/application/models/LotwCert.php @@ -54,11 +54,13 @@ class LotwCert extends CI_Model { $this->db->insert('lotw_certs', $data); } - function update_certificate($user_id, $callsign, $dxcc, $date_created, $date_expires, $cert_key, $general_cert) { + function update_certificate($user_id, $callsign, $dxcc, $date_created, $date_expires, $qso_start_date, $qso_end_date, $cert_key, $general_cert) { $data = array( 'cert_dxcc_id' => $dxcc, 'date_created' => $date_created, 'date_expires' => $date_expires, + 'qso_start_date' => $qso_start_date, + 'qso_end_date' => $qso_end_date, 'cert_key' => $cert_key, 'cert' => $general_cert );