Browse Source

fix adding QSOs manually (broken by d51b79c355)

master
Fabian Kurz 2 months ago
parent
commit
af9d31f18f
  1. 2
      api.php
  2. 2
      functions.php

2
api.php

@ -254,7 +254,7 @@
# Log a new QSO
else {
$qsos = array();
array_push($qsos, array('call' => $o->hiscall, 'nr' => $o->nr, 'date' => $o->date, 'band' => $o->band, 'dxcc' => $o->dxcc, 'was' => $o->was, 'waz' => $o->waz, 'wae' => $o->wae));
array_push($qsos, array('call' => $o->hiscall, 'nr' => $o->nr, 'date' => $o->date, 'qsolength' => 0, 'band' => $o->band, 'dxcc' => $o->dxcc, 'was' => $o->was, 'waz' => $o->waz, 'wae' => $o->wae));
$qso_filtered = filter_qsos($qsos, $_SESSION['callsign']);
if (count($qso_filtered)) {
echo "Saved QSO: ".$qso_filtered[0]['call']." ".$qso_filtered[0]['date']." ".$qso_filtered[0]['band']." needed for: ".$qso_filtered[0]['reasons']."\n";

2
functions.php

@ -986,7 +986,7 @@ function new_waz($qso, $c) {
function insert_qso($qso, $c) {
global $db;
if (!is_int($qso['nr'])) { $qso['nr'] = 0; } // QTX with non-members
if ($qso['nr']+0==0) { $qso['nr'] = 0; } // QTX with non-members
$query = "INSERT into cwops_log (`mycall`, `date`, `year`, `band`, `nr`, `hiscall`, `dxcc`, `wae`, `waz`, `was`, `qsolength`) VALUES ".
"('$c', '".$qso['date']."', '".substr($qso['date'], 0, 4)."', ".$qso['band'].", ".$qso['nr'].", '".$qso['call']."', ".$qso['dxcc'].",
'".$qso['wae']."', ".$qso['waz'].", '".$qso['was']."', ".$qso['qsolength'].");";

Loading…
Cancel
Save