From: Sarah Hoffmann Date: Wed, 27 Jun 2012 20:55:39 +0000 (+0200) Subject: Merge branch 'configure' of github.com:lonvia/Nominatim X-Git-Tag: v2.0.0~55 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/55c1a68dbc245c791164397ef9af6abc759a5daa?hp=d062312eaa9a00c8d038155eb81d81dab0835c0a Merge branch 'configure' of github.com:lonvia/Nominatim --- diff --git a/website/search.php b/website/search.php index 71041080..646eefe6 100755 --- a/website/search.php +++ b/website/search.php @@ -109,10 +109,9 @@ $sQuery = str_ireplace(array('New York, ny','new york, new york', 'New York ny','new york new york'), 'new york city, ny', $sQuery); if (isset($aLangPrefOrder['name:en'])) { - $sQuery = preg_replace('/\\bil\\b/','illinois', $sQuery); - $sQuery = preg_replace('/\\bal\\b/','alabama', $sQuery); - $sQuery = preg_replace('/\\bla\\b/','louisiana', $sQuery); - $sQuery = preg_replace('/\\bde louisiana\\b/','de la', $sQuery); + $sQuery = preg_replace('/,\s*il\s*(,|$)/',', illinois\1', $sQuery); + $sQuery = preg_replace('/,\s*al\s*(,|$)/',', alabama\1', $sQuery); + $sQuery = preg_replace('/,\s*la\s*(,|$)/',', louisiana\1', $sQuery); } // If we have a view box create the SQL