X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/d93209ee4831d2b32ea743fc2ec0a5feba238dcb..07eb108a6d1ec64152cc8b0478cc87cdd4da8f6e:/lib/output.php?ds=inline diff --git a/lib/output.php b/lib/output.php index fd6226bc..9d4b7502 100644 --- a/lib/output.php +++ b/lib/output.php @@ -39,3 +39,14 @@ function detailsLink($aFeature, $sTitle = false) return ''.($sTitle?$sTitle:$aFeature['place_id']).''; } + +function detailsPermaLink($aFeature, $sRefText = false) +{ + $sOSMType = formatOSMType($aFeature['osm_type'], false); + + if ($sOSMType) { + $sLabel = $sRefText ? $sRefText : $sOSMType.' '.$aFeature['osm_id']; + return ''.$sLabel.''; + } + return ''; +}