mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Fixes
This commit is contained in:
@@ -249,11 +249,25 @@ class Dxcluster_model extends CI_Model {
|
||||
$spot->cnfmd_continent = $status['cnfmd_continent'];
|
||||
$spot->worked_continent = $status['worked_continent'];
|
||||
|
||||
// Use batch last_worked data
|
||||
if ($spot->worked_call && isset($last_worked_batch[$callsign])) {
|
||||
$spot->last_wked = $last_worked_batch[$callsign];
|
||||
$spot->last_wked->LAST_QSO = date($custom_date_format, strtotime($spot->last_wked->LAST_QSO));
|
||||
// Use batch last_worked data
|
||||
if ($spot->worked_call && isset($last_worked_batch[$callsign])) {
|
||||
$spot->last_wked = $last_worked_batch[$callsign];
|
||||
|
||||
// Validate and convert date safely to prevent epoch date (1970) issues
|
||||
if (!empty($spot->last_wked->LAST_QSO)) {
|
||||
$timestamp = strtotime($spot->last_wked->LAST_QSO);
|
||||
// Check if strtotime succeeded and timestamp is valid (> 0)
|
||||
if ($timestamp !== false && $timestamp > 0) {
|
||||
$spot->last_wked->LAST_QSO = date($custom_date_format, $timestamp);
|
||||
} else {
|
||||
// Invalid date - remove last_wked to prevent displaying incorrect date
|
||||
unset($spot->last_wked);
|
||||
}
|
||||
} else {
|
||||
// Empty date - remove last_wked
|
||||
unset($spot->last_wked);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Fallback for spots without status
|
||||
$spot->worked_dxcc = false;
|
||||
|
||||
@@ -117,15 +117,16 @@
|
||||
</div>
|
||||
<!-- Column 2: Required Flags and Additional Flags -->
|
||||
<div class="mb-3 col-12 col-sm-6 col-md-4 col-lg">
|
||||
<label class="form-label d-block filter-label-small" for="requiredFlags"><?= __("Required Flags"); ?></label>
|
||||
<select id="requiredFlags" class="form-select form-select-sm filter-short" name="required_flags" multiple="multiple">
|
||||
<option value="None" selected><?= __("None"); ?></option>
|
||||
<option value="lotw"><?= __("LoTW User"); ?></option>
|
||||
<option value="newcontinent"><?= __("New Continent"); ?></option>
|
||||
<option value="newcountry"><?= __("New Country"); ?></option>
|
||||
<option value="newcallsign"><?= __("New Callsign"); ?></option>
|
||||
<option value="Contest"><?= __("Contest"); ?></option>
|
||||
</select>
|
||||
<label class="form-label d-block filter-label-small" for="requiredFlags"><?= __("Required Flags"); ?></label>
|
||||
<select id="requiredFlags" class="form-select form-select-sm filter-short" name="required_flags" multiple="multiple">
|
||||
<option value="None" selected><?= __("None"); ?></option>
|
||||
<option value="lotw"><?= __("LoTW User"); ?></option>
|
||||
<option value="newcontinent"><?= __("New Continent"); ?></option>
|
||||
<option value="newcountry"><?= __("New Country"); ?></option>
|
||||
<option value="newcallsign"><?= __("New Callsign"); ?></option>
|
||||
<option value="workedcallsign"><?= __("Worked Callsign"); ?></option>
|
||||
<option value="Contest"><?= __("Contest"); ?></option>
|
||||
</select>
|
||||
<label class="form-label d-block filter-label-small mt-3" for="additionalFlags"><?= __("Additional Flags"); ?></label>
|
||||
<select id="additionalFlags" class="form-select form-select-sm filter-short" name="additional_flags" multiple="multiple">
|
||||
<option value="All" selected><?= __("All"); ?></option>
|
||||
|
||||
@@ -863,6 +863,9 @@ $(function() {
|
||||
if (reqFlag === 'newcallsign') {
|
||||
if (single.worked_call !== false) return; // Only new callsigns
|
||||
}
|
||||
if (reqFlag === 'workedcallsign') {
|
||||
if (single.worked_call === false) return; // Only worked callsigns
|
||||
}
|
||||
if (reqFlag === 'Contest') {
|
||||
if (!single.dxcc_spotted || !single.dxcc_spotted.isContest) return;
|
||||
}
|
||||
@@ -1319,6 +1322,9 @@ data[0].push((single.dxcc_spotter && single.dxcc_spotter.cqz) ? single.dxcc_spot
|
||||
if (reqFlag === 'newcallsign') {
|
||||
if (spot.worked_call !== false) return;
|
||||
}
|
||||
if (reqFlag === 'workedcallsign') {
|
||||
if (spot.worked_call === false) return;
|
||||
}
|
||||
if (reqFlag === 'Contest') {
|
||||
if (!spot.dxcc_spotted || !spot.dxcc_spotted.isContest) return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user