]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/AddressDetails.php
Merge pull request #1233 from mtmail/better-gbpostcode-setup-warning
[nominatim.git] / lib / AddressDetails.php
index 8a4005d9f45fa29c51cb1b6ce289cecfba1e9280..e6501b572d5b59b3632a0d61e14f711f5fa729c9 100644 (file)
@@ -22,9 +22,9 @@ class AddressDetails
         }
 
         $sSQL = 'SELECT *,';
-        $sSQL .= '  get_name_by_language(name,'.$mLangPref.') as localname';
+        $sSQL .= ' get_name_by_language(name,'.$mLangPref.') as localname';
         $sSQL .= ' FROM get_addressdata('.$iPlaceID.','.$sHousenumber.')';
-        $sSQL .= ' ORDER BY rank_address desc,isaddress DESC';
+        $sSQL .= ' ORDER BY rank_address DESC, isaddress DESC';
 
         $this->aAddressLines = chksql($oDB->getAll($sSQL));
     }
@@ -40,7 +40,7 @@ class AddressDetails
             return $this->aAddressLines;
         }
 
-        return array_filter($this->aAddressLines, 'AddressDetails::isAddress');
+        return array_filter($this->aAddressLines, array(__CLASS__, 'isAddress'));
     }
 
     public function getLocaleAddress()
@@ -114,4 +114,9 @@ class AddressDetails
         }
         return $aAddress;
     }
+
+    public function debugInfo()
+    {
+        return $this->aAddressLines;
+    }
 }