X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f082611e251984fd19639fcf30e1d7587288a435..f942f7c3bf8792497a9d72f2567c1c7cd19f6140:/lib/lib.php diff --git a/lib/lib.php b/lib/lib.php index 1959ded3..8a491818 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -890,3 +890,17 @@ return $iPlaceID; } + + function loadStructuredAddressElement(&$aStructuredQuery, &$iMinAddressRank, &$iMaxAddressRank, $aParams, $sKey, $iNewMinAddressRank, $iNewMaxAddressRank) + { + if (!isset($_GET[$sKey])) return false; + $sValue = trim($_GET[$sKey]); + if (!$sValue) return false; + $aStructuredQuery[$sKey] = $sValue; + if ($iMinAddressRank == 0 && $iMaxAddressRank == 30) { + $iMinAddressRank = $iNewMinAddressRank; + $iMaxAddressRank = $iNewMaxAddressRank; + } + return true; + } +