From: Sarah Hoffmann Date: Sat, 10 Feb 2018 14:50:42 +0000 (+0100) Subject: Merge pull request #905 from mtmail/illinois-li-case-insensitive X-Git-Tag: v3.2.0~129 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/3505417e3f4f027ae554a2f1ffdb7a8796d58f91?hp=-c Merge pull request #905 from mtmail/illinois-li-case-insensitive make sure Illinois,Alabama,Louisiana state code special handling is case insensitive --- 3505417e3f4f027ae554a2f1ffdb7a8796d58f91 diff --combined lib/Geocode.php index f2b99bdb,b2eee7ba..d5647c76 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@@ -225,14 -225,14 +225,14 @@@ class Geocod $aViewbox = $oParams->getStringList('viewboxlbrt'); if ($aViewbox) { if (count($aViewbox) != 4) { - userError("Bad parmater 'viewboxlbrt'. Expected 4 coordinates."); + userError("Bad parameter 'viewboxlbrt'. Expected 4 coordinates."); } $this->setViewbox($aViewbox); } else { $aViewbox = $oParams->getStringList('viewbox'); if ($aViewbox) { if (count($aViewbox) != 4) { - userError("Bad parmater 'viewbox'. Expected 4 coordinates."); + userError("Bad parameter 'viewbox'. Expected 4 coordinates."); } $this->setViewBox($aViewbox); } else { @@@ -535,9 -535,9 +535,9 @@@ // Conflicts between US state abreviations and various words for 'the' in different languages if (isset($this->aLangPrefOrder['name:en'])) { - $sQuery = preg_replace('/(^|,)\s*il\s*(,|$)/', '\1illinois\2', $sQuery); - $sQuery = preg_replace('/(^|,)\s*al\s*(,|$)/', '\1alabama\2', $sQuery); - $sQuery = preg_replace('/(^|,)\s*la\s*(,|$)/', '\1louisiana\2', $sQuery); + $sQuery = preg_replace('/(^|,)\s*il\s*(,|$)/i', '\1illinois\2', $sQuery); + $sQuery = preg_replace('/(^|,)\s*al\s*(,|$)/i', '\1alabama\2', $sQuery); + $sQuery = preg_replace('/(^|,)\s*la\s*(,|$)/i', '\1louisiana\2', $sQuery); } // Do we have anything that looks like a lat/lon pair?