]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/AddressDetails.php
Merge pull request #2497 from lonvia/docs-maintenance
[nominatim.git] / lib-php / AddressDetails.php
index 3d17ede51cb4d3c605f3d166dca58af542c7a15f..91e3d89fcfac21acf1120aea9aa58d2cf3d1d4a7 100644 (file)
@@ -61,7 +61,7 @@ class AddressDetails
         return join(', ', $aParts);
     }
 
         return join(', ', $aParts);
     }
 
-    public function getAddressNames($sCountry = null)
+    public function getAddressNames()
     {
         $aAddress = array();
 
     {
         $aAddress = array();
 
@@ -79,13 +79,11 @@ class AddressDetails
                 $sName = $aLine['housenumber'];
             }
 
                 $sName = $aLine['housenumber'];
             }
 
-            if (isset($sName)) {
-                $sTypeLabel = strtolower(str_replace(' ', '_', $sTypeLabel));
-                if (!isset($aAddress[$sTypeLabel])
-                    || $aLine['class'] == 'place'
-                ) {
-                    $aAddress[$sTypeLabel] = $sName;
-                }
+            if (isset($sName)
+                && (!isset($aAddress[$sTypeLabel])
+                    || $aLine['class'] == 'place')
+            ) {
+                $aAddress[$sTypeLabel] = $sName;
             }
         }
 
             }
         }