X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/9cec9898829eda6e39cf0562eba1b33a7d161f98..2e14c7b337b9540ab03a4ed3c3cb21b16f1be6cd:/lib/lib.php diff --git a/lib/lib.php b/lib/lib.php index 1517b317..3ed66237 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -169,7 +169,7 @@ { $aResult = array(array(join(' ',$aWords))); $sFirstToken = ''; - if ($iDepth < 8) { + if ($iDepth < 7) { while(sizeof($aWords) > 1) { $sWord = array_shift($aWords); @@ -884,7 +884,7 @@ return $iPlaceID; } - function loadStructuredAddressElement(&$aStructuredQuery, &$iMinAddressRank, &$iMaxAddressRank, $aParams, $sKey, $iNewMinAddressRank, $iNewMaxAddressRank) + function loadStructuredAddressElement(&$aStructuredQuery, &$iMinAddressRank, &$iMaxAddressRank, &$aAddressRankList, $aParams, $sKey, $iNewMinAddressRank, $iNewMaxAddressRank, $aItemListValues) { if (!isset($_GET[$sKey])) return false; $sValue = trim($_GET[$sKey]); @@ -895,5 +895,11 @@ $iMinAddressRank = $iNewMinAddressRank; $iMaxAddressRank = $iNewMaxAddressRank; } + if ($aItemListValues) $aAddressRankList = array_merge($aAddressRankList, $aItemListValues); return true; } + + function addQuotes($s) + { + return "'".$s."'"; + }