Merge pull request #2147 from AndreasK79/lba_callbook_fix_if_call_not_found

This commit is contained in:
Andreas Kristiansen
2025-07-13 20:37:48 +02:00
committed by GitHub
2 changed files with 11 additions and 11 deletions

View File

@@ -196,17 +196,16 @@ class Logbookadvanced extends CI_Controller {
$station_profile = $this->stations->profile($active_station_id)->row_array();
$this->logbookadvanced_model->updateQsoWithCallbookInfo($qso['COL_PRIMARY_KEY'], $qso, $callbook, $station_profile['station_gridsquare']);
$qso = $this->logbookadvanced_model->getQsosForAdif(json_encode($qsoID), $this->session->userdata('user_id'))->row_array();
}
$qsoObj = new QSO($qso); // Redirection via Object to clean/convert QSO (get rid of cols)
$cleaned_qso=$qsoObj->toArray(); // And back to Array for the JSON
$flag = $this->dxccflag->get($qsoObj->getDXCCId());
if ($flag != null) {
$cleaned_qso['flag'] = ' '.$flag;
} else {
$cleaned_qso['flag'] = '';
}
$qsoObj = new QSO($qso); // Redirection via Object to clean/convert QSO (get rid of cols)
$cleaned_qso = $qsoObj->toArray(); // And back to Array for the JSON
$flag = $this->dxccflag->get($qsoObj->getDXCCId());
if ($flag != null) {
$cleaned_qso['flag'] = ' ' . $flag;
} else {
$cleaned_qso['flag'] = '';
}
header("Content-Type: application/json");

View File

@@ -426,13 +426,14 @@ function processNextCallbookItem() {
},
dataType: 'json',
success: function (data) {
if (data != []) {
if (data && data.dx) {
updateRow(data);
unselectQsoID(id);
}
unselectQsoID(id);
setTimeout("processNextCallbookItem()", 50);
},
error: function (data) {
unselectQsoID(id);
setTimeout("processNextCallbookItem()", 50);
},
});