We need to update QSO dates on cert update as well

This commit is contained in:
phl0
2023-05-21 18:18:58 +02:00
parent 596480f029
commit 828c7391ec
2 changed files with 4 additions and 2 deletions

View File

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

View File

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