allow any unicode letter and spaces in special terms

Allows to search for things like [fish shop].
This commit is contained in:
Sarah Hoffmann 2013-04-07 17:53:34 +02:00
parent 87ad4fb82f
commit 4d2b88dd3e

View File

@ -308,7 +308,7 @@
$aSpecialTerms[strtolower($aSpecialTerm[1])] = $aSpecialTerm[2]; $aSpecialTerms[strtolower($aSpecialTerm[1])] = $aSpecialTerm[2];
} }
preg_match_all('/\\[([a-zA-Z]*)\\]/', $sQuery, $aSpecialTermsRaw, PREG_SET_ORDER); preg_match_all('/\\[([\\w ]*)\\]/u', $sQuery, $aSpecialTermsRaw, PREG_SET_ORDER);
$aSpecialTerms = array(); $aSpecialTerms = array();
if (isset($aStructuredQuery['amenity']) && $aStructuredQuery['amenity']) if (isset($aStructuredQuery['amenity']) && $aStructuredQuery['amenity'])
{ {