Skip to content

Commit d10e2c6

Browse files
authored
Merge pull request #2646 from AndreasK79/adif_view_improvements
2 parents acc854c + 1fdb746 commit d10e2c6

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

application/models/Logbook_model.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4648,9 +4648,13 @@ function import($record, $station_id = "0", $skipDuplicate = true, $markClublog
46484648

46494649
$my_error = "";
46504650

4651-
if (validateADIFDate($record['qso_date']) != true) {
4652-
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'] ?? ''));
4653-
$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>";
4651+
if (validateADIFDate($record['qso_date'] ?? '') != true) {
4652+
$qso_date = $record['qso_date'] ?? '';
4653+
$call = $record['call'] ?? '';
4654+
$mode = $record['mode'] ?? '';
4655+
$band = $record['band'] ?? '';
4656+
log_message("Error", "Trying to import QSO with invalid date: " . $qso_date. " for station_id " . $station_id . ". Call: " . $call . " Mode: " . $mode . " Band: " . $band);
4657+
$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>";
46544658
return($returner);
46554659
}
46564660

application/views/adif/import_success.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<p><?= __("We found the following numbers of QSOs for the following contest IDs:")?></p>
4444

4545
<!-- List imported contest data -->
46-
<ul>
46+
<ul class="text-start d-inline-block">
4747
<?php foreach ($imported_contests as $contestid => $qsocount) { ?>
4848
<li><?php echo $contestid . ' (' . $qsocount . ' '. ($qsocount == 1 ? 'QSO' : 'QSOs') .')'; ?></li>
4949
<?php } ?>
@@ -56,7 +56,7 @@
5656
<div class="mt-2 ms-2 me-2">
5757
<h3 class="text-danger"><?= __("Import details / possible problems") ?></h3>
5858
<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>") ?>
59-
<p><?= __("You might have ADIF errors, the QSOs have still been added. Please check the following information:") ?></p>
59+
<p><?= __("You might have ADIF errors. Please check the following information:") ?></p>
6060

6161
<div class="border rounded bg-light p-3" style="max-height: 250px; overflow-y: auto;">
6262
<pre class="mb-0"><?= $adif_errors ?></pre>

0 commit comments

Comments
 (0)