X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/9cec9898829eda6e39cf0562eba1b33a7d161f98..65ea0efe68fb52d0f591c964215866c9175adb6a:/lib/lib.php diff --git a/lib/lib.php b/lib/lib.php index 1517b317..a75c3af7 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -884,16 +884,7 @@ return $iPlaceID; } - function loadStructuredAddressElement(&$aStructuredQuery, &$iMinAddressRank, &$iMaxAddressRank, $aParams, $sKey, $iNewMinAddressRank, $iNewMaxAddressRank) + function addQuotes($s) { - 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; + return "'".$s."'"; }