Also take care of existing VUCC_GRIDS stored with whitespace

pull/2922/head
phl0 2024-01-16 00:16:58 +01:00
rodzic 1d86af760b
commit 0352d01366
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -173,7 +173,7 @@ function get_bearing($lat1, $lon1, $lat2, $lon2) {
}
function qra2latlong($strQRA) {
$strQRA=trim($strQRA);
$strQRA=preg_replace('/\s+/', '', $strQRA);
if (substr_count($strQRA, ',') > 0) {
if (substr_count($strQRA, ',') == 3) {
// Handle grid corners

Wyświetl plik

@ -433,9 +433,9 @@
$distancestring = "(Gridsquare: ".$row->COL_GRIDSQUARE." / distance: ".$distance.")";
} else {
if (substr_count($row->COL_VUCC_GRIDS, ',') == 1) {
$distancestring = "(Gridline: ".$row->COL_VUCC_GRIDS." / distance: ".$distance.")";
$distancestring = "(Gridline: ".preg_replace('/\s+/', '', $row->COL_VUCC_GRIDS)." / distance: ".$distance.")";
} else if (substr_count($row->COL_VUCC_GRIDS, ',') == 3) {
$distancestring = "(Gridcorner: ".$row->COL_VUCC_GRIDS." / distance: ".$distance.")";
$distancestring = "(Gridcorner: ".preg_replace('/\s+/', '', $row->COL_VUCC_GRIDS)." / distance: ".$distance.")";
} else {
$distancestring = "(Grids: ".$row->COL_VUCC_GRIDS.")";
}