]> git.openstreetmap.org Git - nominatim.git/commitdiff
hack to handle state abreviations that overlap with 'the' in various non-english...
authorBrian Quinion <openstreetmap@brian.quinion.co.uk>
Tue, 17 May 2011 16:22:21 +0000 (16:22 +0000)
committerBrian Quinion <openstreetmap@brian.quinion.co.uk>
Tue, 17 May 2011 16:22:21 +0000 (16:22 +0000)
website/search.php

index 1ef21e5c77ffa6fb8ccac0963e4247cb2df77e19..3a9295c25724b56b51289d733464da5ff4f6c0fe 100755 (executable)
 
                // 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', $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);
+               }
 
                // If we have a view box create the SQL
                // Small is the actual view box, Large is double (on each axis) that