build the dxcc class without date since we check the exception and prefix date already in the dxcc_lookup, simplifies caching

This commit is contained in:
HB9HIL
2026-02-17 14:11:11 +01:00
parent 46b37997b4
commit de02672ab8
10 changed files with 93 additions and 110 deletions

View File

@@ -962,7 +962,7 @@ class API extends CI_Controller {
];
$return['callsign'] = $lookup_callsign;
$dxccobj = new Dxcc(null);
$dxccobj = new Dxcc();
$callsign_dxcc_lookup = $dxccobj->dxcc_lookup($lookup_callsign, $date);
$last_slash_pos = strrpos($lookup_callsign, '/');
@@ -1122,7 +1122,7 @@ class API extends CI_Controller {
$return['callsign'] = $lookup_callsign;
// Use Wavelog\Dxcc\Dxcc for faster in-memory lookup
$dxccobj = new Dxcc($date);
$dxccobj = new Dxcc();
$callsign_dxcc_lookup = $dxccobj->dxcc_lookup($lookup_callsign, $date);
$return['dxcc_id'] = $callsign_dxcc_lookup['adif'] ?? '';