Merge pull request #2752 from int2001/use_new_class

Use DXCC-Class for API-Lookup (used for Cluster)
This commit is contained in:
Joerg (DJ7NT)
2026-01-01 15:21:37 +01:00
committed by GitHub

View File

@@ -1,4 +1,9 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
<?php
use Wavelog\Dxcc\Dxcc;
require_once APPPATH . '../src/Dxcc/Dxcc.php';
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class API extends CI_Controller {
@@ -1060,7 +1065,9 @@ class API extends CI_Controller {
$return['callsign'] = $lookup_callsign;
$callsign_dxcc_lookup = $this->logbook_model->dxcc_lookup($lookup_callsign, $date);
// Use Wavelog\Dxcc\Dxcc for faster in-memory lookup
$dxccobj = new Dxcc($date);
$callsign_dxcc_lookup = $dxccobj->dxcc_lookup($lookup_callsign, $date);
$return['dxcc_id'] = $callsign_dxcc_lookup['adif'] ?? '';
$return['dxcc'] = $callsign_dxcc_lookup['entity'] ?? '';