X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2613ebfa0143cdd1e3220577d48d9aa8341dbf38..a3201be7e77d910501d036bb18e54d2caa232016:/lib/output.php
diff --git a/lib/output.php b/lib/output.php
index 9d4b7502..823a6631 100644
--- a/lib/output.php
+++ b/lib/output.php
@@ -12,6 +12,8 @@ function formatOSMType($sType, $bIncludeExternal = true)
if ($sType == 'T') return 'way';
if ($sType == 'I') return 'way';
+ // not handled: P, L
+
return '';
}
@@ -33,20 +35,39 @@ function wikipediaLink($aFeature)
return '';
}
-function detailsLink($aFeature, $sTitle = false)
+function detailsLink($aFeature, $sTitle = false, $sExtraProperties = false)
{
if (!$aFeature['place_id']) return '';
- return ''.($sTitle?$sTitle:$aFeature['place_id']).'';
+ $sHtml = ''.($sTitle?$sTitle:$aFeature['place_id']).'';
+
+ return $sHtml;
}
-function detailsPermaLink($aFeature, $sRefText = false)
+function detailsPermaLink($aFeature, $sRefText = false, $sExtraProperties = false)
{
$sOSMType = formatOSMType($aFeature['osm_type'], false);
if ($sOSMType) {
- $sLabel = $sRefText ? $sRefText : $sOSMType.' '.$aFeature['osm_id'];
- return ''.$sLabel.'';
+ $sHtml = '';
+
+ if ($sRefText) {
+ $sHtml .= $sRefText.'';
+ } else {
+ $sHtml .= $sOSMType.' '.$aFeature['osm_id'].'';
+ }
+
+ return $sHtml;
}
- return '';
+ return detailsLink($aFeature, $sRefText, $sExtraProperties);
}