X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/effd8e12af440586594a18a04beb33abed260d15..388c7f706d43be1e025ac9250b5a068dff3c0a01:/lib/output.php
diff --git a/lib/output.php b/lib/output.php
index 6b427cf4..9d4b7502 100644
--- a/lib/output.php
+++ b/lib/output.php
@@ -1,6 +1,7 @@
'.$sOSMType.' '.($sRefText?$sRefText:$aFeature['osm_id']).'';
}
return '';
@@ -26,18 +26,27 @@ function osmLink($aFeature, $sRefText=false)
function wikipediaLink($aFeature)
{
- if ($aFeature['wikipedia'])
- {
- list($sLanguage, $sArticle) = explode(':',$aFeature['wikipedia']);
+ if ($aFeature['wikipedia']) {
+ list($sLanguage, $sArticle) = explode(':', $aFeature['wikipedia']);
return ''.$aFeature['wikipedia'].'';
}
return '';
}
-function detailsLink($aFeature, $sTitle=false)
+function detailsLink($aFeature, $sTitle = false)
{
if (!$aFeature['place_id']) return '';
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 '';
+}