]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/details.php
Merge pull request #425 from lonvia/disable-aux-tables
[nominatim.git] / website / details.php
index c7a567552c06afe614cf6ae08b2f0246d31b155f..5edef6f5001938505960cf0e6dffe5d35e05d952 100755 (executable)
 
        $iPlaceID = (int)$_GET['place_id'];
 
 
        $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);
 
 
        $hLog = logStart($oDB, 'details', $_SERVER['QUERY_STRING'], $aLangPrefOrder);