X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/a4ecd9d73e93a56aeee336c7fa7e18aa42bd9e03..d01d0c13f4d51ddcff2be065f330278516c0c458:/website/details.php diff --git a/website/details.php b/website/details.php index 5b269fc0..5edef6f5 100755 --- a/website/details.php +++ b/website/details.php @@ -10,7 +10,7 @@ $fLoadAvg = getLoadAverage(); if ($fLoadAvg > 3) { - echo "Page temporarily blocked due to high server load\n";F + echo "Page temporarily blocked due to high server load\n"; exit; } */ @@ -56,10 +56,17 @@ $iPlaceID = (int)$_GET['place_id']; - $iParentPlaceID = $oDB->getOne('select parent_place_id from location_property_tiger where place_id = '.$iPlaceID); - if ($iParentPlaceID) $iPlaceID = $iParentPlaceID; - $iParentPlaceID = $oDB->getOne('select parent_place_id from location_property_aux where place_id = '.$iPlaceID); - if ($iParentPlaceID) $iPlaceID = $iParentPlaceID; + if (CONST_Use_US_Tiger_Data) + { + $iParentPlaceID = $oDB->getOne('select parent_place_id from location_property_tiger where place_id = '.$iPlaceID); + if ($iParentPlaceID) $iPlaceID = $iParentPlaceID; + } + + if (CONST_Use_Aux_Location_data) + { + $iParentPlaceID = $oDB->getOne('select parent_place_id from location_property_aux where place_id = '.$iPlaceID); + if ($iParentPlaceID) $iPlaceID = $iParentPlaceID; + } $hLog = logStart($oDB, 'details', $_SERVER['QUERY_STRING'], $aLangPrefOrder);