[DXCC id] Fixed identification for VP2x calls (and probably others)

这个提交包含在:
Andreas 2023-01-16 21:58:34 +01:00
父节点 ad889e7ee8
当前提交 c8a85a72c0

查看文件

@ -2838,13 +2838,7 @@ class Logbook_model extends CI_Model {
$call = "KG4";
} elseif (preg_match('/(^KG4)[A-Z09]{1}/', $call)) {
$call = "K";
} elseif (preg_match_all('/^((\d|[A-Z])+\/)?((\d|[A-Z]){3,})(\/(\d|[A-Z])+)?(\/(\d|[A-Z])+)?$/', $call, $matches)) {
if ($matches[5][0] == '/MM' || $matches[5][0] == '/AM') {
$row['adif'] = 0;
$row['entity'] = 'None';
$row['cqz'] = 0;
return array($row['adif'], $row['entity'], $row['cqz']);
} else {
} elseif (preg_match('/\w\/\w/', $call)) {
$result = $this->wpx($call, 1); # use the wpx prefix instead
if ($result == '') {
$row['adif'] = 0;
@ -2854,7 +2848,6 @@ class Logbook_model extends CI_Model {
} else {
$call = $result . "AA";
}
}
}
$len = strlen($call);
@ -2904,15 +2897,7 @@ class Logbook_model extends CI_Model {
$call = "KG4";
} elseif (preg_match('/(^KG4)[A-Z09]{1}/', $call)) {
$call = "K";
} elseif (preg_match_all('/^((\d|[A-Z])+\/)?((\d|[A-Z]){3,})(\/(\d|[A-Z])+)?(\/(\d|[A-Z])+)?$/', $call, $matches)) {
if ($matches[5][0] == '/MM' || $matches[5][0] == '/AM') {
$row['adif'] = 0;
$row['entity'] = 'None';
$row['cqz'] = 0;
$row['long'] = '0';
$row['lat'] = '0';
return $row;
} else {
} elseif (preg_match('/\w\/\w/', $call)) {
$result = $this->wpx($call, 1); # use the wpx prefix instead
if ($result == '') {
$row['adif'] = 0;
@ -2924,7 +2909,6 @@ class Logbook_model extends CI_Model {
} else {
$call = $result . "AA";
}
}
}
$len = strlen($call);
@ -2960,7 +2944,8 @@ class Logbook_model extends CI_Model {
$c = '';
$lidadditions = '/^QRP|^LGT/';
$csadditions = '/^P$|^R$|^M{1,2}$|^AM$|^A$/';
$csadditions = '/^P$|^R$|^A$/';
$noneadditions = '/^M{1,2}$|^AM$/';
# First check if the call is in the proper format, A/B/C where A and C
# are optional (prefix of guest country and P, MM, AM etc) and B is the
@ -3051,6 +3036,8 @@ class Logbook_model extends CI_Model {
} elseif (preg_match($csadditions, $c)) {
preg_match('/(.+\d)[A-Z]*/', $b, $matches); # Known attachment -> like Case 1.1
$prefix = $matches[1];
} elseif (preg_match($noneadditions, $c)) {
return '';
} elseif (preg_match('/^\d\d+$/', $c)) { # more than 2 numbers -> ignore
preg_match('/(.+\d)[A-Z]* /', $b, $matches); # see above
$prefix = $matches[1][0];