]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/details.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / website / details.php
index 39fa0afa901ff01ab8531b5df31896fac8be3ed9..ff6ddaca8d17bd1d7380a37deb4c5b2e250587e5 100644 (file)
@@ -37,12 +37,14 @@ if ($sOutputFormat == 'html' && !$sPlaceId && !$sOsmType) {
 
 if ($sOsmType && $iOsmId > 0) {
     $sSQL = 'SELECT place_id FROM placex WHERE osm_type = :type AND osm_id = :id';
+    $aSQLParams = array(':type' => $sOsmType, ':id' => $iOsmId);
     // osm_type and osm_id are not unique enough
     if ($sClass) {
-        $sSQL .= " AND class='".$sClass."'";
+        $sSQL .= ' AND class= :class';
+        $aSQLParams[':class'] = $sClass;
     }
     $sSQL .= ' ORDER BY class ASC';
-    $sPlaceId = $oDB->getOne($sSQL, array(':type' => $sOsmType, ':id' => $iOsmId));
+    $sPlaceId = $oDB->getOne($sSQL, $aSQLParams);
 
 
     // Nothing? Maybe it's an interpolation.
@@ -147,7 +149,6 @@ if (!$aPointDetails) {
 }
 
 $aPointDetails['localname'] = $aPointDetails['localname']?$aPointDetails['localname']:$aPointDetails['housenumber'];
-$aPointDetails['icon'] = Nominatim\ClassTypes\getProperty($aPointDetails, 'icon', false);
 $aPointDetails['rank_search_label'] = getSearchRankLabel($aPointDetails['rank_search']); // only used in HTML format
 
 // Get all alternative names (languages, etc)