Merge pull request #2153 from phl0/fixLotwCertUpdateFunction

[LotW] We need to update QSO dates on cert update as well
pull/2156/head
Andreas Kristiansen 2023-05-21 20:14:42 +02:00 zatwierdzone przez GitHub
commit f0d8bb4de2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

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

Wyświetl plik

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