$sCountryCodesSQL = join(',', array_map('addQuotes', $this->aCountryCodes));
}
- // Hack to make it handle "new york, ny" (and variants) correctly
- //$sQuery = str_ireplace(array('New York, ny','new york, new york', 'New York ny','new york new york'), 'new york city, ny', $this->sQuery);
$sQuery = $this->sQuery;
// Conflicts between US state abreviations and various words for 'the' in different languages
}
// View Box SQL
- $sViewboxCentreSQL;
+ $sViewboxCentreSQL = false;
$bBoundingBoxSearch = false;
if ($this->aViewBox)
{
if ($aSearch['sHouseNumber'] === '')
{
$aSearch['sHouseNumber'] = $sToken;
+ // sanity check: if the housenumber is not mainly made
+ // up of numbers, add a penalty
+ if (preg_match_all("/[^0-9]/", $sToken, $aMatches) > 2) $aSearch['iSearchRank']++;
if ($aSearch['iSearchRank'] < $this->iMaxRank) $aNewWordsetSearches[] = $aSearch;
/*
// Fall back to not searching for this item (better than nothing)