Merge pull request #2646 from AndreasK79/adif_view_improvements

This commit is contained in:
Andreas Kristiansen
2025-12-07 10:59:42 +01:00
committed by GitHub
2 changed files with 9 additions and 5 deletions

View File

@@ -4648,9 +4648,13 @@ class Logbook_model extends CI_Model {
$my_error = "";
if (validateADIFDate($record['qso_date']) != true) {
log_message("Error", "Trying to import QSO with invalid date: " . $record['qso_date']. " for station_id " . $station_id . ". Call: " . ($record['call'] ?? '') . " Mode: " . ($record['mode'] ?? '') . " Band: " . ($record['band'] ?? ''));
$returner['error']=__("QSO on")." ".$record['qso_date'].": ".__("You tried to import a QSO without valid date. This QSO wasn't imported. It's invalid") . "<br>";
if (validateADIFDate($record['qso_date'] ?? '') != true) {
$qso_date = $record['qso_date'] ?? '';
$call = $record['call'] ?? '';
$mode = $record['mode'] ?? '';
$band = $record['band'] ?? '';
log_message("Error", "Trying to import QSO with invalid date: " . $qso_date. " for station_id " . $station_id . ". Call: " . $call . " Mode: " . $mode . " Band: " . $band);
$returner['error']=__("You tried to import a QSO without valid date. This QSO wasn't imported. It's invalid") . ". Call: " . $call . ", Mode: " . $mode . ", Band: " . $band . "<br>";
return($returner);
}

View File

@@ -43,7 +43,7 @@
<p><?= __("We found the following numbers of QSOs for the following contest IDs:")?></p>
<!-- List imported contest data -->
<ul>
<ul class="text-start d-inline-block">
<?php foreach ($imported_contests as $contestid => $qsocount) { ?>
<li><?php echo $contestid . ' (' . $qsocount . ' '. ($qsocount == 1 ? 'QSO' : 'QSOs') .')'; ?></li>
<?php } ?>
@@ -56,7 +56,7 @@
<div class="mt-2 ms-2 me-2">
<h3 class="text-danger"><?= __("Import details / possible problems") ?></h3>
<br> <?= sprintf(__("Check %s for hints about errors in ADIF files."), "<a target=\"_blank\" href=\"https://github.com/wavelog/Wavelog/wiki/ADIF-file-can't-be-imported\">Wavelog Wiki</a>") ?>
<p><?= __("You might have ADIF errors, the QSOs have still been added. Please check the following information:") ?></p>
<p><?= __("You might have ADIF errors. Please check the following information:") ?></p>
<div class="border rounded bg-light p-3" style="max-height: 250px; overflow-y: auto;">
<pre class="mb-0"><?= $adif_errors ?></pre>