]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/lib.php
adapt to code style conventions
[nominatim.git] / lib / lib.php
index 51bf7ebb13381e32507535ca394f7aad46545685..b2924d5851c6f5daff27e401b843198a95aef7f0 100644 (file)
@@ -77,7 +77,7 @@
        function getProcessorCount()
        {
                $sCPU = file_get_contents('/proc/cpuinfo');
-               preg_match_all('#processor      : [0-9]+#', $sCPU, $aMatches);
+               preg_match_all('#processor  : [0-9]+#', $sCPU, $aMatches);
                return sizeof($aMatches[0]);
        }
 
                   return ($a['aPointPolygon']['numfeatures'] > $b['aPointPolygon']['numfeatures']?-1:1);
                   if ($a['aPointPolygon']['area'] != $b['aPointPolygon']['area'])
                   return ($a['aPointPolygon']['area'] > $b['aPointPolygon']['area']?-1:1);
-               //              if ($a['levenshtein'] != $b['levenshtein'])
-               //                      return ($a['levenshtein'] < $b['levenshtein']?-1:1);
+               //      if ($a['levenshtein'] != $b['levenshtein'])
+               //          return ($a['levenshtein'] < $b['levenshtein']?-1:1);
                if ($a['rank_search'] != $b['rank_search'])
                return ($a['rank_search'] < $b['rank_search']?-1:1);
                 */
        }
 
 
-       function getAddressDetails(&$oDB, $sLanguagePrefArraySQL, $iPlaceID, $sCountryCode = false, $bRaw = false)
+       function getAddressDetails(&$oDB, $sLanguagePrefArraySQL, $iPlaceID, $sCountryCode = false, $housenumber =-1, $bRaw = false)
        {
-               $sSQL = "select *,get_name_by_language(name,$sLanguagePrefArraySQL) as localname from get_addressdata($iPlaceID)";
+               $sSQL = "select *,get_name_by_language(name,$sLanguagePrefArraySQL) as localname from get_addressdata($iPlaceID, $housenumber)";
                if (!$bRaw) $sSQL .= " WHERE isaddress OR type = 'country_code'";
                $sSQL .= " order by rank_address desc,isaddress desc";