Use name is ename is not set

This commit is contained in:
Andreas Kristiansen
2025-02-06 13:03:30 +01:00
parent 63473b773d
commit 46f83f205a

View File

@@ -89,10 +89,7 @@ class Qrzru {
// Return Required Fields
$data['callsign'] = (string)$xml->Callsign->call;
$data['name'] = (string)$xml->Callsign->ename;
// we always give back the name, no matter if reduced data or not
$data['name'] = trim($data['name']);
$data['name'] = trim((string)($xml->Callsign->ename ?: $xml->Callsign->name) . ' ' . (string)($xml->Callsign->esurname ?: $xml->Callsign->surname));
if ($reduced == false) {
$data['city'] = (string)$xml->Callsign->city;