]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge branch 'configure' of github.com:lonvia/Nominatim
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 27 Jun 2012 20:55:39 +0000 (22:55 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 27 Jun 2012 20:55:39 +0000 (22:55 +0200)
website/search.php

index 71041080a1fb440adb7b1462c3cc5e3a8535d082..646eefe6a07fcaff6c0106918e3ee4bed88518a5 100755 (executable)
                 $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