[OQRS] Fix the qso match button

This commit is contained in:
Andreas Kristiansen
2025-08-14 19:30:51 +02:00
parent b13bd6886b
commit 7f56cd68b7
2 changed files with 2 additions and 2 deletions

View File

@@ -603,7 +603,7 @@ class Oqrs_model extends CI_Model {
$this->db->from('oqrs');
$this->db->join('station_profile', 'station_profile.station_id = oqrs.station_id');
$this->db->where('oqrs.id', $oqrsid);
$this->db->where('oqrs.qsoid', 0); // Ensure we are adding a match to an empty qsoid
$this->db->where('oqrs.qsoid IS NULL', null, false); // Ensure we are adding a match to an empty qsoid
$this->db->where('station_profile.user_id', $this->session->userdata('user_id'));
$query = $this->db->get();

View File

@@ -206,7 +206,7 @@ function return_add_print_button($qso_id, $qslsent) {
}
function return_add_match_qso_button($qso_id, $qsoid, $matchqsoid, $oqrsid) {
if ($qso_id != $qsoid && $matchqsoid == 0) return '<button onclick="addQsoMatchToOqrs(\'' . $qso_id . '\', \'' . $oqrsid . '\')" class="btn btn-sm btn-success">' . __("Match QSO") . '</button>';
if ($qso_id != $qsoid && $matchqsoid == null) return '<button onclick="addQsoMatchToOqrs(\'' . $qso_id . '\', \'' . $oqrsid . '\')" class="btn btn-sm btn-success">' . __("Match QSO") . '</button>';
return '';
}