X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/15a215729eec7353254fc42972532ce3f38d743a..749091bf3a0ac9c1f7417b7b896aa4081fc8d5c8:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index a5b9d485..fc2d6c65 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -63,7 +63,7 @@ class Geocode private function normTerm($sTerm) { if ($this->oNormalizer === null) { - return null; + return $sTerm; } return $this->oNormalizer->transliterate($sTerm); @@ -313,12 +313,7 @@ class Geocode if (count($aViewbox) != 4) { userError("Bad parmater 'viewbox'. Expected 4 coordinates."); } - $this->setViewBox(array( - $aViewbox[0], - $aViewbox[3], - $aViewbox[2], - $aViewbox[1] - )); + $this->setViewBox($aViewbox); } else { $aRoute = $oParams->getStringList('route'); $fRouteWidth = $oParams->getFloat('routewidth'); @@ -752,7 +747,7 @@ class Geocode } elseif ($sPhraseType == 'postalcode' || ($aSearchTerm['class'] == 'place' && $aSearchTerm['type'] == 'postcode')) { // We need to try the case where the postal code is the primary element (i.e. no way to tell if it is (postalcode, city) OR (city, postalcode) so try both if ($aSearch['sPostcode'] === '' && $aSearch['sHouseNumber'] === '' && - isset($aSearchTerm['word_id']) && $aSearchTerm['word_id'] && strpos($sNormQuery, $this->normTerm($aSearchTerm['word'])) !== false) { + isset($aSearchTerm['word']) && $aSearchTerm['word'] && strpos($sNormQuery, $this->normTerm($aSearchTerm['word'])) !== false) { // If we have structured search or this is the first term, // make the postcode the primary search element. if ($aSearch['sOperator'] === '' && ($sPhraseType == 'postalcode' || ($iToken == 0 && $iPhrase == 0))) {