foreach(explode(',',$aParams['exclude_place_ids']) as $iExcludedPlaceID)
{
$iExcludedPlaceID = (int)$iExcludedPlaceID;
- if ($iExcludedPlaceID) $aExcludePlaceIDs[$iExcludedPlaceID] = $iExcludedPlaceID;
+ if ($iExcludedPlaceID)
+ $aExcludePlaceIDs[$iExcludedPlaceID] = $iExcludedPlaceID;
}
- $this->aExcludePlaceIDs = $aExcludePlaceIDs;
+
+ if (isset($aExcludePlaceIDs))
+ $this->aExcludePlaceIDs = $aExcludePlaceIDs;
}
// Only certain ranks of feature
$aRecheckWords = preg_split('/\b[\s,\\-]*/u',$sQuery);
foreach($aRecheckWords as $i => $sWord)
{
- if (!$sWord) unset($aRecheckWords[$i]);
+ if (!preg_match('/\pL/', $sWord)) unset($aRecheckWords[$i]);
}
+ if (CONST_Debug) { echo '<i>Recheck words:<\i>'; var_dump($aRecheckWords); }
+
foreach($aSearchResults as $iResNum => $aResult)
{
if (CONST_Search_AreaPolygons)
if (stripos($sAddress, $sWord)!==false)
{
$iCountWords++;
- if (preg_match("/(^|,)\s*$sWord\s*(,|$)/", $sAddress)) $iCountWords += 0.1;
+ if (preg_match("/(^|,)\s*".preg_quote($sWord, '/')."\s*(,|$)/", $sAddress)) $iCountWords += 0.1;
}
}