From 4c4798959edd339cad918250ad5698d6ca7414ec Mon Sep 17 00:00:00 2001 From: Brian Quinion Date: Tue, 17 May 2011 16:22:21 +0000 Subject: [PATCH] hack to handle state abreviations that overlap with 'the' in various non-english languages --- website/search.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/search.php b/website/search.php index 1ef21e5c..3a9295c2 100755 --- a/website/search.php +++ b/website/search.php @@ -106,6 +106,12 @@ // 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 -- 2.39.5